diff --git a/src/ServiceBus/ServiceBus.Autorest/Az.ServiceBus.format.ps1xml b/src/ServiceBus/ServiceBus.Autorest/Az.ServiceBus.format.ps1xml index b4bca4af95d0..c4d5091eb911 100644 --- a/src/ServiceBus/ServiceBus.Autorest/Az.ServiceBus.format.ps1xml +++ b/src/ServiceBus/ServiceBus.Autorest/Az.ServiceBus.format.ps1xml @@ -2,9 +2,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilterProperties + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilterProperties - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilterProperties + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilterProperties#Multiple @@ -24,9 +24,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ResourceNamespacePatchTags + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ResourceNamespacePatchTags - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ResourceNamespacePatchTags + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ResourceNamespacePatchTags#Multiple @@ -46,9 +46,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.TrackedResourceTags + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.TrackedResourceTags - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.TrackedResourceTags + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.TrackedResourceTags#Multiple diff --git a/src/ServiceBus/ServiceBus.Autorest/Az.ServiceBus.psd1 b/src/ServiceBus/ServiceBus.Autorest/Az.ServiceBus.psd1 index 7eaf1d05c1ac..d0ba63c47009 100644 --- a/src/ServiceBus/ServiceBus.Autorest/Az.ServiceBus.psd1 +++ b/src/ServiceBus/ServiceBus.Autorest/Az.ServiceBus.psd1 @@ -11,8 +11,8 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.ServiceBus.private.dll' FormatsToProcess = './Az.ServiceBus.format.ps1xml' - FunctionsToExport = 'Approve-AzServiceBusPrivateEndpointConnection', 'Complete-AzServiceBusMigration', 'Deny-AzServiceBusPrivateEndpointConnection', 'Get-AzServiceBusAuthorizationRule', 'Get-AzServiceBusGeoDRConfiguration', 'Get-AzServiceBusKey', 'Get-AzServiceBusMigration', 'Get-AzServiceBusNamespace', 'Get-AzServiceBusNetworkRuleSet', 'Get-AzServiceBusPrivateEndpointConnection', 'Get-AzServiceBusPrivateLink', 'Get-AzServiceBusQueue', 'Get-AzServiceBusRule', 'Get-AzServiceBusSubscription', 'Get-AzServiceBusTopic', 'New-AzServiceBusAuthorizationRule', 'New-AzServiceBusGeoDRConfiguration', 'New-AzServiceBusIPRuleConfig', 'New-AzServiceBusKey', 'New-AzServiceBusKeyVaultPropertiesObject', 'New-AzServiceBusNamespace', 'New-AzServiceBusQueue', 'New-AzServiceBusRule', 'New-AzServiceBusSubscription', 'New-AzServiceBusTopic', 'New-AzServiceBusVirtualNetworkRuleConfig', 'Remove-AzServiceBusAuthorizationRule', 'Remove-AzServiceBusGeoDRConfiguration', 'Remove-AzServiceBusMigration', 'Remove-AzServiceBusNamespace', 'Remove-AzServiceBusPrivateEndpointConnection', 'Remove-AzServiceBusQueue', 'Remove-AzServiceBusRule', 'Remove-AzServiceBusSubscription', 'Remove-AzServiceBusTopic', 'Set-AzServiceBusAuthorizationRule', 'Set-AzServiceBusGeoDRConfigurationBreakPair', 'Set-AzServiceBusGeoDRConfigurationFailOver', 'Set-AzServiceBusNamespace', 'Set-AzServiceBusNetworkRuleSet', 'Set-AzServiceBusQueue', 'Set-AzServiceBusRule', 'Set-AzServiceBusSubscription', 'Set-AzServiceBusTopic', 'Start-AzServiceBusMigration', 'Stop-AzServiceBusMigration', 'Test-AzServiceBusName', '*' - AliasesToExport = 'Get-AzServiceBusNamespaceV2', 'New-AzServiceBusNamespaceV2', 'Remove-AzServiceBusNamespaceV2', 'Set-AzServiceBusNamespaceV2', '*' + FunctionsToExport = 'Approve-AzServiceBusPrivateEndpointConnection', 'Complete-AzServiceBusMigration', 'Deny-AzServiceBusPrivateEndpointConnection', 'Get-AzServiceBusAuthorizationRule', 'Get-AzServiceBusGeoDRConfiguration', 'Get-AzServiceBusKey', 'Get-AzServiceBusMigration', 'Get-AzServiceBusNamespace', 'Get-AzServiceBusNetworkRuleSet', 'Get-AzServiceBusPrivateEndpointConnection', 'Get-AzServiceBusPrivateLink', 'Get-AzServiceBusQueue', 'Get-AzServiceBusRule', 'Get-AzServiceBusSubscription', 'Get-AzServiceBusTopic', 'New-AzServiceBusAuthorizationRule', 'New-AzServiceBusGeoDRConfiguration', 'New-AzServiceBusIPRuleConfig', 'New-AzServiceBusKey', 'New-AzServiceBusKeyVaultPropertiesObject', 'New-AzServiceBusNamespace', 'New-AzServiceBusQueue', 'New-AzServiceBusRule', 'New-AzServiceBusSubscription', 'New-AzServiceBusTopic', 'New-AzServiceBusVirtualNetworkRuleConfig', 'Remove-AzServiceBusAuthorizationRule', 'Remove-AzServiceBusGeoDRConfiguration', 'Remove-AzServiceBusMigration', 'Remove-AzServiceBusNamespace', 'Remove-AzServiceBusPrivateEndpointConnection', 'Remove-AzServiceBusQueue', 'Remove-AzServiceBusRule', 'Remove-AzServiceBusSubscription', 'Remove-AzServiceBusTopic', 'Set-AzServiceBusAuthorizationRule', 'Set-AzServiceBusGeoDRConfigurationBreakPair', 'Set-AzServiceBusGeoDRConfigurationFailOver', 'Set-AzServiceBusNamespace', 'Set-AzServiceBusNetworkRuleSet', 'Set-AzServiceBusQueue', 'Set-AzServiceBusRule', 'Set-AzServiceBusSubscription', 'Set-AzServiceBusTopic', 'Start-AzServiceBusMigration', 'Stop-AzServiceBusMigration', 'Test-AzServiceBusName' + AliasesToExport = 'Get-AzServiceBusNamespaceV2', 'New-AzServiceBusNamespaceV2', 'Remove-AzServiceBusNamespaceV2', 'Set-AzServiceBusNamespaceV2' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'ServiceBus' diff --git a/src/ServiceBus/ServiceBus.Autorest/README.md b/src/ServiceBus/ServiceBus.Autorest/README.md index 0b987e43914d..48d000c2f09d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/README.md +++ b/src/ServiceBus/ServiceBus.Autorest/README.md @@ -59,14 +59,13 @@ subject-prefix: $(service-name) identity-correction-for-post: true resourcegroup-append: true nested-object-to-string: true - -# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option -use-extension: - "@autorest/powershell": "3.x" +keep-pec-and-plr: true +disable-transform-identity-type: true +flatten-userassignedidentity : false directive: - where: - variant: ^Create$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ + variant: ^Create$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^CreateViaJsonFilePath$|^CreateViaJsonString$ remove: true - where: variant: ^CreateViaIdentity$ @@ -524,14 +523,5 @@ directive: clear-alias: true - model-cmdlet: - - KeyVaultProperties - - - where: - parameter-name: Status - set: - breaking-change: - old-parameter-type: EntityStatus - new-parameter-type: String - deprecated-by-version: 4.0.0 - deprecated-by-azversion: 12.0.0 - change-effective-date: 2024/05/21 + - model-name: KeyVaultProperties + cmdlet-name: New-AzServiceBusKeyVaultPropertiesObject diff --git a/src/ServiceBus/ServiceBus.Autorest/build-module.ps1 b/src/ServiceBus/ServiceBus.Autorest/build-module.ps1 index 7b873657b23a..fb54cda06c3e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/build-module.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/build-module.ps1 @@ -12,17 +12,17 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs) +param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX) $ErrorActionPreference = 'Stop' if($PSEdition -ne 'Core') { Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.' } -if(-not $Isolated -and -not $Debugger) { +if(-not $NotIsolated -and -not $Debugger) { Write-Host -ForegroundColor Green 'Creating isolated process...' $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path - & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated if($LastExitCode -ne 0) { # Build failed. Don't attempt to run the module. @@ -45,6 +45,14 @@ if(-not $Isolated -and -not $Debugger) { } } + if($UX) { + . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') + if($LastExitCode -ne 0) { + # UX generation failed. Don't attempt to run the module. + return + } + } + if($Pack) { . (Join-Path $PSScriptRoot 'pack-module.ps1') if($LastExitCode -ne 0) { @@ -122,7 +130,7 @@ $examplesFolder = Join-Path $PSScriptRoot 'examples' $null = New-Item -ItemType Directory -Force -Path $examplesFolder Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...' -$modelCmdlets = @('KeyVaultProperties') +$modelCmdlets = @(@{modelName="KeyVaultProperties"; cmdletName="New-AzServiceBusKeyVaultPropertiesObject"}) $modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets' if (Test-Path $modelCmdletFolder) { $null = Remove-Item -Force -Recurse -Path $modelCmdletFolder diff --git a/src/ServiceBus/ServiceBus.Autorest/check-dependencies.ps1 b/src/ServiceBus/ServiceBus.Autorest/check-dependencies.ps1 index c29591c7bfe1..90ca9867ae40 100644 --- a/src/ServiceBus/ServiceBus.Autorest/check-dependencies.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/check-dependencies.ps1 @@ -12,13 +12,13 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources) +param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources) $ErrorActionPreference = 'Stop' -if(-not $Isolated) { +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path - & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } diff --git a/src/ServiceBus/ServiceBus.Autorest/create-model-cmdlets.ps1 b/src/ServiceBus/ServiceBus.Autorest/create-model-cmdlets.ps1 index dee4ad55a95b..a127b0e626f8 100644 --- a/src/ServiceBus/ServiceBus.Autorest/create-model-cmdlets.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/create-model-cmdlets.ps1 @@ -15,7 +15,7 @@ function CreateModelCmdlet { - param([string[]]$Models) + param([Hashtable[]]$Models) if ($Models.Count -eq 0) { @@ -30,7 +30,6 @@ function CreateModelCmdlet { } else { $ModuleName = 'Az.ServiceBus' } - $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs $Content = '' $null = $CsFiles | ForEach-Object -Process { if ($_.Name.Split('.').count -eq 2 ) @@ -39,15 +38,34 @@ function CreateModelCmdlet { $Tree = [Microsoft.CodeAnalysis.CSharp.SyntaxFactory]::ParseCompilationUnit($Content) $Nodes = $Tree.ChildNodes().ChildNodes() + $classConstantMember = @{} foreach ($Model in $Models) { - $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$Model") } + $ModelName = $Model.modelName + $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$ModelName") } + $ClassNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'class') -and ($_.Identifier.value -eq "$ModelName") } + $classConstantMember = @() + foreach ($class in $ClassNode) { + foreach ($member in $class.Members) { + $isConstant = $false + foreach ($attr in $member.AttributeLists) { + $memberName = $attr.Attributes.Name.ToString() + if ($memberName.EndsWith('.Constant')) { + $isConstant = $true + break + } + } + if (($member.Modifiers.ToString() -eq 'public') -and $isConstant) { + $classConstantMember += $member.Identifier.Value + } + } + } if ($InterfaceNode.count -eq 0) { continue } # through a queue, we iterate all the parent models. $Queue = @($InterfaceNode) - $visited = @("I$Model") + $visited = @("I$ModelName") $AllInterfaceNodes = @() while ($Queue.count -ne 0) { @@ -65,7 +83,7 @@ function CreateModelCmdlet { } $Namespace = $InterfaceNode.Parent.Name - $ObjectType = $Model + $ObjectType = $ModelName $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}" # remove duplicated module name if ($ObjectType.StartsWith('ServiceBus')) { @@ -81,10 +99,15 @@ function CreateModelCmdlet { { foreach ($Member in $Node.Members) { + if ($classConstantMember.Contains($Member.Identifier.Value)) { + # skip constant member + continue + } $Arguments = $Member.AttributeLists.Attributes.ArgumentList.Arguments $Required = $false $Description = "" $Readonly = $False + $mutability = @{Read = $true; Create = $true; Update = $true} foreach ($Argument in $Arguments) { if ($Argument.NameEquals.Name.Identifier.Value -eq "Required") @@ -99,6 +122,18 @@ function CreateModelCmdlet { { $Readonly = $Argument.Expression.Token.Value } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Read") + { + $mutability.Read = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Create") + { + $mutability.Create = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Update") + { + $mutability.Update = $Argument.Expression.Token.Value + } } if ($Readonly) { @@ -106,8 +141,18 @@ function CreateModelCmdlet { } $Identifier = $Member.Identifier.Value $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1] + $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1] + if ($Type.StartsWith("System.Collections.Generic.List")) + { + # if the type is a list, we need to convert it to array + $matched = $Type -match '\<(?.+)\>$' + if ($matched) + { + $Type = $matches.Name + '[]'; + } + } $ParameterDefinePropertyList = New-Object System.Collections.Generic.List[string] - if ($Required) + if ($Required -and $mutability.Create -and $mutability.Update) { $ParameterDefinePropertyList.Add("Mandatory") } @@ -117,11 +162,9 @@ function CreateModelCmdlet { } $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList) # check whether completer is needed - $completer = ''; - if($Type.Split('.').Split('.')[-2] -eq 'Support') { - # If Type is an array, need to strip [] - $strippedType = $Type.Replace('[]', '') - $completer += "`n [ArgumentCompleter([${strippedType}])]" + $completer = ''; + if(IsEnumType($Member)){ + $completer += GetCompleter($Member) } $ParameterDefineScript = " [Parameter($ParameterDefineProperty)]${completer} @@ -137,6 +180,12 @@ function CreateModelCmdlet { $ParameterDefineScript = $ParameterDefineScriptList | Join-String -Separator "," $ParameterAssignScript = $ParameterAssignScriptList | Join-String -Separator "" + $cmdletName = "New-Az${ModulePrefix}${ObjectType}Object" + if ('' -ne $Model.cmdletName) { + $cmdletName = $Model.cmdletName + } + $OutputPath = Join-Path -ChildPath "${cmdletName}.ps1" -Path $OutputDir + $cmdletNameInLowerCase = $cmdletName.ToLower() $Script = " # ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -162,9 +211,9 @@ Create an in-memory object for ${ObjectType}. .Outputs ${ObjectTypeWithNamespace} .Link -https://learn.microsoft.com/powershell/module/${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object +https://learn.microsoft.com/powershell/module/${ModuleName}/${cmdletNameInLowerCase} #> -function New-Az${ModulePrefix}${ObjectType}Object { +function ${cmdletName} { [OutputType('${ObjectTypeWithNamespace}')] [CmdletBinding(PositionalBinding=`$false)] Param( @@ -181,3 +230,33 @@ ${ParameterAssignScript} Set-Content -Path $OutputPath -Value $Script } } + +function IsEnumType { + param ( + [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property + ) + $isEnum = $false + foreach ($attr in $property.AttributeLists) { + $attributeName = $attr.Attributes.Name.ToString() + if ($attributeName.Contains('ArgumentCompleter')) { + $isEnum = $true + break + } + } + return $isEnum; +} + +function GetCompleter { + param ( + [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property + ) + foreach ($attr in $property.AttributeLists) { + $attributeName = $attr.Attributes.Name.ToString() + if ($attributeName.Contains('ArgumentCompleter')) { + $attributeName = $attributeName.Split("::")[-1] + $possibleValues = [System.String]::Join(", ", $attr.Attributes.ArgumentList.Arguments) + $completer += "`n [${attributeName}(${possibleValues})]" + return $completer + } + } +} diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Approve-AzServiceBusPrivateEndpointConnection.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Approve-AzServiceBusPrivateEndpointConnection.ps1 index 2b21ea0c6950..c822e353b63a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Approve-AzServiceBusPrivateEndpointConnection.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Approve-AzServiceBusPrivateEndpointConnection.ps1 @@ -20,7 +20,7 @@ Approves a ServiceBus PrivateEndpointConnection #> function Approve-AzServiceBusPrivateEndpointConnection{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpanded', HelpMessage = "The name of the Private Endpoint Connection")] diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Deny-AzServiceBusPrivateEndpointConnection.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Deny-AzServiceBusPrivateEndpointConnection.ps1 index 2123760313f8..f5040a10ba0d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Deny-AzServiceBusPrivateEndpointConnection.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Deny-AzServiceBusPrivateEndpointConnection.ps1 @@ -20,7 +20,7 @@ Denies a ServiceBus PrivateEndpointConnection #> function Deny-AzServiceBusPrivateEndpointConnection{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpanded', HelpMessage = "The name of the Private Endpoint Connection")] diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Get-AzServiceBusAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Get-AzServiceBusAuthorizationRule.ps1 index 450d5de3e758..4d2e114b2309 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Get-AzServiceBusAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Get-AzServiceBusAuthorizationRule.ps1 @@ -20,7 +20,7 @@ Gets the Authorization Rule of a ServiceBus namespace, queue or topic. #> function Get-AzServiceBusAuthorizationRule{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName = 'GetExpandedNamespace', PositionalBinding = $false, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'GetExpandedQueue', HelpMessage = "The name of the Authorization Rule")] diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Get-AzServiceBusKey.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Get-AzServiceBusKey.ps1 index 799ba818b236..0b0df9dd1b3b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Get-AzServiceBusKey.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Get-AzServiceBusKey.ps1 @@ -20,7 +20,7 @@ Gets the SASKey of a ServiceBus namespace, queue or topic. #> function Get-AzServiceBusKey{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName = 'GetExpandedNamespace', PositionalBinding = $false, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'GetExpandedQueue', Mandatory, HelpMessage = "The name of the Authorization Rule")] diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusAuthorizationRule.ps1 index 852808d5f1b6..42f7620ca255 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusAuthorizationRule.ps1 @@ -20,7 +20,7 @@ Creates a ServiceBus Namespace, Queue, Topic Authorization Rule #> function New-AzServiceBusAuthorizationRule{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName = 'NewExpandedNamespace', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(Mandatory, HelpMessage = "The name of the Authorization Rule")] @@ -66,9 +66,8 @@ function New-AzServiceBusAuthorizationRule{ [Parameter(Mandatory, HelpMessage = "The rights associated with the rule.")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChangeAttribute("Rights","12.0.0", "4.0.0","2024-05-21" )] ${Rights}, [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] @@ -135,7 +134,7 @@ function New-AzServiceBusAuthorizationRule{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $authRule = [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule]@{ + $authRule = [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule]@{ Rights = $Rights } diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusIPRuleConfig.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusIPRuleConfig.ps1 index d02c16f60ca7..7be033d057fc 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusIPRuleConfig.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusIPRuleConfig.ps1 @@ -19,7 +19,7 @@ Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzService Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzServiceBusNetworkRuleSet #> function New-AzServiceBusIPRuleConfig{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules])] [CmdletBinding(PositionalBinding = $false, ConfirmImpact = 'Medium')] param( [Parameter(Mandatory, HelpMessage = "IP Mask")] @@ -28,15 +28,14 @@ function New-AzServiceBusIPRuleConfig{ ${IPMask}, [Parameter(HelpMessage = "The IP Filter Action")] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction] + [System.String] # The IP Filter Action - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChangeAttribute("Action","12.0.0", "4.0.0","2024-05-21" )] - ${Action} + ${Action} ) process{ try{ - $ipRule = [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules]@{ + $ipRule = [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules]@{ IPMask = $IPMask Action = $Action } diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusKey.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusKey.ps1 index 6fc4e594629e..4eafdc013c6b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusKey.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusKey.ps1 @@ -20,7 +20,7 @@ Regenerates the SASKey of a ServiceBus namespace, queue or topic. #> function New-AzServiceBusKey{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName = 'NewExpandedNamespace', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'NewExpandedQueue', Mandatory, HelpMessage = "The name of the Authorization Rule")] @@ -73,9 +73,8 @@ function New-AzServiceBusKey{ [Parameter(Mandatory, HelpMessage = "The access key to regenerate.")] [Alias('RegenerateKey')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType] + [System.String] # The access key to regenerate. - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChangeAttribute("KeyType","12.0.0", "4.0.0","2024-05-21" )] ${KeyType}, [Parameter(HelpMessage = "Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType")] @@ -150,7 +149,7 @@ function New-AzServiceBusKey{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $accessKeys = [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters]@{ + $accessKeys = [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters]@{ KeyType = $KeyType } diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusNamespace.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusNamespace.ps1 index 578fa794adf7..cadfd8f569aa 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusNamespace.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusNamespace.ps1 @@ -21,7 +21,7 @@ Creates a new ServiceBus namespace. function New-AzServiceBusNamespace{ [Alias("New-AzServiceBusNamespaceV2")] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace])] [CmdletBinding(PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(Mandatory, HelpMessage = "The name of ServiceBusNamespace")] @@ -58,7 +58,7 @@ function New-AzServiceBusNamespace{ [Parameter(HelpMessage = "Properties of KeyVault")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties[]] ${KeyVaultProperty}, [Parameter(HelpMessage = "The number of partitions of a Service Bus namespace. This property is only applicable to Premium SKU namespaces. The default value is 1 and possible values are 1, 2 and 4")] @@ -73,8 +73,7 @@ function New-AzServiceBusNamespace{ [Parameter(HelpMessage = "Type of managed service identity.")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChangeAttribute("IdentityType","12.0.0", "4.0.0","2024-05-21" )] + [System.String] ${IdentityType}, [Parameter(HelpMessage = "Enabling this property creates a Premium Service Bus Namespace in regions supported availability zones.")] @@ -89,20 +88,17 @@ function New-AzServiceBusNamespace{ [Parameter(HelpMessage = "The minimum TLS version for the cluster to support, e.g. '1.2'")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - #[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion] [System.String] ${MinimumTlsVersion}, [Parameter(HelpMessage = "This determines if traffic is allowed over public network. By default it is enabled.")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChangeAttribute("PublicNetworkAccess","12.0.0", "4.0.0","2024-05-21" )] + [System.String] ${PublicNetworkAccess}, [Parameter(HelpMessage = "Name of this SKU.")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChangeAttribute("SkuName","12.0.0", "4.0.0","2024-05-21" )] + [System.String] ${SkuName}, [Parameter(HelpMessage = "The specified messaging units for the tier. For Premium tier, capacity are 1,2 and 4.")] @@ -188,7 +184,7 @@ function New-AzServiceBusNamespace{ $identityHashTable = @{} foreach ($resourceID in $UserAssignedIdentityId){ - $identityHashTable.Add($resourceID, [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.UserAssignedIdentity]::new()) + $identityHashTable.Add($resourceID, [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.UserAssignedIdentity]::new()) } $PSBoundParameters.Add("UserAssignedIdentity", $identityHashTable) diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusVirtualNetworkRuleConfig.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusVirtualNetworkRuleConfig.ps1 index 895c82c81ef7..49f664d81d14 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusVirtualNetworkRuleConfig.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/New-AzServiceBusVirtualNetworkRuleConfig.ps1 @@ -19,7 +19,7 @@ Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzService Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzServiceBusNetworkRuleSet #> function New-AzServiceBusVirtualNetworkRuleConfig{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules])] [CmdletBinding(PositionalBinding = $false, ConfirmImpact = 'Medium')] param( [Parameter(Mandatory, HelpMessage = "Resource ID of Virtual Network Subnet")] @@ -35,7 +35,7 @@ function New-AzServiceBusVirtualNetworkRuleConfig{ process{ try{ - $virtualNetworkRule = [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules]@{ + $virtualNetworkRule = [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules]@{ SubnetId = $SubnetId } diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Remove-AzServiceBusAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Remove-AzServiceBusAuthorizationRule.ps1 index a71f268a0bdf..9c47a088139f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Remove-AzServiceBusAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Remove-AzServiceBusAuthorizationRule.ps1 @@ -20,7 +20,7 @@ Removes the Authorization Rule of a ServiceBus Namespace, Queue or Topic #> function Remove-AzServiceBusAuthorizationRule{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName = 'RemoveExpandedNamespace', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'RemoveExpandedQueue', Mandatory, HelpMessage = "The name of the Authorization Rule")] diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusAuthorizationRule.ps1 index af710b7694de..93440cf600ab 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusAuthorizationRule.ps1 @@ -20,7 +20,7 @@ Updates the authorization rule of a ServiceBus namespace, queue or topic. #> function Set-AzServiceBusAuthorizationRule{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName = 'SetExpandedNamespace', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpandedTopic', Mandatory, HelpMessage = "The name of the Authorization Rule")] @@ -79,9 +79,8 @@ function Set-AzServiceBusAuthorizationRule{ [Parameter(Mandatory, HelpMessage = "The rights associated with the rule.")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChangeAttribute("Rights","12.0.0", "4.0.0","2024-05-21" )] ${Rights}, [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusNamespace.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusNamespace.ps1 index 2add401e473f..d9a3bf815a4a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusNamespace.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusNamespace.ps1 @@ -21,7 +21,7 @@ Updates a ServiceBus namespace function Set-AzServiceBusNamespace{ [Alias("Set-AzServiceBusNamespaceV2")] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpanded', Mandatory, HelpMessage = "The name of ServiceBusNamespace")] @@ -60,7 +60,7 @@ function Set-AzServiceBusNamespace{ [Parameter(HelpMessage = "Properties of KeyVault")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties[]] ${KeyVaultProperty}, [Parameter(HelpMessage = "Enable Infrastructure Encryption (Double Encryption)")] @@ -70,8 +70,7 @@ function Set-AzServiceBusNamespace{ [Parameter(HelpMessage = "Type of managed service identity.")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChangeAttribute("IdentityType","12.0.0", "4.0.0","2024-05-21" )] + [System.String] ${IdentityType}, [Parameter(HelpMessage = "Properties for User Assigned Identities")] @@ -81,20 +80,17 @@ function Set-AzServiceBusNamespace{ [Parameter(HelpMessage = "The minimum TLS version for the cluster to support, e.g. '1.2'")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - #[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion] [System.String] ${MinimumTlsVersion}, [Parameter(HelpMessage = "This determines if traffic is allowed over public network. By default it is enabled.")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChangeAttribute("PublicNetworkAccess","12.0.0", "4.0.0","2024-05-21" )] + [System.String] ${PublicNetworkAccess}, [Parameter(HelpMessage = "Name of this SKU.")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChangeAttribute("SkuName","12.0.0", "4.0.0","2024-05-21" )] + [System.String] ${SkuName}, [Parameter(HelpMessage = "The specified messaging units for the tier. For Premium tier, capacity are 1,2 and 4.")] @@ -210,7 +206,7 @@ function Set-AzServiceBusNamespace{ $identityHashTable = @{} foreach ($resourceID in $UserAssignedIdentityId){ - $identityHashTable.Add($resourceID, [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.UserAssignedIdentity]::new()) + $identityHashTable.Add($resourceID, [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.UserAssignedIdentity]::new()) } $serviceBusNamespace.UserAssignedIdentity = $identityHashTable diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusNetworkRuleSet.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusNetworkRuleSet.ps1 index a5b802f511e2..3f9b3dccf094 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusNetworkRuleSet.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusNetworkRuleSet.ps1 @@ -20,7 +20,7 @@ Updates the NetworkRuleSet of a ServiceBus namespace #> function Set-AzServiceBusNetworkRuleSet{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpanded', Mandatory, HelpMessage = "The name of ServiceBus namespace")] @@ -52,8 +52,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')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChangeAttribute("PublicNetworkAccess","12.0.0", "4.0.0","2024-05-21" )] + [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. ${PublicNetworkAccess}, @@ -65,20 +64,19 @@ function Set-AzServiceBusNetworkRuleSet{ [Parameter(HelpMessage = "Default Action for Network Rule Set")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChangeAttribute("DefaultAction","12.0.0", "4.0.0","2024-05-21" )] + [System.String] #Default Action for Network Rule Set ${DefaultAction}, [Parameter(HelpMessage = "List of IpRules")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules[]] # List of IpRules ${IPRule}, [Parameter(HelpMessage = "List of VirtualNetwork Rules")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules[]] # List of VirtualNetwork Rules ${VirtualNetworkRule}, diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusQueue.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusQueue.ps1 index 089a026b1d5a..ef40cd5dbaba 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusQueue.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusQueue.ps1 @@ -20,7 +20,7 @@ Updates a ServiceBus Queue #> function Set-AzServiceBusQueue{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpanded', Mandatory, HelpMessage = "The name of the Queue.")] @@ -129,11 +129,9 @@ function Set-AzServiceBusQueue{ # Maximum size (in KB) of the message payload that can be accepted by the queue. This property is only used in Premium today and default is 1024. ${MaxMessageSizeInKilobytes}, - [Parameter(HelpMessage = "Maximum size (in KB) of the message payload that can be accepted by the queue. This property is only used in Premium today and default is 1024.")] + [Parameter(HelpMessage = "Enumerates the possible values for the status of a messaging entity.")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChangeAttribute("Status","12.0.0", "4.0.0","2024-05-21" )] - # Maximum size (in KB) of the message payload that can be accepted by the queue. This property is only used in Premium today and default is 1024. + [System.String] ${Status}, diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusRule.ps1 index eb9c9dcf013e..2343c980ada6 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusRule.ps1 @@ -20,7 +20,7 @@ Updates a ServiceBus Rule #> function Set-AzServiceBusRule{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpanded', Mandatory, HelpMessage = "The name of the Rule.")] @@ -143,9 +143,8 @@ function Set-AzServiceBusRule{ [Parameter(HelpMessage = "Filter type that is evaluated against a BrokeredMessage.")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType] + [System.String] # Filter type that is evaluated against a BrokeredMessage. - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChangeAttribute("FilterType","12.0.0", "4.0.0","2024-05-21" )] ${FilterType}, [Parameter(HelpMessage = "Value that indicates whether the rule action requires preprocessing.")] diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusSubscription.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusSubscription.ps1 index 1ad17026db0b..e8dc13a3bc13 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusSubscription.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusSubscription.ps1 @@ -20,7 +20,7 @@ Updates a ServiceBus Subscription #> function Set-AzServiceBusSubscription{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpanded', Mandatory, HelpMessage = "The name of the Subscription.")] @@ -95,9 +95,8 @@ function Set-AzServiceBusSubscription{ [Parameter(HelpMessage = "Enumerates the possible values for the status of a messaging entity.")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus] + [System.String] # Enumerates the possible values for the status of a messaging entity. - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChangeAttribute("Status","12.0.0", "4.0.0","2024-05-21" )] ${Status}, [Parameter(HelpMessage = "Queue/Topic name to forward the messages")] diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusTopic.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusTopic.ps1 index 4e326b5afabb..58b2fdf93eae 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusTopic.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusTopic.ps1 @@ -20,7 +20,7 @@ Updates a ServiceBus Topic #> function Set-AzServiceBusTopic{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpanded', Mandatory, HelpMessage = "The name of the Topic.")] @@ -105,11 +105,9 @@ function Set-AzServiceBusTopic{ # Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024. ${MaxMessageSizeInKilobytes}, - [Parameter(HelpMessage = "Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024.")] + [Parameter(HelpMessage = "Enumerates the possible values for the status of a messaging entity.")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus] - # Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024. - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChangeAttribute("Status","12.0.0", "4.0.0","2024-05-21" )] + [System.String] ${Status}, [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Test-AzServiceBusName.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Test-AzServiceBusName.ps1 index 44025a70070b..a788e2f33d40 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Test-AzServiceBusName.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Test-AzServiceBusName.ps1 @@ -20,7 +20,7 @@ Checks availability of a namespace name or disaster recovery alias. #> function Test-AzServiceBusName { - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult])] [CmdletBinding(DefaultParameterSetName = 'NamespaceAvailability', PositionalBinding = $false, ConfirmImpact = 'Medium')] param( [Parameter(Mandatory, ParameterSetName = 'AliasAvailability', HelpMessage = "The name of ServiceBus namespace")] diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/autogen-model-cmdlets/New-AzServiceBusKeyVaultPropertiesObject.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/autogen-model-cmdlets/New-AzServiceBusKeyVaultPropertiesObject.ps1 index 104376aa7d35..1daef94501ca 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/autogen-model-cmdlets/New-AzServiceBusKeyVaultPropertiesObject.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/autogen-model-cmdlets/New-AzServiceBusKeyVaultPropertiesObject.ps1 @@ -21,12 +21,12 @@ Create an in-memory object for KeyVaultProperties. Create an in-memory object for KeyVaultProperties. .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultProperties +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultProperties .Link -https://learn.microsoft.com/powershell/module/Az.ServiceBus/new-AzServiceBusKeyVaultPropertiesObject +https://learn.microsoft.com/powershell/module/Az.ServiceBus/new-azservicebuskeyvaultpropertiesobject #> function New-AzServiceBusKeyVaultPropertiesObject { - [OutputType('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultProperties')] + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultProperties')] [CmdletBinding(PositionalBinding=$false)] Param( @@ -45,7 +45,7 @@ function New-AzServiceBusKeyVaultPropertiesObject { ) process { - $Object = [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultProperties]::New() + $Object = [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultProperties]::New() if ($PSBoundParameters.ContainsKey('KeyName')) { $Object.KeyName = $KeyName diff --git a/src/ServiceBus/ServiceBus.Autorest/examples/Get-AzServiceBusPrivateLink.md b/src/ServiceBus/ServiceBus.Autorest/examples/Get-AzServiceBusPrivateLink.md index 461de4f8af26..79c61ed59951 100644 --- a/src/ServiceBus/ServiceBus.Autorest/examples/Get-AzServiceBusPrivateLink.md +++ b/src/ServiceBus/ServiceBus.Autorest/examples/Get-AzServiceBusPrivateLink.md @@ -12,4 +12,4 @@ RequiredZoneName : {privatelink.servicebus.windows.net} Type : Microsoft.ServiceBus/namespaces/privateLinkResources ``` -Gets private link resources available on ServiceBus namespace `myNamespace`. \ No newline at end of file +Gets private link resources available on ServiceBus namespace `myNamespace`. diff --git a/src/ServiceBus/ServiceBus.Autorest/export-surface.ps1 b/src/ServiceBus/ServiceBus.Autorest/export-surface.ps1 index a75b12343003..ac04240c8926 100644 --- a/src/ServiceBus/ServiceBus.Autorest/export-surface.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/export-surface.ps1 @@ -12,13 +12,13 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$Isolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat) +param([switch]$NotIsolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat) $ErrorActionPreference = 'Stop' $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path -if(-not $Isolated) { +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' - & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Approve-AzServiceBusPrivateEndpointConnection.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Approve-AzServiceBusPrivateEndpointConnection.ps1 index addd65080eaa..74a836683728 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Approve-AzServiceBusPrivateEndpointConnection.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Approve-AzServiceBusPrivateEndpointConnection.ps1 @@ -28,16 +28,16 @@ Approve-AzServiceBusPrivateEndpointConnection -InputObject $privateEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -51,7 +51,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/approve-azservicebusprivateendpointconnection #> function Approve-AzServiceBusPrivateEndpointConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false)] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -183,7 +183,7 @@ begin { SetExpanded = 'Az.ServiceBus.custom\Approve-AzServiceBusPrivateEndpointConnection'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Approve-AzServiceBusPrivateEndpointConnection'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Complete-AzServiceBusMigration.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Complete-AzServiceBusMigration.ps1 index 97c361669365..6b27db02f79e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Complete-AzServiceBusMigration.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Complete-AzServiceBusMigration.ps1 @@ -36,7 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -77,7 +77,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -164,7 +163,7 @@ begin { Complete = 'Az.ServiceBus.private\Complete-AzServiceBusMigration_Complete'; CompleteViaIdentity = 'Az.ServiceBus.private\Complete-AzServiceBusMigration_CompleteViaIdentity'; } - if (('Complete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Complete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Deny-AzServiceBusPrivateEndpointConnection.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Deny-AzServiceBusPrivateEndpointConnection.ps1 index 94bf7e8967be..7311ac1cce61 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Deny-AzServiceBusPrivateEndpointConnection.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Deny-AzServiceBusPrivateEndpointConnection.ps1 @@ -28,16 +28,16 @@ Deny-AzServiceBusPrivateEndpointConnection -InputObject $privateEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -51,7 +51,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/deny-azservicebusprivateendpointconnection #> function Deny-AzServiceBusPrivateEndpointConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false)] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -183,7 +183,7 @@ begin { SetExpanded = 'Az.ServiceBus.custom\Deny-AzServiceBusPrivateEndpointConnection'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Deny-AzServiceBusPrivateEndpointConnection'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusAuthorizationRule.ps1 index 59da5a05aa5e..899dc22073cd 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusAuthorizationRule.ps1 @@ -29,16 +29,16 @@ Get-AzServiceBusAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceN .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -52,7 +52,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusauthorizationrule #> function Get-AzServiceBusAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='GetExpandedNamespace', PositionalBinding=$false)] param( [Parameter(ParameterSetName='GetExpandedNamespace', Mandatory)] @@ -199,7 +199,7 @@ begin { GetExpandedQueue = 'Az.ServiceBus.custom\Get-AzServiceBusAuthorizationRule'; GetViaIdentityExpanded = 'Az.ServiceBus.custom\Get-AzServiceBusAuthorizationRule'; } - if (('GetExpandedNamespace', 'GetExpandedAlias', 'GetExpandedTopic', 'GetExpandedQueue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('GetExpandedNamespace', 'GetExpandedAlias', 'GetExpandedTopic', 'GetExpandedQueue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusGeoDRConfiguration.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusGeoDRConfiguration.ps1 index 3d9a34db0361..04c425a090bc 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusGeoDRConfiguration.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusGeoDRConfiguration.ps1 @@ -25,7 +25,7 @@ Get-AzServiceBusGeoDRConfiguration -ResourceGroupName myResourceGroup -Namespace .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery .Notes COMPLEX PARAMETER PROPERTIES @@ -34,7 +34,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -48,10 +62,11 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusgeodrconfiguration #> function Get-AzServiceBusGeoDRConfiguration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The Disaster Recovery configuration name @@ -84,9 +99,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -164,9 +184,10 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusGeoDRConfiguration_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusGeoDRConfiguration_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusGeoDRConfiguration_GetViaIdentityNamespace'; List = 'Az.ServiceBus.private\Get-AzServiceBusGeoDRConfiguration_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusKey.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusKey.ps1 index d044cee0f7d6..b09bf91f26ec 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusKey.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusKey.ps1 @@ -27,12 +27,12 @@ Get-AzServiceBusKey -ResourceGroupName myResourceGroup -NamespaceName myNamespac Get-AzServiceBusKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName topic1 -Name RootManageSharedAccessKey .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebuskey #> function Get-AzServiceBusKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='GetExpandedNamespace', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -171,7 +171,7 @@ begin { GetExpandedTopic = 'Az.ServiceBus.custom\Get-AzServiceBusKey'; GetExpandedQueue = 'Az.ServiceBus.custom\Get-AzServiceBusKey'; } - if (('GetExpandedNamespace', 'GetExpandedAlias', 'GetExpandedTopic', 'GetExpandedQueue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('GetExpandedNamespace', 'GetExpandedAlias', 'GetExpandedTopic', 'GetExpandedQueue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusMigration.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusMigration.ps1 index 3165e01050f2..c3aa607e161b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusMigration.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusMigration.ps1 @@ -25,7 +25,7 @@ Get-AzServiceBusMigration -ResourceGroupName myResourceGroup -NamespaceName myNa .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties .Notes COMPLEX PARAMETER PROPERTIES @@ -34,7 +34,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -48,7 +48,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusmigration #> function Get-AzServiceBusMigration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -78,7 +78,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -160,7 +159,7 @@ begin { GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusMigration_GetViaIdentity'; List = 'Az.ServiceBus.private\Get-AzServiceBusMigration_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusNamespace.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusNamespace.ps1 index 3a6bb655f4f7..27051a6bedf1 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusNamespace.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusNamespace.ps1 @@ -29,7 +29,7 @@ Get-AzServiceBusNamespace .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace .Notes COMPLEX PARAMETER PROPERTIES @@ -38,7 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -50,10 +50,14 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusnamespace +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx #> function Get-AzServiceBusNamespace { [Alias('Get-AzServiceBusNamespaceV2')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -84,7 +88,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -167,7 +170,7 @@ begin { List = 'Az.ServiceBus.private\Get-AzServiceBusNamespace_List'; List1 = 'Az.ServiceBus.private\Get-AzServiceBusNamespace_List1'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusNetworkRuleSet.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusNetworkRuleSet.ps1 index 1368e4d46f30..4ed1c60baf5c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusNetworkRuleSet.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusNetworkRuleSet.ps1 @@ -25,7 +25,7 @@ Get-AzServiceBusNetworkRuleSet -ResourceGroupName myResourceGroup -NamespaceName .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet .Notes COMPLEX PARAMETER PROPERTIES @@ -34,7 +34,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -48,7 +48,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusnetworkruleset #> function Get-AzServiceBusNetworkRuleSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -78,7 +78,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -160,7 +159,7 @@ begin { GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusNetworkRuleSet_GetViaIdentity'; List = 'Az.ServiceBus.private\Get-AzServiceBusNetworkRuleSet_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusPrivateEndpointConnection.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusPrivateEndpointConnection.ps1 index db557510ce62..5adc9a6335a2 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusPrivateEndpointConnection.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusPrivateEndpointConnection.ps1 @@ -27,7 +27,7 @@ Get-AzServiceBusPrivateEndpointConnection -ResourceGroupName myResourceGroup -Na .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -36,7 +36,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -48,12 +62,17 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusprivateendpointconnection +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx #> function Get-AzServiceBusPrivateEndpointConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Alias('PrivateEndpointConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -87,9 +106,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -167,9 +191,10 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusPrivateEndpointConnection_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusPrivateEndpointConnection_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusPrivateEndpointConnection_GetViaIdentityNamespace'; List = 'Az.ServiceBus.private\Get-AzServiceBusPrivateEndpointConnection_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusPrivateLink.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusPrivateLink.ps1 index 47412e4f6170..b92268e220c9 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusPrivateLink.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusPrivateLink.ps1 @@ -23,12 +23,14 @@ Gets lists of resources that supports Privatelinks. Get-AzServiceBusPrivateLink -ResourceGroupName myResourceGroup -NamespaceName myNamespace .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusprivatelink +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx #> function Get-AzServiceBusPrivateLink { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -128,7 +130,7 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusPrivateLink_Get'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusQueue.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusQueue.ps1 index 8c9b60c526c7..2a95d73cac70 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusQueue.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusQueue.ps1 @@ -27,7 +27,7 @@ Get-AzServiceBusQueue -ResourceGroupName myResourceGroup -NamespaceName myNamesp .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue .Notes COMPLEX PARAMETER PROPERTIES @@ -36,7 +36,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -48,12 +62,17 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusqueue +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639380.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639415.aspx #> function Get-AzServiceBusQueue { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Alias('QueueName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -87,9 +106,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Query')] [System.Int32] @@ -180,9 +204,10 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusQueue_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusQueue_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusQueue_GetViaIdentityNamespace'; List = 'Az.ServiceBus.private\Get-AzServiceBusQueue_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusRule.ps1 index 6b78ef4164f7..e992752c1537 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusRule.ps1 @@ -27,7 +27,7 @@ Get-AzServiceBusRule -ResourceGroupName myResourceGroup -NamespaceName myNamespa .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule .Notes COMPLEX PARAMETER PROPERTIES @@ -36,7 +36,49 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +SUBSCRIPTIONINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -50,10 +92,13 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusrule #> function Get-AzServiceBusRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentitySubscription', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityTopic', Mandatory)] [Alias('RuleName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -84,6 +129,8 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityTopic', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -91,6 +138,7 @@ param( ${SubscriptionName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -101,9 +149,26 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='GetViaIdentitySubscription', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${SubscriptionInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Query')] [System.Int32] @@ -194,9 +259,12 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusRule_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusRule_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusRule_GetViaIdentityNamespace'; + GetViaIdentitySubscription = 'Az.ServiceBus.private\Get-AzServiceBusRule_GetViaIdentitySubscription'; + GetViaIdentityTopic = 'Az.ServiceBus.private\Get-AzServiceBusRule_GetViaIdentityTopic'; List = 'Az.ServiceBus.private\Get-AzServiceBusRule_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusSubscription.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusSubscription.ps1 index 303728f70d17..1e801a4f63f3 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusSubscription.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusSubscription.ps1 @@ -27,7 +27,7 @@ Get-AzServiceBusSubscription -ResourceGroupName myResourceGroup -NamespaceName m .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription .Notes COMPLEX PARAMETER PROPERTIES @@ -36,7 +36,35 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -48,12 +76,18 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebussubscription +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639402.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639400.aspx #> function Get-AzServiceBusSubscription { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityTopic', Mandatory)] [Alias('SubscriptionName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -84,6 +118,7 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -94,9 +129,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Query')] [System.Int32] @@ -187,9 +233,11 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusSubscription_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusSubscription_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusSubscription_GetViaIdentityNamespace'; + GetViaIdentityTopic = 'Az.ServiceBus.private\Get-AzServiceBusSubscription_GetViaIdentityTopic'; List = 'Az.ServiceBus.private\Get-AzServiceBusSubscription_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusTopic.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusTopic.ps1 index 8b8edd9bc98f..4ce2e9c8faa3 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusTopic.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Get-AzServiceBusTopic.ps1 @@ -27,7 +27,7 @@ Get-AzServiceBusTopic -ResourceGroupName myResourceGroup -NamespaceName myNamesp .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic .Notes COMPLEX PARAMETER PROPERTIES @@ -36,7 +36,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -48,12 +62,17 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebustopic +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639399.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639388.aspx #> function Get-AzServiceBusTopic { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Alias('TopicName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -87,9 +106,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Query')] [System.Int32] @@ -180,9 +204,10 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusTopic_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusTopic_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusTopic_GetViaIdentityNamespace'; List = 'Az.ServiceBus.private\Get-AzServiceBusTopic_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusAuthorizationRule.ps1 index b7dd485adf92..dcca49f0ad5e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusAuthorizationRule.ps1 @@ -25,12 +25,12 @@ New-AzServiceBusAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceN New-AzServiceBusAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -QueueName myQueue -Name myAuthRule -Rights @('Manage', 'Send', 'Listen') .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusauthorizationrule #> function New-AzServiceBusAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='NewExpandedNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -74,7 +74,7 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, @@ -168,7 +168,7 @@ begin { NewExpandedQueue = 'Az.ServiceBus.custom\New-AzServiceBusAuthorizationRule'; NewExpandedTopic = 'Az.ServiceBus.custom\New-AzServiceBusAuthorizationRule'; } - if (('NewExpandedNamespace', 'NewExpandedQueue', 'NewExpandedTopic') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('NewExpandedNamespace', 'NewExpandedQueue', 'NewExpandedTopic') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusGeoDRConfiguration.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusGeoDRConfiguration.ps1 index 74a440470de4..beadcab056c3 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusGeoDRConfiguration.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusGeoDRConfiguration.ps1 @@ -16,19 +16,45 @@ <# .Synopsis -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) .Description -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) .Example New-AzServiceBusGeoDRConfiguration -Name myAlias -ResourceGroupName myResourceGroup -NamespaceName myPrimaryNamespace -PartnerNamespace "/subscriptions/0000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/mySecondaryNamespace" +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +PARAMETER : Single item in List or Get Alias(Disaster Recovery configuration) operation + [AlternateName ]: Primary/Secondary eventhub namespace name, which is part of GEO DR pairing + [PartnerNamespace ]: ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusgeodrconfiguration #> function New-AzServiceBusGeoDRConfiguration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -37,19 +63,19 @@ param( # The Disaster Recovery configuration name ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -57,18 +83,33 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Primary/Secondary eventhub namespace name, which is part of GEO DR pairing ${AlternateName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing ${PartnerNamespace}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery] + # Single item in List or Get Alias(Disaster Recovery configuration) operation + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -151,8 +192,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusGeoDRConfiguration_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusGeoDRConfiguration_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusGeoDRConfiguration_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusIPRuleConfig.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusIPRuleConfig.ps1 index 5d748e950e69..c9fe49e2f98b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusIPRuleConfig.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusIPRuleConfig.ps1 @@ -23,12 +23,12 @@ Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzService New-AzServiceBusIPRuleConfig -IPMask 3.3.3.3 -Action Allow .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusipruleconfig #> function New-AzServiceBusIPRuleConfig { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -39,7 +39,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction] + [System.String] # The IP Filter Action ${Action} ) diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusKey.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusKey.ps1 index 9bd5608b7f1f..09bd0ee78810 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusKey.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusKey.ps1 @@ -27,12 +27,12 @@ New-AzServiceBusKey -ResourceGroupName myResourceGroup -NamespaceName myNamespac New-AzServiceBusKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -Name rootmanagesharedaccesskey -KeyType SecondaryKey .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebuskey #> function New-AzServiceBusKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='NewExpandedNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -77,7 +77,7 @@ param( [Parameter(Mandatory)] [Alias('RegenerateKey')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType] + [System.String] # The access key to regenerate. ${KeyType}, @@ -177,7 +177,7 @@ begin { NewExpandedTopic = 'Az.ServiceBus.custom\New-AzServiceBusKey'; NewExpandedQueue = 'Az.ServiceBus.custom\New-AzServiceBusKey'; } - if (('NewExpandedNamespace', 'NewExpandedTopic', 'NewExpandedQueue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('NewExpandedNamespace', 'NewExpandedTopic', 'NewExpandedQueue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusKeyVaultPropertiesObject.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusKeyVaultPropertiesObject.ps1 index a11bf3c27f98..d9ea64721473 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusKeyVaultPropertiesObject.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusKeyVaultPropertiesObject.ps1 @@ -26,12 +26,12 @@ $ec1 = "/subscriptions/0000000000000/resourceGroups/myResourceGroup/providers/Mi New-AzServiceBusKeyVaultPropertiesObject -KeyName key4 -KeyVaultUri https://testkeyvault.vault.azure.net/ -UserAssignedIdentity $ec1 .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultProperties +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultProperties .Link -https://learn.microsoft.com/powershell/module/Az.ServiceBus/new-AzServiceBusKeyVaultPropertiesObject +https://learn.microsoft.com/powershell/module/Az.ServiceBus/new-azservicebuskeyvaultpropertiesobject #> function New-AzServiceBusKeyVaultPropertiesObject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultProperties])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultProperties])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter()] diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusNamespace.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusNamespace.ps1 index 5b00c1481ba6..24d64e18be45 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusNamespace.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusNamespace.ps1 @@ -31,7 +31,7 @@ New-AzServiceBusNamespace -ResourceGroupName myResourceGroup -Name myNamespace - New-AzServiceBusNamespace -ResourceGroupName myResourceGroup -Name myNamespace -SkuName Standard -Location southcentralus -Tag @{k1='v1'; k2='v2'} -DisableLocalAuth .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace .Notes COMPLEX PARAMETER PROPERTIES @@ -47,7 +47,7 @@ https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusname #> function New-AzServiceBusNamespace { [Alias('New-AzServiceBusNamespaceV2')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace])] [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -89,9 +89,8 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties[]] # Properties of KeyVault - # To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ${KeyVaultProperty}, [Parameter()] @@ -110,7 +109,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity. ${IdentityType}, @@ -135,14 +134,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. ${PublicNetworkAccess}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName] + [System.String] # Name of this SKU. ${SkuName}, @@ -247,7 +246,7 @@ begin { $mapping = @{ __AllParameterSets = 'Az.ServiceBus.custom\New-AzServiceBusNamespace'; } - if (('__AllParameterSets') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('__AllParameterSets') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusQueue.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusQueue.ps1 index 235f215b5eef..5219021cf760 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusQueue.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusQueue.ps1 @@ -16,21 +16,63 @@ <# .Synopsis -Creates or updates a Service Bus queue. +Create a Service Bus queue. This operation is idempotent. .Description -Creates or updates a Service Bus queue. +Create a Service Bus queue. This operation is idempotent. .Example New-AzServiceBusQueue -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name myQueue -AutoDeleteOnIdle (New-TimeSpan -Days 1 -Minutes 3 -Seconds 4) -DefaultMessageTimeToLive (New-TimeSpan -Days 5) -EnablePartitioning +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +PARAMETER : Description of queue Resource. + [AutoDeleteOnIdle ]: ISO 8061 timeSpan idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes. + [DeadLetteringOnMessageExpiration ]: A value that indicates whether this queue has dead letter support when a message expires. + [DefaultMessageTimeToLive ]: ISO 8601 default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. + [DuplicateDetectionHistoryTimeWindow ]: ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. + [EnableBatchedOperations ]: Value that indicates whether server-side batched operations are enabled. + [EnableExpress ]: A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. + [EnablePartitioning ]: A value that indicates whether the queue is to be partitioned across multiple message brokers. + [ForwardDeadLetteredMessagesTo ]: Queue/Topic name to forward the Dead Letter message + [ForwardTo ]: Queue/Topic name to forward the messages + [LockDuration ]: ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute. + [MaxDeliveryCount ]: The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is 10. + [MaxMessageSizeInKilobytes ]: Maximum size (in KB) of the message payload that can be accepted by the queue. This property is only used in Premium today and default is 1024. + [MaxSizeInMegabytes ]: The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024. + [RequiresDuplicateDetection ]: A value indicating if this queue requires duplicate detection. + [RequiresSession ]: A value that indicates whether the queue supports the concept of sessions. + [Status ]: Enumerates the possible values for the status of a messaging entity. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusqueue +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639395.aspx #> function New-AzServiceBusQueue { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -40,19 +82,19 @@ param( # The queue name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -60,72 +102,90 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # Idle interval after which the queue is automatically deleted. # The minimum duration is 5 minutes. ${AutoDeleteOnIdle}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # A value that indicates whether this queue has dead letter support when a message expires. ${DeadLetteringOnMessageExpiration}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # This is the duration after which the message expires, starting from when the message is sent to Service Bus. # This is the default value used when TimeToLive is not set on a message itself. ${DefaultMessageTimeToLive}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # Defines the duration of the duplicate detection history. # The default value is 10 minutes. ${DuplicateDetectionHistoryTimeWindow}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether server-side batched operations are enabled. ${EnableBatchedOperations}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # A value that indicates whether Express Entities are enabled. # An express queue holds a message in memory temporarily before writing it to persistent storage. ${EnableExpress}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # A value that indicates whether the queue is to be partitioned across multiple message brokers. ${EnablePartitioning}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Queue/Topic name to forward the Dead Letter message ${ForwardDeadLetteredMessagesTo}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Queue/Topic name to forward the messages ${ForwardTo}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # Timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. # The maximum value for LockDuration is 5 minutes; the default value is 1 minute. ${LockDuration}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Int32] # The maximum delivery count. @@ -133,39 +193,50 @@ param( # default value is 10. ${MaxDeliveryCount}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Int64] # Maximum size (in KB) of the message payload that can be accepted by the queue. # This property is only used in Premium today and default is 1024. ${MaxMessageSizeInKilobytes}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Int32] # The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. # Default is 1024. ${MaxSizeInMegabytes}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # A value indicating if this queue requires duplicate detection. ${RequiresDuplicateDetection}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # A value that indicates whether the queue supports the concept of sessions. ${RequiresSession}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus] + [System.String] # Enumerates the possible values for the status of a messaging entity. ${Status}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue] + # Description of queue Resource. + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -242,8 +313,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusQueue_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusQueue_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusQueue_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusRule.ps1 index 7002924780ff..70424a36ef7b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusRule.ps1 @@ -16,21 +16,91 @@ <# .Synopsis -Creates a new rule and updates an existing rule +Create a new rule and updates an existing rule .Description -Creates a new rule and updates an existing rule +Create a new rule and updates an existing rule .Example New-AzServiceBusRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -SubscriptionName mySubscription -Name myCorrelationRule -FilterType CorrelationFilter -ContentType contenttype -CorrelationFilterProperty @{a='b';c='d'} -SessionId sessionid -CorrelationId correlationid -MessageId messageid -Label label -ReplyTo replyto -ReplyToSessionId replytosessionid .Example New-AzServiceBusRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -SubscriptionName mySubscription -Name mySqlRule -FilterType SqlFilter -SqlExpression 3=2 -ActionSqlExpression "SET a=b" +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +PARAMETER : Description of Rule Resource. + [ActionCompatibilityLevel ]: This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. + [ActionRequiresPreprocessing ]: Value that indicates whether the rule action requires preprocessing. + [ActionSqlExpression ]: SQL expression. e.g. MyProperty='ABC' + [ContentType ]: Content type of the message. + [CorrelationFilterProperty ]: dictionary object for custom filters + [(Any) ]: This indicates any property can be added to this object. + [CorrelationFilterRequiresPreprocessing ]: Value that indicates whether the rule action requires preprocessing. + [CorrelationId ]: Identifier of the correlation. + [FilterType ]: Filter type that is evaluated against a BrokeredMessage. + [Label ]: Application specific label. + [MessageId ]: Identifier of the message. + [ReplyTo ]: Address of the queue to reply to. + [ReplyToSessionId ]: Session identifier to reply to. + [SessionId ]: Session identifier. + [SqlExpression ]: The SQL expression. e.g. MyProperty='ABC' + [SqlFilterCompatibilityLevel ]: This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. + [SqlFilterRequiresPreprocessing ]: Value that indicates whether the rule action requires preprocessing. + [To ]: Address to send to. + +SUBSCRIPTIONINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusrule #> function New-AzServiceBusRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -40,45 +110,78 @@ param( # The rule name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. ${ResourceGroupName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Subscription credentials that uniquely identify a Microsoft Azure subscription. + # The subscription ID forms part of the URI for every service call. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityTopic', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The subscription name. ${SubscriptionName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The topic name. ${TopicName}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # Subscription credentials that uniquely identify a Microsoft Azure subscription. - # The subscription ID forms part of the URI for every service call. - ${SubscriptionId}, + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentitySubscription', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${SubscriptionInputObject}, + + [Parameter(ParameterSetName='CreateViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether the rule action requires preprocessing. ${ActionRequiresPreprocessing}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # SQL expression. @@ -86,69 +189,102 @@ param( # MyProperty='ABC' ${ActionSqlExpression}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Content type of the message. ${ContentType}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties]))] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties]))] [System.Collections.Hashtable] # dictionary object for custom filters ${CorrelationFilterProperty}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether the rule action requires preprocessing. ${CorrelationFilterRequiresPreprocessing}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Identifier of the correlation. ${CorrelationId}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SqlFilter", "CorrelationFilter")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType] + [System.String] # Filter type that is evaluated against a BrokeredMessage. ${FilterType}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Application specific label. ${Label}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Identifier of the message. ${MessageId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Address of the queue to reply to. ${ReplyTo}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Session identifier to reply to. ${ReplyToSessionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Session identifier. ${SessionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # The SQL expression. @@ -156,18 +292,32 @@ param( # MyProperty='ABC' ${SqlExpression}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether the rule action requires preprocessing. ${SqlFilterRequiresPreprocessing}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Address to send to. ${To}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentitySubscription', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule] + # Description of Rule Resource. + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -244,8 +394,14 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusRule_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusRule_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusRule_CreateViaIdentityNamespaceExpanded'; + CreateViaIdentitySubscription = 'Az.ServiceBus.private\New-AzServiceBusRule_CreateViaIdentitySubscription'; + CreateViaIdentitySubscriptionExpanded = 'Az.ServiceBus.private\New-AzServiceBusRule_CreateViaIdentitySubscriptionExpanded'; + CreateViaIdentityTopic = 'Az.ServiceBus.private\New-AzServiceBusRule_CreateViaIdentityTopic'; + CreateViaIdentityTopicExpanded = 'Az.ServiceBus.private\New-AzServiceBusRule_CreateViaIdentityTopicExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusSubscription.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusSubscription.ps1 index 390141e1ec61..bbcb5612d571 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusSubscription.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusSubscription.ps1 @@ -16,19 +16,75 @@ <# .Synopsis -Creates a topic subscription. +Create a topic subscription. .Description -Creates a topic subscription. +Create a topic subscription. .Example New-AzServiceBusSubscription -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -Name mySubscription -DefaultMessageTimeToLive (New-TimeSpan -Days 6) -EnableBatchedOperations +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +PARAMETER : Description of subscription resource. + [AutoDeleteOnIdle ]: ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. + [ClientId ]: Indicates the Client ID of the application that created the client-affine subscription. + [DeadLetteringOnFilterEvaluationException ]: Value that indicates whether a subscription has dead letter support on filter evaluation exceptions. + [DeadLetteringOnMessageExpiration ]: Value that indicates whether a subscription has dead letter support when a message expires. + [DefaultMessageTimeToLive ]: ISO 8061 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. + [DuplicateDetectionHistoryTimeWindow ]: ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. + [EnableBatchedOperations ]: Value that indicates whether server-side batched operations are enabled. + [ForwardDeadLetteredMessagesTo ]: Queue/Topic name to forward the Dead Letter message + [ForwardTo ]: Queue/Topic name to forward the messages + [IsClientAffine ]: Value that indicates whether the subscription has an affinity to the client id. + [IsDurable ]: For client-affine subscriptions, this value indicates whether the subscription is durable or not. + [IsShared ]: For client-affine subscriptions, this value indicates whether the subscription is shared or not. + [LockDuration ]: ISO 8061 lock duration timespan for the subscription. The default value is 1 minute. + [MaxDeliveryCount ]: Number of maximum deliveries. + [RequiresSession ]: Value indicating if a subscription supports the concept of sessions. + [Status ]: Enumerates the possible values for the status of a messaging entity. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebussubscription +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx #> function New-AzServiceBusSubscription { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -38,25 +94,19 @@ param( # The subscription name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. ${ResourceGroupName}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] - [System.String] - # The topic name. - ${TopicName}, - - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -64,107 +114,168 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [System.String] + # The topic name. + ${TopicName}, + + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # Idle interval after which the queue is automatically deleted. # The minimum duration is 5 minutes. ${AutoDeleteOnIdle}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Indicates the Client ID of the application that created the client-affine subscription. ${ClientId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether a subscription has dead letter support on filter evaluation exceptions. ${DeadLetteringOnFilterEvaluationException}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether a subscription has dead letter support when a message expires. ${DeadLetteringOnMessageExpiration}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # This is the duration after which the message expires, starting from when the message is sent to Service Bus. # This is the default value used when TimeToLive is not set on a message itself. ${DefaultMessageTimeToLive}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # Defines the duration of the duplicate detection history. # The default value is 10 minutes. ${DuplicateDetectionHistoryTimeWindow}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether server-side batched operations are enabled. ${EnableBatchedOperations}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Queue/Topic name to forward the Dead Letter message ${ForwardDeadLetteredMessagesTo}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Queue/Topic name to forward the messages ${ForwardTo}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether the subscription has an affinity to the client id. ${IsClientAffine}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # For client-affine subscriptions, this value indicates whether the subscription is durable or not. ${IsDurable}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # For client-affine subscriptions, this value indicates whether the subscription is shared or not. ${IsShared}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # Timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. # The maximum value for LockDuration is 5 minutes; the default value is 1 minute. ${LockDuration}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Int32] # Number of maximum deliveries. ${MaxDeliveryCount}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value indicating if a subscription supports the concept of sessions. ${RequiresSession}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus] + [System.String] # Enumerates the possible values for the status of a messaging entity. ${Status}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription] + # Description of subscription resource. + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -241,8 +352,12 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusSubscription_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusSubscription_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusSubscription_CreateViaIdentityNamespaceExpanded'; + CreateViaIdentityTopic = 'Az.ServiceBus.private\New-AzServiceBusSubscription_CreateViaIdentityTopic'; + CreateViaIdentityTopicExpanded = 'Az.ServiceBus.private\New-AzServiceBusSubscription_CreateViaIdentityTopicExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusTopic.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusTopic.ps1 index 81aa7c2f2926..4371d7272727 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusTopic.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusTopic.ps1 @@ -16,19 +16,56 @@ <# .Synopsis -Creates a topic in the specified namespace. +Create a topic in the specified namespace. .Description -Creates a topic in the specified namespace. +Create a topic in the specified namespace. .Example New-AzServiceBusTopic -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name myTopic -DefaultMessageTimeToLive (New-TimeSpan -Days 18) -EnableBatchedOperations +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +PARAMETER : Description of topic resource. + [AutoDeleteOnIdle ]: ISO 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. + [DefaultMessageTimeToLive ]: ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. + [DuplicateDetectionHistoryTimeWindow ]: ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. + [EnableBatchedOperations ]: Value that indicates whether server-side batched operations are enabled. + [EnableExpress ]: Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage. + [EnablePartitioning ]: Value that indicates whether the topic to be partitioned across multiple message brokers is enabled. + [MaxMessageSizeInKilobytes ]: Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024. + [MaxSizeInMegabytes ]: Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024. + [RequiresDuplicateDetection ]: Value indicating if this topic requires duplicate detection. + [Status ]: Enumerates the possible values for the status of a messaging entity. + [SupportOrdering ]: Value that indicates whether the topic supports ordering. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebustopic +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx #> function New-AzServiceBusTopic { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -38,19 +75,19 @@ param( # The topic name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -58,79 +95,103 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # Idle interval after which the queue is automatically deleted. # The minimum duration is 5 minutes. ${AutoDeleteOnIdle}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # This is the duration after which the message expires, starting from when the message is sent to Service Bus. # This is the default value used when TimeToLive is not set on a message itself. ${DefaultMessageTimeToLive}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # Defines the duration of the duplicate detection history. # The default value is 10 minutes. ${DuplicateDetectionHistoryTimeWindow}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether server-side batched operations are enabled. ${EnableBatchedOperations}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether Express Entities are enabled. # An express topic holds a message in memory temporarily before writing it to persistent storage. ${EnableExpress}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether the topic to be partitioned across multiple message brokers is enabled. ${EnablePartitioning}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Int64] # Maximum size (in KB) of the message payload that can be accepted by the topic. # This property is only used in Premium today and default is 1024. ${MaxMessageSizeInKilobytes}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Int32] # Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. # Default is 1024. ${MaxSizeInMegabytes}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value indicating if this topic requires duplicate detection. ${RequiresDuplicateDetection}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus] + [System.String] # Enumerates the possible values for the status of a messaging entity. ${Status}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether the topic supports ordering. ${SupportOrdering}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic] + # Description of topic resource. + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -207,8 +268,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusTopic_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusTopic_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusTopic_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusVirtualNetworkRuleConfig.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusVirtualNetworkRuleConfig.ps1 index ab65a427f425..38aadb9eb030 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusVirtualNetworkRuleConfig.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/New-AzServiceBusVirtualNetworkRuleConfig.ps1 @@ -23,12 +23,12 @@ Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzService New-AzServiceBusVirtualNetworkRuleConfig -SubnetId /subscriptions/subscriptionId/resourcegroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/default .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusvirtualnetworkruleconfig #> function New-AzServiceBusVirtualNetworkRuleConfig { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/ProxyCmdletDefinitions.ps1 index 3fbc99ffe797..163df79f586a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -36,7 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -77,7 +77,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -164,7 +163,7 @@ begin { Complete = 'Az.ServiceBus.private\Complete-AzServiceBusMigration_Complete'; CompleteViaIdentity = 'Az.ServiceBus.private\Complete-AzServiceBusMigration_CompleteViaIdentity'; } - if (('Complete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Complete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -234,7 +233,7 @@ Get-AzServiceBusGeoDRConfiguration -ResourceGroupName myResourceGroup -Namespace .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery .Notes COMPLEX PARAMETER PROPERTIES @@ -243,7 +242,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -257,10 +270,11 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusgeodrconfiguration #> function Get-AzServiceBusGeoDRConfiguration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The Disaster Recovery configuration name @@ -293,9 +307,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -373,9 +392,10 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusGeoDRConfiguration_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusGeoDRConfiguration_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusGeoDRConfiguration_GetViaIdentityNamespace'; List = 'Az.ServiceBus.private\Get-AzServiceBusGeoDRConfiguration_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -445,7 +465,7 @@ Get-AzServiceBusMigration -ResourceGroupName myResourceGroup -NamespaceName myNa .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties .Notes COMPLEX PARAMETER PROPERTIES @@ -454,7 +474,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -468,7 +488,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusmigration #> function Get-AzServiceBusMigration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -498,7 +518,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -580,7 +599,7 @@ begin { GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusMigration_GetViaIdentity'; List = 'Az.ServiceBus.private\Get-AzServiceBusMigration_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -654,7 +673,7 @@ Get-AzServiceBusNamespace .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace .Notes COMPLEX PARAMETER PROPERTIES @@ -663,7 +682,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -675,10 +694,14 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusnamespace +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx #> function Get-AzServiceBusNamespace { [Alias('Get-AzServiceBusNamespaceV2')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -709,7 +732,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -792,7 +814,7 @@ begin { List = 'Az.ServiceBus.private\Get-AzServiceBusNamespace_List'; List1 = 'Az.ServiceBus.private\Get-AzServiceBusNamespace_List1'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -862,7 +884,7 @@ Get-AzServiceBusNetworkRuleSet -ResourceGroupName myResourceGroup -NamespaceName .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet .Notes COMPLEX PARAMETER PROPERTIES @@ -871,7 +893,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -885,7 +907,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusnetworkruleset #> function Get-AzServiceBusNetworkRuleSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -915,7 +937,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -997,7 +1018,7 @@ begin { GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusNetworkRuleSet_GetViaIdentity'; List = 'Az.ServiceBus.private\Get-AzServiceBusNetworkRuleSet_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1069,7 +1090,7 @@ Get-AzServiceBusPrivateEndpointConnection -ResourceGroupName myResourceGroup -Na .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -1078,7 +1099,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -1090,12 +1125,17 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusprivateendpointconnection +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx #> function Get-AzServiceBusPrivateEndpointConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Alias('PrivateEndpointConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -1129,9 +1169,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1209,9 +1254,10 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusPrivateEndpointConnection_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusPrivateEndpointConnection_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusPrivateEndpointConnection_GetViaIdentityNamespace'; List = 'Az.ServiceBus.private\Get-AzServiceBusPrivateEndpointConnection_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1279,12 +1325,14 @@ Gets lists of resources that supports Privatelinks. Get-AzServiceBusPrivateLink -ResourceGroupName myResourceGroup -NamespaceName myNamespace .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusprivatelink +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx #> function Get-AzServiceBusPrivateLink { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -1384,7 +1432,7 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusPrivateLink_Get'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1456,7 +1504,7 @@ Get-AzServiceBusQueue -ResourceGroupName myResourceGroup -NamespaceName myNamesp .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue .Notes COMPLEX PARAMETER PROPERTIES @@ -1465,7 +1513,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -1477,12 +1539,17 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusqueue +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639380.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639415.aspx #> function Get-AzServiceBusQueue { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Alias('QueueName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -1516,9 +1583,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Query')] [System.Int32] @@ -1609,9 +1681,10 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusQueue_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusQueue_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusQueue_GetViaIdentityNamespace'; List = 'Az.ServiceBus.private\Get-AzServiceBusQueue_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1683,7 +1756,7 @@ Get-AzServiceBusRule -ResourceGroupName myResourceGroup -NamespaceName myNamespa .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule .Notes COMPLEX PARAMETER PROPERTIES @@ -1692,7 +1765,49 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +SUBSCRIPTIONINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -1706,10 +1821,13 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusrule #> function Get-AzServiceBusRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentitySubscription', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityTopic', Mandatory)] [Alias('RuleName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -1740,6 +1858,8 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityTopic', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -1747,6 +1867,7 @@ param( ${SubscriptionName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -1757,9 +1878,26 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='GetViaIdentitySubscription', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${SubscriptionInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Query')] [System.Int32] @@ -1850,9 +1988,12 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusRule_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusRule_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusRule_GetViaIdentityNamespace'; + GetViaIdentitySubscription = 'Az.ServiceBus.private\Get-AzServiceBusRule_GetViaIdentitySubscription'; + GetViaIdentityTopic = 'Az.ServiceBus.private\Get-AzServiceBusRule_GetViaIdentityTopic'; List = 'Az.ServiceBus.private\Get-AzServiceBusRule_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1924,7 +2065,7 @@ Get-AzServiceBusSubscription -ResourceGroupName myResourceGroup -NamespaceName m .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription .Notes COMPLEX PARAMETER PROPERTIES @@ -1933,7 +2074,35 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -1945,12 +2114,18 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebussubscription +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639402.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639400.aspx #> function Get-AzServiceBusSubscription { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityTopic', Mandatory)] [Alias('SubscriptionName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -1981,6 +2156,7 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -1991,9 +2167,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Query')] [System.Int32] @@ -2084,9 +2271,11 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusSubscription_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusSubscription_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusSubscription_GetViaIdentityNamespace'; + GetViaIdentityTopic = 'Az.ServiceBus.private\Get-AzServiceBusSubscription_GetViaIdentityTopic'; List = 'Az.ServiceBus.private\Get-AzServiceBusSubscription_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -2158,7 +2347,7 @@ Get-AzServiceBusTopic -ResourceGroupName myResourceGroup -NamespaceName myNamesp .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic .Notes COMPLEX PARAMETER PROPERTIES @@ -2167,7 +2356,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -2179,12 +2382,17 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebustopic +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639399.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639388.aspx #> function Get-AzServiceBusTopic { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Alias('TopicName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -2218,9 +2426,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Query')] [System.Int32] @@ -2311,9 +2524,10 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusTopic_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusTopic_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusTopic_GetViaIdentityNamespace'; List = 'Az.ServiceBus.private\Get-AzServiceBusTopic_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -2374,19 +2588,45 @@ end { <# .Synopsis -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) .Description -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) .Example New-AzServiceBusGeoDRConfiguration -Name myAlias -ResourceGroupName myResourceGroup -NamespaceName myPrimaryNamespace -PartnerNamespace "/subscriptions/0000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/mySecondaryNamespace" +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +PARAMETER : Single item in List or Get Alias(Disaster Recovery configuration) operation + [AlternateName ]: Primary/Secondary eventhub namespace name, which is part of GEO DR pairing + [PartnerNamespace ]: ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusgeodrconfiguration #> function New-AzServiceBusGeoDRConfiguration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -2395,19 +2635,19 @@ param( # The Disaster Recovery configuration name ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -2415,18 +2655,33 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Primary/Secondary eventhub namespace name, which is part of GEO DR pairing ${AlternateName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing ${PartnerNamespace}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery] + # Single item in List or Get Alias(Disaster Recovery configuration) operation + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2509,8 +2764,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusGeoDRConfiguration_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusGeoDRConfiguration_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusGeoDRConfiguration_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -2571,21 +2828,63 @@ end { <# .Synopsis -Creates or updates a Service Bus queue. +Create a Service Bus queue. This operation is idempotent. .Description -Creates or updates a Service Bus queue. +Create a Service Bus queue. This operation is idempotent. .Example New-AzServiceBusQueue -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name myQueue -AutoDeleteOnIdle (New-TimeSpan -Days 1 -Minutes 3 -Seconds 4) -DefaultMessageTimeToLive (New-TimeSpan -Days 5) -EnablePartitioning +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +PARAMETER : Description of queue Resource. + [AutoDeleteOnIdle ]: ISO 8061 timeSpan idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes. + [DeadLetteringOnMessageExpiration ]: A value that indicates whether this queue has dead letter support when a message expires. + [DefaultMessageTimeToLive ]: ISO 8601 default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. + [DuplicateDetectionHistoryTimeWindow ]: ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. + [EnableBatchedOperations ]: Value that indicates whether server-side batched operations are enabled. + [EnableExpress ]: A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. + [EnablePartitioning ]: A value that indicates whether the queue is to be partitioned across multiple message brokers. + [ForwardDeadLetteredMessagesTo ]: Queue/Topic name to forward the Dead Letter message + [ForwardTo ]: Queue/Topic name to forward the messages + [LockDuration ]: ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute. + [MaxDeliveryCount ]: The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is 10. + [MaxMessageSizeInKilobytes ]: Maximum size (in KB) of the message payload that can be accepted by the queue. This property is only used in Premium today and default is 1024. + [MaxSizeInMegabytes ]: The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024. + [RequiresDuplicateDetection ]: A value indicating if this queue requires duplicate detection. + [RequiresSession ]: A value that indicates whether the queue supports the concept of sessions. + [Status ]: Enumerates the possible values for the status of a messaging entity. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusqueue +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639395.aspx #> function New-AzServiceBusQueue { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -2595,19 +2894,19 @@ param( # The queue name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -2615,72 +2914,90 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # Idle interval after which the queue is automatically deleted. # The minimum duration is 5 minutes. ${AutoDeleteOnIdle}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # A value that indicates whether this queue has dead letter support when a message expires. ${DeadLetteringOnMessageExpiration}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # This is the duration after which the message expires, starting from when the message is sent to Service Bus. # This is the default value used when TimeToLive is not set on a message itself. ${DefaultMessageTimeToLive}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # Defines the duration of the duplicate detection history. # The default value is 10 minutes. ${DuplicateDetectionHistoryTimeWindow}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether server-side batched operations are enabled. ${EnableBatchedOperations}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # A value that indicates whether Express Entities are enabled. # An express queue holds a message in memory temporarily before writing it to persistent storage. ${EnableExpress}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # A value that indicates whether the queue is to be partitioned across multiple message brokers. ${EnablePartitioning}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Queue/Topic name to forward the Dead Letter message ${ForwardDeadLetteredMessagesTo}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Queue/Topic name to forward the messages ${ForwardTo}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # Timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. # The maximum value for LockDuration is 5 minutes; the default value is 1 minute. ${LockDuration}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Int32] # The maximum delivery count. @@ -2688,39 +3005,50 @@ param( # default value is 10. ${MaxDeliveryCount}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Int64] # Maximum size (in KB) of the message payload that can be accepted by the queue. # This property is only used in Premium today and default is 1024. ${MaxMessageSizeInKilobytes}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Int32] # The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. # Default is 1024. ${MaxSizeInMegabytes}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # A value indicating if this queue requires duplicate detection. ${RequiresDuplicateDetection}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # A value that indicates whether the queue supports the concept of sessions. ${RequiresSession}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus] + [System.String] # Enumerates the possible values for the status of a messaging entity. ${Status}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue] + # Description of queue Resource. + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2797,8 +3125,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusQueue_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusQueue_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusQueue_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -2859,21 +3189,91 @@ end { <# .Synopsis -Creates a new rule and updates an existing rule +Create a new rule and updates an existing rule .Description -Creates a new rule and updates an existing rule +Create a new rule and updates an existing rule .Example New-AzServiceBusRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -SubscriptionName mySubscription -Name myCorrelationRule -FilterType CorrelationFilter -ContentType contenttype -CorrelationFilterProperty @{a='b';c='d'} -SessionId sessionid -CorrelationId correlationid -MessageId messageid -Label label -ReplyTo replyto -ReplyToSessionId replytosessionid .Example New-AzServiceBusRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -SubscriptionName mySubscription -Name mySqlRule -FilterType SqlFilter -SqlExpression 3=2 -ActionSqlExpression "SET a=b" +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +PARAMETER : Description of Rule Resource. + [ActionCompatibilityLevel ]: This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. + [ActionRequiresPreprocessing ]: Value that indicates whether the rule action requires preprocessing. + [ActionSqlExpression ]: SQL expression. e.g. MyProperty='ABC' + [ContentType ]: Content type of the message. + [CorrelationFilterProperty ]: dictionary object for custom filters + [(Any) ]: This indicates any property can be added to this object. + [CorrelationFilterRequiresPreprocessing ]: Value that indicates whether the rule action requires preprocessing. + [CorrelationId ]: Identifier of the correlation. + [FilterType ]: Filter type that is evaluated against a BrokeredMessage. + [Label ]: Application specific label. + [MessageId ]: Identifier of the message. + [ReplyTo ]: Address of the queue to reply to. + [ReplyToSessionId ]: Session identifier to reply to. + [SessionId ]: Session identifier. + [SqlExpression ]: The SQL expression. e.g. MyProperty='ABC' + [SqlFilterCompatibilityLevel ]: This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. + [SqlFilterRequiresPreprocessing ]: Value that indicates whether the rule action requires preprocessing. + [To ]: Address to send to. + +SUBSCRIPTIONINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusrule #> function New-AzServiceBusRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -2883,45 +3283,78 @@ param( # The rule name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. ${ResourceGroupName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Subscription credentials that uniquely identify a Microsoft Azure subscription. + # The subscription ID forms part of the URI for every service call. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityTopic', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The subscription name. ${SubscriptionName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The topic name. ${TopicName}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # Subscription credentials that uniquely identify a Microsoft Azure subscription. - # The subscription ID forms part of the URI for every service call. - ${SubscriptionId}, + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentitySubscription', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${SubscriptionInputObject}, + + [Parameter(ParameterSetName='CreateViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether the rule action requires preprocessing. ${ActionRequiresPreprocessing}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # SQL expression. @@ -2929,69 +3362,102 @@ param( # MyProperty='ABC' ${ActionSqlExpression}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Content type of the message. ${ContentType}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties]))] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties]))] [System.Collections.Hashtable] # dictionary object for custom filters ${CorrelationFilterProperty}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether the rule action requires preprocessing. ${CorrelationFilterRequiresPreprocessing}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Identifier of the correlation. ${CorrelationId}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SqlFilter", "CorrelationFilter")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType] + [System.String] # Filter type that is evaluated against a BrokeredMessage. ${FilterType}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Application specific label. ${Label}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Identifier of the message. ${MessageId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Address of the queue to reply to. ${ReplyTo}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Session identifier to reply to. ${ReplyToSessionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Session identifier. ${SessionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # The SQL expression. @@ -2999,18 +3465,32 @@ param( # MyProperty='ABC' ${SqlExpression}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether the rule action requires preprocessing. ${SqlFilterRequiresPreprocessing}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentitySubscriptionExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Address to send to. ${To}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentitySubscription', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule] + # Description of Rule Resource. + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3087,8 +3567,14 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusRule_CreateExpanded'; - } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusRule_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusRule_CreateViaIdentityNamespaceExpanded'; + CreateViaIdentitySubscription = 'Az.ServiceBus.private\New-AzServiceBusRule_CreateViaIdentitySubscription'; + CreateViaIdentitySubscriptionExpanded = 'Az.ServiceBus.private\New-AzServiceBusRule_CreateViaIdentitySubscriptionExpanded'; + CreateViaIdentityTopic = 'Az.ServiceBus.private\New-AzServiceBusRule_CreateViaIdentityTopic'; + CreateViaIdentityTopicExpanded = 'Az.ServiceBus.private\New-AzServiceBusRule_CreateViaIdentityTopicExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -3149,19 +3635,75 @@ end { <# .Synopsis -Creates a topic subscription. +Create a topic subscription. .Description -Creates a topic subscription. +Create a topic subscription. .Example New-AzServiceBusSubscription -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -Name mySubscription -DefaultMessageTimeToLive (New-TimeSpan -Days 6) -EnableBatchedOperations +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +PARAMETER : Description of subscription resource. + [AutoDeleteOnIdle ]: ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. + [ClientId ]: Indicates the Client ID of the application that created the client-affine subscription. + [DeadLetteringOnFilterEvaluationException ]: Value that indicates whether a subscription has dead letter support on filter evaluation exceptions. + [DeadLetteringOnMessageExpiration ]: Value that indicates whether a subscription has dead letter support when a message expires. + [DefaultMessageTimeToLive ]: ISO 8061 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. + [DuplicateDetectionHistoryTimeWindow ]: ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. + [EnableBatchedOperations ]: Value that indicates whether server-side batched operations are enabled. + [ForwardDeadLetteredMessagesTo ]: Queue/Topic name to forward the Dead Letter message + [ForwardTo ]: Queue/Topic name to forward the messages + [IsClientAffine ]: Value that indicates whether the subscription has an affinity to the client id. + [IsDurable ]: For client-affine subscriptions, this value indicates whether the subscription is durable or not. + [IsShared ]: For client-affine subscriptions, this value indicates whether the subscription is shared or not. + [LockDuration ]: ISO 8061 lock duration timespan for the subscription. The default value is 1 minute. + [MaxDeliveryCount ]: Number of maximum deliveries. + [RequiresSession ]: Value indicating if a subscription supports the concept of sessions. + [Status ]: Enumerates the possible values for the status of a messaging entity. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebussubscription +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx #> function New-AzServiceBusSubscription { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -3171,25 +3713,19 @@ param( # The subscription name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. - ${ResourceGroupName}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] - [System.String] - # The topic name. - ${TopicName}, + ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -3197,107 +3733,168 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [System.String] + # The topic name. + ${TopicName}, + + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # Idle interval after which the queue is automatically deleted. # The minimum duration is 5 minutes. ${AutoDeleteOnIdle}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Indicates the Client ID of the application that created the client-affine subscription. ${ClientId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether a subscription has dead letter support on filter evaluation exceptions. ${DeadLetteringOnFilterEvaluationException}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether a subscription has dead letter support when a message expires. ${DeadLetteringOnMessageExpiration}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # This is the duration after which the message expires, starting from when the message is sent to Service Bus. # This is the default value used when TimeToLive is not set on a message itself. ${DefaultMessageTimeToLive}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # Defines the duration of the duplicate detection history. # The default value is 10 minutes. ${DuplicateDetectionHistoryTimeWindow}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether server-side batched operations are enabled. ${EnableBatchedOperations}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Queue/Topic name to forward the Dead Letter message ${ForwardDeadLetteredMessagesTo}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Queue/Topic name to forward the messages ${ForwardTo}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether the subscription has an affinity to the client id. ${IsClientAffine}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # For client-affine subscriptions, this value indicates whether the subscription is durable or not. ${IsDurable}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # For client-affine subscriptions, this value indicates whether the subscription is shared or not. ${IsShared}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # Timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. # The maximum value for LockDuration is 5 minutes; the default value is 1 minute. ${LockDuration}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Int32] # Number of maximum deliveries. ${MaxDeliveryCount}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value indicating if a subscription supports the concept of sessions. ${RequiresSession}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus] + [System.String] # Enumerates the possible values for the status of a messaging entity. ${Status}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription] + # Description of subscription resource. + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3374,8 +3971,12 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusSubscription_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusSubscription_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusSubscription_CreateViaIdentityNamespaceExpanded'; + CreateViaIdentityTopic = 'Az.ServiceBus.private\New-AzServiceBusSubscription_CreateViaIdentityTopic'; + CreateViaIdentityTopicExpanded = 'Az.ServiceBus.private\New-AzServiceBusSubscription_CreateViaIdentityTopicExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -3436,19 +4037,56 @@ end { <# .Synopsis -Creates a topic in the specified namespace. +Create a topic in the specified namespace. .Description -Creates a topic in the specified namespace. +Create a topic in the specified namespace. .Example New-AzServiceBusTopic -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name myTopic -DefaultMessageTimeToLive (New-TimeSpan -Days 18) -EnableBatchedOperations +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +PARAMETER : Description of topic resource. + [AutoDeleteOnIdle ]: ISO 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. + [DefaultMessageTimeToLive ]: ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. + [DuplicateDetectionHistoryTimeWindow ]: ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. + [EnableBatchedOperations ]: Value that indicates whether server-side batched operations are enabled. + [EnableExpress ]: Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage. + [EnablePartitioning ]: Value that indicates whether the topic to be partitioned across multiple message brokers is enabled. + [MaxMessageSizeInKilobytes ]: Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024. + [MaxSizeInMegabytes ]: Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024. + [RequiresDuplicateDetection ]: Value indicating if this topic requires duplicate detection. + [Status ]: Enumerates the possible values for the status of a messaging entity. + [SupportOrdering ]: Value that indicates whether the topic supports ordering. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebustopic +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx #> function New-AzServiceBusTopic { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -3458,19 +4096,19 @@ param( # The topic name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -3478,79 +4116,103 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # Idle interval after which the queue is automatically deleted. # The minimum duration is 5 minutes. ${AutoDeleteOnIdle}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # This is the duration after which the message expires, starting from when the message is sent to Service Bus. # This is the default value used when TimeToLive is not set on a message itself. ${DefaultMessageTimeToLive}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.TimeSpan] # Defines the duration of the duplicate detection history. # The default value is 10 minutes. ${DuplicateDetectionHistoryTimeWindow}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether server-side batched operations are enabled. ${EnableBatchedOperations}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether Express Entities are enabled. # An express topic holds a message in memory temporarily before writing it to persistent storage. ${EnableExpress}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether the topic to be partitioned across multiple message brokers is enabled. ${EnablePartitioning}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Int64] # Maximum size (in KB) of the message payload that can be accepted by the topic. # This property is only used in Premium today and default is 1024. ${MaxMessageSizeInKilobytes}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Int32] # Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. # Default is 1024. ${MaxSizeInMegabytes}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value indicating if this topic requires duplicate detection. ${RequiresDuplicateDetection}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus] + [System.String] # Enumerates the possible values for the status of a messaging entity. ${Status}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Value that indicates whether the topic supports ordering. ${SupportOrdering}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic] + # Description of topic resource. + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3627,8 +4289,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusTopic_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusTopic_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusTopic_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -3707,7 +4371,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -3725,6 +4403,7 @@ function Remove-AzServiceBusGeoDRConfiguration { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The Disaster Recovery configuration name @@ -3754,9 +4433,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3840,8 +4524,9 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusGeoDRConfiguration_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusGeoDRConfiguration_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusGeoDRConfiguration_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -3920,7 +4605,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -3961,7 +4646,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -4048,7 +4732,7 @@ begin { Delete = 'Az.ServiceBus.private\Remove-AzServiceBusMigration_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusMigration_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -4132,7 +4816,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -4144,6 +4828,8 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebusnamespace +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx #> function Remove-AzServiceBusNamespace { [Alias('Remove-AzServiceBusNamespaceV2')] @@ -4175,7 +4861,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -4274,7 +4959,7 @@ begin { Delete = 'Az.ServiceBus.private\Remove-AzServiceBusNamespace_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusNamespace_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -4353,7 +5038,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -4365,12 +5064,15 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebusprivateendpointconnection +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx #> function Remove-AzServiceBusPrivateEndpointConnection { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Alias('PrivateEndpointConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -4401,9 +5103,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4499,8 +5206,9 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusPrivateEndpointConnection_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusPrivateEndpointConnection_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusPrivateEndpointConnection_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -4579,7 +5287,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -4591,12 +5313,15 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebusqueue +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639411.aspx #> function Remove-AzServiceBusQueue { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Alias('QueueName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -4627,9 +5352,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4713,8 +5443,9 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusQueue_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusQueue_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusQueue_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -4793,7 +5524,49 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +SUBSCRIPTIONINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -4811,6 +5584,9 @@ function Remove-AzServiceBusRule { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentitySubscription', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityTopic', Mandatory)] [Alias('RuleName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -4838,12 +5614,15 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityTopic', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The subscription name. ${SubscriptionName}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The topic name. @@ -4853,9 +5632,26 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentitySubscription', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${SubscriptionInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4939,8 +5735,11 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusRule_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusRule_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusRule_DeleteViaIdentityNamespace'; + DeleteViaIdentitySubscription = 'Az.ServiceBus.private\Remove-AzServiceBusRule_DeleteViaIdentitySubscription'; + DeleteViaIdentityTopic = 'Az.ServiceBus.private\Remove-AzServiceBusRule_DeleteViaIdentityTopic'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -5019,7 +5818,35 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -5031,12 +5858,16 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebussubscription +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639381.aspx #> function Remove-AzServiceBusSubscription { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityTopic', Mandatory)] [Alias('SubscriptionName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -5064,6 +5895,7 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The topic name. @@ -5073,9 +5905,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -5159,8 +6002,10 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusSubscription_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusSubscription_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusSubscription_DeleteViaIdentityNamespace'; + DeleteViaIdentityTopic = 'Az.ServiceBus.private\Remove-AzServiceBusSubscription_DeleteViaIdentityTopic'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -5239,7 +6084,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -5251,12 +6110,15 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebustopic +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639404.aspx #> function Remove-AzServiceBusTopic { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Alias('TopicName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -5287,9 +6149,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -5373,8 +6240,9 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusTopic_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusTopic_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusTopic_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -5435,19 +6303,19 @@ end { <# .Synopsis -Creates Migration configuration and starts migration of entities from Standard to Premium namespace +Create Migration configuration and starts migration of entities from Standard to Premium namespace .Description -Creates Migration configuration and starts migration of entities from Standard to Premium namespace +Create Migration configuration and starts migration of entities from Standard to Premium namespace .Example Start-AzServiceBusMigration -ResourceGroupName myResourceGroup -NamespaceName myNamespace -PostMigrationName myStandardNamespace2 -TargetNamespace /subscriptions/subscriptionId/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/myPremiumNamespace .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties .Link https://learn.microsoft.com/powershell/module/az.servicebus/start-azservicebusmigration #> function Start-AzServiceBusMigration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -5571,7 +6439,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\Start-AzServiceBusMigration_CreateExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -5650,7 +6518,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -5691,7 +6559,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -5778,7 +6645,7 @@ begin { Revert = 'Az.ServiceBus.private\Stop-AzServiceBusMigration_Revert'; RevertViaIdentity = 'Az.ServiceBus.private\Stop-AzServiceBusMigration_RevertViaIdentity'; } - if (('Revert') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Revert') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -5851,16 +6718,16 @@ Approve-AzServiceBusPrivateEndpointConnection -InputObject $privateEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -5874,7 +6741,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/approve-azservicebusprivateendpointconnection #> function Approve-AzServiceBusPrivateEndpointConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false)] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -6006,7 +6873,7 @@ begin { SetExpanded = 'Az.ServiceBus.custom\Approve-AzServiceBusPrivateEndpointConnection'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Approve-AzServiceBusPrivateEndpointConnection'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -6079,16 +6946,16 @@ Deny-AzServiceBusPrivateEndpointConnection -InputObject $privateEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -6102,7 +6969,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/deny-azservicebusprivateendpointconnection #> function Deny-AzServiceBusPrivateEndpointConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false)] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -6234,7 +7101,7 @@ begin { SetExpanded = 'Az.ServiceBus.custom\Deny-AzServiceBusPrivateEndpointConnection'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Deny-AzServiceBusPrivateEndpointConnection'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -6308,16 +7175,16 @@ Get-AzServiceBusAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceN .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -6331,7 +7198,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusauthorizationrule #> function Get-AzServiceBusAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='GetExpandedNamespace', PositionalBinding=$false)] param( [Parameter(ParameterSetName='GetExpandedNamespace', Mandatory)] @@ -6478,7 +7345,7 @@ begin { GetExpandedQueue = 'Az.ServiceBus.custom\Get-AzServiceBusAuthorizationRule'; GetViaIdentityExpanded = 'Az.ServiceBus.custom\Get-AzServiceBusAuthorizationRule'; } - if (('GetExpandedNamespace', 'GetExpandedAlias', 'GetExpandedTopic', 'GetExpandedQueue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('GetExpandedNamespace', 'GetExpandedAlias', 'GetExpandedTopic', 'GetExpandedQueue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -6550,12 +7417,12 @@ Get-AzServiceBusKey -ResourceGroupName myResourceGroup -NamespaceName myNamespac Get-AzServiceBusKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName topic1 -Name RootManageSharedAccessKey .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebuskey #> function Get-AzServiceBusKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='GetExpandedNamespace', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -6694,7 +7561,7 @@ begin { GetExpandedTopic = 'Az.ServiceBus.custom\Get-AzServiceBusKey'; GetExpandedQueue = 'Az.ServiceBus.custom\Get-AzServiceBusKey'; } - if (('GetExpandedNamespace', 'GetExpandedAlias', 'GetExpandedTopic', 'GetExpandedQueue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('GetExpandedNamespace', 'GetExpandedAlias', 'GetExpandedTopic', 'GetExpandedQueue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -6764,12 +7631,12 @@ New-AzServiceBusAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceN New-AzServiceBusAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -QueueName myQueue -Name myAuthRule -Rights @('Manage', 'Send', 'Listen') .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusauthorizationrule #> function New-AzServiceBusAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='NewExpandedNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -6813,7 +7680,7 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, @@ -6907,7 +7774,7 @@ begin { NewExpandedQueue = 'Az.ServiceBus.custom\New-AzServiceBusAuthorizationRule'; NewExpandedTopic = 'Az.ServiceBus.custom\New-AzServiceBusAuthorizationRule'; } - if (('NewExpandedNamespace', 'NewExpandedQueue', 'NewExpandedTopic') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('NewExpandedNamespace', 'NewExpandedQueue', 'NewExpandedTopic') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -6975,12 +7842,12 @@ Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzService New-AzServiceBusIPRuleConfig -IPMask 3.3.3.3 -Action Allow .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusipruleconfig #> function New-AzServiceBusIPRuleConfig { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -6991,7 +7858,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction] + [System.String] # The IP Filter Action ${Action} ) @@ -7087,12 +7954,12 @@ New-AzServiceBusKey -ResourceGroupName myResourceGroup -NamespaceName myNamespac New-AzServiceBusKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -Name rootmanagesharedaccesskey -KeyType SecondaryKey .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebuskey #> function New-AzServiceBusKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='NewExpandedNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -7137,7 +8004,7 @@ param( [Parameter(Mandatory)] [Alias('RegenerateKey')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType] + [System.String] # The access key to regenerate. ${KeyType}, @@ -7237,7 +8104,7 @@ begin { NewExpandedTopic = 'Az.ServiceBus.custom\New-AzServiceBusKey'; NewExpandedQueue = 'Az.ServiceBus.custom\New-AzServiceBusKey'; } - if (('NewExpandedNamespace', 'NewExpandedTopic', 'NewExpandedQueue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('NewExpandedNamespace', 'NewExpandedTopic', 'NewExpandedQueue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -7308,12 +8175,12 @@ $ec1 = "/subscriptions/0000000000000/resourceGroups/myResourceGroup/providers/Mi New-AzServiceBusKeyVaultPropertiesObject -KeyName key4 -KeyVaultUri https://testkeyvault.vault.azure.net/ -UserAssignedIdentity $ec1 .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultProperties +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultProperties .Link -https://learn.microsoft.com/powershell/module/Az.ServiceBus/new-AzServiceBusKeyVaultPropertiesObject +https://learn.microsoft.com/powershell/module/Az.ServiceBus/new-azservicebuskeyvaultpropertiesobject #> function New-AzServiceBusKeyVaultPropertiesObject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultProperties])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultProperties])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter()] @@ -7436,7 +8303,7 @@ New-AzServiceBusNamespace -ResourceGroupName myResourceGroup -Name myNamespace - New-AzServiceBusNamespace -ResourceGroupName myResourceGroup -Name myNamespace -SkuName Standard -Location southcentralus -Tag @{k1='v1'; k2='v2'} -DisableLocalAuth .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace .Notes COMPLEX PARAMETER PROPERTIES @@ -7452,7 +8319,7 @@ https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusname #> function New-AzServiceBusNamespace { [Alias('New-AzServiceBusNamespaceV2')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace])] [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -7494,9 +8361,8 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties[]] # Properties of KeyVault - # To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ${KeyVaultProperty}, [Parameter()] @@ -7515,7 +8381,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity. ${IdentityType}, @@ -7540,14 +8406,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. ${PublicNetworkAccess}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName] + [System.String] # Name of this SKU. ${SkuName}, @@ -7652,7 +8518,7 @@ begin { $mapping = @{ __AllParameterSets = 'Az.ServiceBus.custom\New-AzServiceBusNamespace'; } - if (('__AllParameterSets') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('__AllParameterSets') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -7720,12 +8586,12 @@ Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzService New-AzServiceBusVirtualNetworkRuleConfig -SubnetId /subscriptions/subscriptionId/resourcegroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/default .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusvirtualnetworkruleconfig #> function New-AzServiceBusVirtualNetworkRuleConfig { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -7832,16 +8698,16 @@ Remove-AzServiceBusAuthorizationRule -ResourceGroupName myResourceGroup -Namespa .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -7855,7 +8721,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebusauthorizationrule #> function Remove-AzServiceBusAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='RemoveExpandedNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='RemoveExpandedNamespace', Mandatory)] @@ -8003,7 +8869,7 @@ begin { RemoveExpandedQueue = 'Az.ServiceBus.custom\Remove-AzServiceBusAuthorizationRule'; RemoveViaIdentityExpanded = 'Az.ServiceBus.custom\Remove-AzServiceBusAuthorizationRule'; } - if (('RemoveExpandedNamespace', 'RemoveExpandedTopic', 'RemoveExpandedQueue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('RemoveExpandedNamespace', 'RemoveExpandedTopic', 'RemoveExpandedQueue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -8075,16 +8941,16 @@ Set-AzServiceBusAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceN .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -8098,7 +8964,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/set-azservicebusauthorizationrule #> function Set-AzServiceBusAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='SetExpandedNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpandedNamespace', Mandatory)] @@ -8157,7 +9023,7 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, @@ -8252,7 +9118,7 @@ begin { SetExpandedTopic = 'Az.ServiceBus.custom\Set-AzServiceBusAuthorizationRule'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusAuthorizationRule'; } - if (('SetExpandedNamespace', 'SetExpandedQueue', 'SetExpandedTopic') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpandedNamespace', 'SetExpandedQueue', 'SetExpandedTopic') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -8328,10 +9194,10 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -8470,7 +9336,7 @@ begin { Break = 'Az.ServiceBus.custom\Set-AzServiceBusGeoDRConfigurationBreakPair'; BreakViaIdentity = 'Az.ServiceBus.custom\Set-AzServiceBusGeoDRConfigurationBreakPair'; } - if (('Break') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Break') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -8546,10 +9412,10 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -8688,7 +9554,7 @@ begin { Fail = 'Az.ServiceBus.custom\Set-AzServiceBusGeoDRConfigurationFailOver'; FailViaIdentity = 'Az.ServiceBus.custom\Set-AzServiceBusGeoDRConfigurationFailOver'; } - if (('Fail') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Fail') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -8773,16 +9639,16 @@ $serviceBusNamespace = New-AzServiceBusNamespace -ResourceGroupName myResourceGr $serviceBusNamespace = Set-AzServiceBusNamespace -ResourceGroupName myResourceGroup -Name myNamespace -IdentityType None -UserAssignedIdentityId @() .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -8803,7 +9669,7 @@ https://learn.microsoft.com/powershell/module/az.servicebus/set-azservicebusname #> function Set-AzServiceBusNamespace { [Alias('Set-AzServiceBusNamespaceV2')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -8846,9 +9712,8 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties[]] # Properties of KeyVault - # To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ${KeyVaultProperty}, [Parameter()] @@ -8859,7 +9724,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity. ${IdentityType}, @@ -8878,14 +9743,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. ${PublicNetworkAccess}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName] + [System.String] # Name of this SKU. ${SkuName}, @@ -8991,7 +9856,7 @@ begin { SetExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusNamespace'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusNamespace'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -9070,16 +9935,16 @@ Set-AzServiceBusNetworkRuleSet -ResourceGroupName myResourceGroup -NamespaceName .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -9091,7 +9956,7 @@ INPUTOBJECT : Identity parameter. [TopicName ]: The topic name. IPRULE : List of IpRules - [Action ]: The IP Filter Action + [Action ]: The IP Filter Action [IPMask ]: IP Mask VIRTUALNETWORKRULE : List of VirtualNetwork Rules @@ -9101,7 +9966,7 @@ VIRTUALNETWORKRULE : List of VirtualNetwork Rul https://learn.microsoft.com/powershell/module/az.servicebus/set-azservicebusnetworkruleset #> function Set-AzServiceBusNetworkRuleSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -9133,7 +9998,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess] + [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. @@ -9147,22 +10012,20 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction] + [System.String] # Default Action for Network Rule Set ${DefaultAction}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules[]] # List of IpRules - # To construct, see NOTES section for IPRULE properties and create a hash table. ${IPRule}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules[]] # List of VirtualNetwork Rules - # To construct, see NOTES section for VIRTUALNETWORKRULE properties and create a hash table. ${VirtualNetworkRule}, [Parameter()] @@ -9254,7 +10117,7 @@ begin { SetExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusNetworkRuleSet'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusNetworkRuleSet'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -9327,16 +10190,16 @@ Set-AzServiceBusQueue -InputObject $queue -AutoDeleteOnIdle (New-TimeSpan -Days .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -9350,7 +10213,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/set-azservicebusqueue #> function Set-AzServiceBusQueue { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -9472,9 +10335,8 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus] - # Maximum size (in KB) of the message payload that can be accepted by the queue. - # This property is only used in Premium today and default is 1024. + [System.String] + # Enumerates the possible values for the status of a messaging entity. ${Status}, [Parameter()] @@ -9566,7 +10428,7 @@ begin { SetExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusQueue'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusQueue'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -9639,16 +10501,16 @@ Set-AzServiceBusRule -InputObject $rule -SqlExpression 5=3 .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -9662,7 +10524,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/set-azservicebusrule #> function Set-AzServiceBusRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -9787,7 +10649,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType] + [System.String] # Filter type that is evaluated against a BrokeredMessage. ${FilterType}, @@ -9894,7 +10756,7 @@ begin { SetExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusRule'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusRule'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -9967,16 +10829,16 @@ Set-AzServiceBusSubscription -InputObject $subscription -DefaultMessageTimeToLiv .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -9990,7 +10852,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/set-azservicebussubscription #> function Set-AzServiceBusSubscription { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -10070,7 +10932,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus] + [System.String] # Enumerates the possible values for the status of a messaging entity. ${Status}, @@ -10195,7 +11057,7 @@ begin { SetExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusSubscription'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusSubscription'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -10268,16 +11130,16 @@ Set-AzServiceBusTopic -InputObject $topic -DefaultMessageTimeToLive (New-TimeSpa .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -10291,7 +11153,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/set-azservicebustopic #> function Set-AzServiceBusTopic { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -10386,9 +11248,8 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus] - # Maximum size (in KB) of the message payload that can be accepted by the topic. - # This property is only used in Premium today and default is 1024. + [System.String] + # Enumerates the possible values for the status of a messaging entity. ${Status}, [Parameter()] @@ -10480,7 +11341,7 @@ begin { SetExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusTopic'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusTopic'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -10550,12 +11411,12 @@ Test-AzServiceBusName -NamespaceName myNamespace Test-AzServiceBusName -NamespaceName myNamespace -ResourceGroupName myResourceGroup -AliasName myAlias .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult .Link https://learn.microsoft.com/powershell/module/az.servicebus/test-azservicebusname #> function Test-AzServiceBusName { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult])] [CmdletBinding(DefaultParameterSetName='NamespaceAvailability', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -10672,7 +11533,7 @@ begin { NamespaceAvailability = 'Az.ServiceBus.custom\Test-AzServiceBusName'; AliasAvailability = 'Az.ServiceBus.custom\Test-AzServiceBusName'; } - if (('NamespaceAvailability', 'AliasAvailability') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('NamespaceAvailability', 'AliasAvailability') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusAuthorizationRule.ps1 index ca9658149e8d..8cfd3a60bff7 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusAuthorizationRule.ps1 @@ -27,16 +27,16 @@ Remove-AzServiceBusAuthorizationRule -ResourceGroupName myResourceGroup -Namespa .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -50,7 +50,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebusauthorizationrule #> function Remove-AzServiceBusAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='RemoveExpandedNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='RemoveExpandedNamespace', Mandatory)] @@ -198,7 +198,7 @@ begin { RemoveExpandedQueue = 'Az.ServiceBus.custom\Remove-AzServiceBusAuthorizationRule'; RemoveViaIdentityExpanded = 'Az.ServiceBus.custom\Remove-AzServiceBusAuthorizationRule'; } - if (('RemoveExpandedNamespace', 'RemoveExpandedTopic', 'RemoveExpandedQueue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('RemoveExpandedNamespace', 'RemoveExpandedTopic', 'RemoveExpandedQueue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusGeoDRConfiguration.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusGeoDRConfiguration.ps1 index 3acf798fa900..1c89d8a72ddc 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusGeoDRConfiguration.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusGeoDRConfiguration.ps1 @@ -34,7 +34,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -52,6 +66,7 @@ function Remove-AzServiceBusGeoDRConfiguration { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The Disaster Recovery configuration name @@ -81,9 +96,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -167,8 +187,9 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusGeoDRConfiguration_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusGeoDRConfiguration_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusGeoDRConfiguration_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusMigration.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusMigration.ps1 index 8d30a2af09c5..3aa13c8a62a6 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusMigration.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusMigration.ps1 @@ -34,7 +34,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -75,7 +75,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -162,7 +161,7 @@ begin { Delete = 'Az.ServiceBus.private\Remove-AzServiceBusMigration_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusMigration_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusNamespace.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusNamespace.ps1 index 61f01fec3d1f..85c70b9db57f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusNamespace.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusNamespace.ps1 @@ -39,7 +39,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -51,6 +51,8 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebusnamespace +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx #> function Remove-AzServiceBusNamespace { [Alias('Remove-AzServiceBusNamespaceV2')] @@ -82,7 +84,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -181,7 +182,7 @@ begin { Delete = 'Az.ServiceBus.private\Remove-AzServiceBusNamespace_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusNamespace_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusPrivateEndpointConnection.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusPrivateEndpointConnection.ps1 index 5f8d38cc8a32..33c810825d76 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusPrivateEndpointConnection.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusPrivateEndpointConnection.ps1 @@ -34,7 +34,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -46,12 +60,15 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebusprivateendpointconnection +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx #> function Remove-AzServiceBusPrivateEndpointConnection { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Alias('PrivateEndpointConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -82,9 +99,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -180,8 +202,9 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusPrivateEndpointConnection_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusPrivateEndpointConnection_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusPrivateEndpointConnection_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusQueue.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusQueue.ps1 index e48228294ece..c26d70cd0a15 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusQueue.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusQueue.ps1 @@ -34,7 +34,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -46,12 +60,15 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebusqueue +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639411.aspx #> function Remove-AzServiceBusQueue { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Alias('QueueName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -82,9 +99,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -168,8 +190,9 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusQueue_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusQueue_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusQueue_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusRule.ps1 index 59f15e6930b1..780f369871b9 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusRule.ps1 @@ -34,7 +34,49 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +SUBSCRIPTIONINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -52,6 +94,9 @@ function Remove-AzServiceBusRule { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentitySubscription', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityTopic', Mandatory)] [Alias('RuleName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -79,12 +124,15 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityTopic', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The subscription name. ${SubscriptionName}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The topic name. @@ -94,9 +142,26 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentitySubscription', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${SubscriptionInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -180,8 +245,11 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusRule_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusRule_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusRule_DeleteViaIdentityNamespace'; + DeleteViaIdentitySubscription = 'Az.ServiceBus.private\Remove-AzServiceBusRule_DeleteViaIdentitySubscription'; + DeleteViaIdentityTopic = 'Az.ServiceBus.private\Remove-AzServiceBusRule_DeleteViaIdentityTopic'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusSubscription.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusSubscription.ps1 index 21d49e038882..e2ee786622d5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusSubscription.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusSubscription.ps1 @@ -34,7 +34,35 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -46,12 +74,16 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebussubscription +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639381.aspx #> function Remove-AzServiceBusSubscription { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityTopic', Mandatory)] [Alias('SubscriptionName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -79,6 +111,7 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The topic name. @@ -88,9 +121,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -174,8 +218,10 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusSubscription_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusSubscription_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusSubscription_DeleteViaIdentityNamespace'; + DeleteViaIdentityTopic = 'Az.ServiceBus.private\Remove-AzServiceBusSubscription_DeleteViaIdentityTopic'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusTopic.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusTopic.ps1 index 0e6e046039a4..1485b2b7ca00 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusTopic.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Remove-AzServiceBusTopic.ps1 @@ -34,7 +34,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -46,12 +60,15 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebustopic +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639404.aspx #> function Remove-AzServiceBusTopic { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Alias('TopicName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -82,9 +99,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -168,8 +190,9 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusTopic_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusTopic_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusTopic_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusAuthorizationRule.ps1 index 34af55661614..9e2f12aeb591 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusAuthorizationRule.ps1 @@ -27,16 +27,16 @@ Set-AzServiceBusAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceN .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -50,7 +50,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/set-azservicebusauthorizationrule #> function Set-AzServiceBusAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='SetExpandedNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpandedNamespace', Mandatory)] @@ -109,7 +109,7 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, @@ -204,7 +204,7 @@ begin { SetExpandedTopic = 'Az.ServiceBus.custom\Set-AzServiceBusAuthorizationRule'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusAuthorizationRule'; } - if (('SetExpandedNamespace', 'SetExpandedQueue', 'SetExpandedTopic') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpandedNamespace', 'SetExpandedQueue', 'SetExpandedTopic') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusGeoDRConfigurationBreakPair.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusGeoDRConfigurationBreakPair.ps1 index b14ae5fa4943..7b727a1d1d16 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusGeoDRConfigurationBreakPair.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusGeoDRConfigurationBreakPair.ps1 @@ -31,10 +31,10 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -173,7 +173,7 @@ begin { Break = 'Az.ServiceBus.custom\Set-AzServiceBusGeoDRConfigurationBreakPair'; BreakViaIdentity = 'Az.ServiceBus.custom\Set-AzServiceBusGeoDRConfigurationBreakPair'; } - if (('Break') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Break') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusGeoDRConfigurationFailOver.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusGeoDRConfigurationFailOver.ps1 index 1eb7fbeac0bf..b6dfe9c28f4d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusGeoDRConfigurationFailOver.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusGeoDRConfigurationFailOver.ps1 @@ -31,10 +31,10 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -173,7 +173,7 @@ begin { Fail = 'Az.ServiceBus.custom\Set-AzServiceBusGeoDRConfigurationFailOver'; FailViaIdentity = 'Az.ServiceBus.custom\Set-AzServiceBusGeoDRConfigurationFailOver'; } - if (('Fail') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Fail') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusNamespace.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusNamespace.ps1 index 548ce5c5e439..9336087ff12a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusNamespace.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusNamespace.ps1 @@ -40,16 +40,16 @@ $serviceBusNamespace = New-AzServiceBusNamespace -ResourceGroupName myResourceGr $serviceBusNamespace = Set-AzServiceBusNamespace -ResourceGroupName myResourceGroup -Name myNamespace -IdentityType None -UserAssignedIdentityId @() .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -70,7 +70,7 @@ https://learn.microsoft.com/powershell/module/az.servicebus/set-azservicebusname #> function Set-AzServiceBusNamespace { [Alias('Set-AzServiceBusNamespaceV2')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -113,9 +113,8 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties[]] # Properties of KeyVault - # To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ${KeyVaultProperty}, [Parameter()] @@ -126,7 +125,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity. ${IdentityType}, @@ -145,14 +144,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. ${PublicNetworkAccess}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName] + [System.String] # Name of this SKU. ${SkuName}, @@ -258,7 +257,7 @@ begin { SetExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusNamespace'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusNamespace'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusNetworkRuleSet.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusNetworkRuleSet.ps1 index d9b9d1c79080..0a0472e8f950 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusNetworkRuleSet.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusNetworkRuleSet.ps1 @@ -34,16 +34,16 @@ Set-AzServiceBusNetworkRuleSet -ResourceGroupName myResourceGroup -NamespaceName .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -55,7 +55,7 @@ INPUTOBJECT : Identity parameter. [TopicName ]: The topic name. IPRULE : List of IpRules - [Action ]: The IP Filter Action + [Action ]: The IP Filter Action [IPMask ]: IP Mask VIRTUALNETWORKRULE : List of VirtualNetwork Rules @@ -65,7 +65,7 @@ VIRTUALNETWORKRULE : List of VirtualNetwork Rul https://learn.microsoft.com/powershell/module/az.servicebus/set-azservicebusnetworkruleset #> function Set-AzServiceBusNetworkRuleSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -97,7 +97,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess] + [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. @@ -111,22 +111,20 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction] + [System.String] # Default Action for Network Rule Set ${DefaultAction}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules[]] # List of IpRules - # To construct, see NOTES section for IPRULE properties and create a hash table. ${IPRule}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules[]] # List of VirtualNetwork Rules - # To construct, see NOTES section for VIRTUALNETWORKRULE properties and create a hash table. ${VirtualNetworkRule}, [Parameter()] @@ -218,7 +216,7 @@ begin { SetExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusNetworkRuleSet'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusNetworkRuleSet'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusQueue.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusQueue.ps1 index c9f430c61231..dd9e4abf575b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusQueue.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusQueue.ps1 @@ -28,16 +28,16 @@ Set-AzServiceBusQueue -InputObject $queue -AutoDeleteOnIdle (New-TimeSpan -Days .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -51,7 +51,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/set-azservicebusqueue #> function Set-AzServiceBusQueue { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -173,9 +173,8 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus] - # Maximum size (in KB) of the message payload that can be accepted by the queue. - # This property is only used in Premium today and default is 1024. + [System.String] + # Enumerates the possible values for the status of a messaging entity. ${Status}, [Parameter()] @@ -267,7 +266,7 @@ begin { SetExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusQueue'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusQueue'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusRule.ps1 index 667da8e2d1c4..23ea1bc69e16 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusRule.ps1 @@ -28,16 +28,16 @@ Set-AzServiceBusRule -InputObject $rule -SqlExpression 5=3 .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -51,7 +51,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/set-azservicebusrule #> function Set-AzServiceBusRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -176,7 +176,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType] + [System.String] # Filter type that is evaluated against a BrokeredMessage. ${FilterType}, @@ -283,7 +283,7 @@ begin { SetExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusRule'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusRule'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusSubscription.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusSubscription.ps1 index 51a827160e22..18f822311030 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusSubscription.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusSubscription.ps1 @@ -28,16 +28,16 @@ Set-AzServiceBusSubscription -InputObject $subscription -DefaultMessageTimeToLiv .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -51,7 +51,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/set-azservicebussubscription #> function Set-AzServiceBusSubscription { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -131,7 +131,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus] + [System.String] # Enumerates the possible values for the status of a messaging entity. ${Status}, @@ -256,7 +256,7 @@ begin { SetExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusSubscription'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusSubscription'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusTopic.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusTopic.ps1 index 82bc9f04d82b..89afdb21da14 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusTopic.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Set-AzServiceBusTopic.ps1 @@ -28,16 +28,16 @@ Set-AzServiceBusTopic -InputObject $topic -DefaultMessageTimeToLive (New-TimeSpa .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -51,7 +51,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.servicebus/set-azservicebustopic #> function Set-AzServiceBusTopic { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -146,9 +146,8 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus] - # Maximum size (in KB) of the message payload that can be accepted by the topic. - # This property is only used in Premium today and default is 1024. + [System.String] + # Enumerates the possible values for the status of a messaging entity. ${Status}, [Parameter()] @@ -240,7 +239,7 @@ begin { SetExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusTopic'; SetViaIdentityExpanded = 'Az.ServiceBus.custom\Set-AzServiceBusTopic'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Start-AzServiceBusMigration.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Start-AzServiceBusMigration.ps1 index 4ad93606a7b7..6f11f4b46d80 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Start-AzServiceBusMigration.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Start-AzServiceBusMigration.ps1 @@ -16,19 +16,19 @@ <# .Synopsis -Creates Migration configuration and starts migration of entities from Standard to Premium namespace +Create Migration configuration and starts migration of entities from Standard to Premium namespace .Description -Creates Migration configuration and starts migration of entities from Standard to Premium namespace +Create Migration configuration and starts migration of entities from Standard to Premium namespace .Example Start-AzServiceBusMigration -ResourceGroupName myResourceGroup -NamespaceName myNamespace -PostMigrationName myStandardNamespace2 -TargetNamespace /subscriptions/subscriptionId/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/myPremiumNamespace .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties .Link https://learn.microsoft.com/powershell/module/az.servicebus/start-azservicebusmigration #> function Start-AzServiceBusMigration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -152,7 +152,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\Start-AzServiceBusMigration_CreateExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Stop-AzServiceBusMigration.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Stop-AzServiceBusMigration.ps1 index a1fef9a101d5..18e3843dc518 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Stop-AzServiceBusMigration.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Stop-AzServiceBusMigration.ps1 @@ -34,7 +34,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -75,7 +75,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -162,7 +161,7 @@ begin { Revert = 'Az.ServiceBus.private\Stop-AzServiceBusMigration_Revert'; RevertViaIdentity = 'Az.ServiceBus.private\Stop-AzServiceBusMigration_RevertViaIdentity'; } - if (('Revert') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Revert') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/exports/Test-AzServiceBusName.ps1 b/src/ServiceBus/ServiceBus.Autorest/exports/Test-AzServiceBusName.ps1 index c8d13edb8811..c44a765e2f02 100644 --- a/src/ServiceBus/ServiceBus.Autorest/exports/Test-AzServiceBusName.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/exports/Test-AzServiceBusName.ps1 @@ -25,12 +25,12 @@ Test-AzServiceBusName -NamespaceName myNamespace Test-AzServiceBusName -NamespaceName myNamespace -ResourceGroupName myResourceGroup -AliasName myAlias .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult .Link https://learn.microsoft.com/powershell/module/az.servicebus/test-azservicebusname #> function Test-AzServiceBusName { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult])] [CmdletBinding(DefaultParameterSetName='NamespaceAvailability', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -147,7 +147,7 @@ begin { NamespaceAvailability = 'Az.ServiceBus.custom\Test-AzServiceBusName'; AliasAvailability = 'Az.ServiceBus.custom\Test-AzServiceBusName'; } - if (('NamespaceAvailability', 'AliasAvailability') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('NamespaceAvailability', 'AliasAvailability') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generate-help.ps1 b/src/ServiceBus/ServiceBus.Autorest/generate-help.ps1 index 4b6430d983bb..fca61a699dba 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generate-help.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/generate-help.ps1 @@ -12,13 +12,13 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$Isolated) +param([switch]$NotIsolated) $ErrorActionPreference = 'Stop' $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path -if(-not $Isolated) { +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' - & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } diff --git a/src/ServiceBus/ServiceBus.Autorest/generate-portal-ux.ps1 b/src/ServiceBus/ServiceBus.Autorest/generate-portal-ux.ps1 index 79c8af0cdcab..c709151c4999 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generate-portal-ux.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/generate-portal-ux.ps1 @@ -15,13 +15,13 @@ # This Script will create a folder dedicated to Azure-specific content and includes metadata files essential for enhancing the user experience (UX) within the Azure portal. # These files are utilized by the Azure portal to effectively present the usage of cmdlets related to specific resources on portal pages. # ---------------------------------------------------------------------------------- -param([switch]$Isolated) +param([switch]$NotIsolated) $ErrorActionPreference = 'Stop' $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path -if(-not $Isolated) { +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' - & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } @@ -42,8 +42,6 @@ $instance = [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module]::Instance $moduleInfo = Get-Module -Name $moduleName $parameterSetsInfo = Get-Module -Name "$moduleName.private" -$buildinFunctions = @("Export-CmdletSurface", "Export-ExampleStub", "Export-FormatPs1xml", "Export-HelpMarkdown", "Export-ModelSurface", "Export-ProxyCmdlet", "Export-Psd1", "Export-TestStub", "Get-CommonParameter", "Get-ModuleGuid", "Get-ScriptCmdlet") - function Test-FunctionSupported() { [CmdletBinding()] @@ -53,12 +51,12 @@ function Test-FunctionSupported() $FunctionName ) - If ($buildinfunctions.Contains($FunctionName)) { + If (-not $FunctionName.Contains("_")) { return $false } $cmdletName, $parameterSetName = $FunctionName.Split("_") - If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity")) { + If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity") -or $parameterSetName.Contains("ViaJson")) { return $false } If ($cmdletName.StartsWith("New") -or $cmdletName.StartsWith("Set") -or $cmdletName.StartsWith("Update")) { @@ -79,6 +77,7 @@ function Test-FunctionSupported() $customFiles = Get-ChildItem -Path custom -Filter "$cmdletName.*" if ($customFiles.Length -ne 0) { + Write-Host -ForegroundColor Yellow "There are come custom files for $cmdletName, skip generate UX data for it." return $false } @@ -93,7 +92,7 @@ function Get-MappedCmdletFromFunctionName() [string] $FunctionName ) - + $cmdletName, $parameterSetName = $FunctionName.Split("_") return $cmdletName @@ -137,7 +136,7 @@ function Get-CmdletDescription() $CmdletName ) $helpInfo = Get-Help $CmdletName -Full - + $description = $helpInfo.Description.Text if ($null -eq $description) { @@ -161,7 +160,7 @@ function Test-ParameterFromSwagger() { return $false } - + $valideCategory = @('Path') if ($valideCategory -contains $category) { @@ -310,7 +309,7 @@ function New-MetadataForCmdlet() return $result } -$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-functionSupported($_) } +$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-FunctionSupported($_) } $resourceTypes = @{} foreach ($parameterSetName in $parameterSets) { @@ -372,4 +371,4 @@ foreach ($resourceType in $resourceTypes.Keys) } $resourceTypeInfo.Remove("provider") $resourceTypeInfo | ConvertTo-Json -Depth 10 | Out-File "$providerFolder/$resourceTypeFileName.json" -} \ No newline at end of file +} diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/Module.cs b/src/ServiceBus/ServiceBus.Autorest/generated/Module.cs index 0e5a810e45c4..b0d228946f9b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/Module.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/Module.cs @@ -28,12 +28,20 @@ public partial class Module public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler(); + private static bool _init = false; + + private static readonly global::System.Object _initLock = new global::System.Object(); + + private static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module _instance; + /// the ISendAsync pipeline instance private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline _pipeline; /// the ISendAsync pipeline instance (when proxy is enabled) private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline _pipelineWithProxy; + private static readonly global::System.Object _singletonLock = new global::System.Object(); + public bool _useProxy = false; public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy(); @@ -56,11 +64,8 @@ public partial class Module /// The delegate to get the telemetry info. public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } - /// Backing field for property. - private static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module _instance; - /// the singleton of this module class - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module()); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } } /// The Name of this module public string Name => @"Az.ServiceBus"; @@ -125,9 +130,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Create /// Initialization steps performed after the module is loaded. public void Init() { - OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); - OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); - CustomInit(); + if (_init == false) + { + lock (_initLock) { + if (_init == false) { + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); + CustomInit(); + _init = true; + } + } + } } /// Creates the module instance. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/AccessKeys.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/AccessKeys.PowerShell.cs similarity index 65% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/AccessKeys.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/AccessKeys.PowerShell.cs index f9a1bed7f6f9..45fb5426923b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/AccessKeys.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/AccessKeys.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AccessKeys partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,37 +78,37 @@ internal AccessKeys(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("PrimaryConnectionString")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).PrimaryConnectionString = (string) content.GetValueForProperty("PrimaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).PrimaryConnectionString, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).PrimaryConnectionString = (string) content.GetValueForProperty("PrimaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).PrimaryConnectionString, global::System.Convert.ToString); } if (content.Contains("SecondaryConnectionString")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).SecondaryConnectionString = (string) content.GetValueForProperty("SecondaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).SecondaryConnectionString, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).SecondaryConnectionString = (string) content.GetValueForProperty("SecondaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).SecondaryConnectionString, global::System.Convert.ToString); } if (content.Contains("AliasPrimaryConnectionString")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).AliasPrimaryConnectionString = (string) content.GetValueForProperty("AliasPrimaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).AliasPrimaryConnectionString, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).AliasPrimaryConnectionString = (string) content.GetValueForProperty("AliasPrimaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).AliasPrimaryConnectionString, global::System.Convert.ToString); } if (content.Contains("AliasSecondaryConnectionString")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).AliasSecondaryConnectionString = (string) content.GetValueForProperty("AliasSecondaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).AliasSecondaryConnectionString, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).AliasSecondaryConnectionString = (string) content.GetValueForProperty("AliasSecondaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).AliasSecondaryConnectionString, global::System.Convert.ToString); } if (content.Contains("PrimaryKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).PrimaryKey = (string) content.GetValueForProperty("PrimaryKey",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).PrimaryKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).PrimaryKey = (string) content.GetValueForProperty("PrimaryKey",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).PrimaryKey, global::System.Convert.ToString); } if (content.Contains("SecondaryKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).SecondaryKey = (string) content.GetValueForProperty("SecondaryKey",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).SecondaryKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).SecondaryKey = (string) content.GetValueForProperty("SecondaryKey",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).SecondaryKey, global::System.Convert.ToString); } if (content.Contains("KeyName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).KeyName = (string) content.GetValueForProperty("KeyName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).KeyName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).KeyName = (string) content.GetValueForProperty("KeyName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).KeyName, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -123,57 +123,57 @@ internal AccessKeys(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("PrimaryConnectionString")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).PrimaryConnectionString = (string) content.GetValueForProperty("PrimaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).PrimaryConnectionString, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).PrimaryConnectionString = (string) content.GetValueForProperty("PrimaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).PrimaryConnectionString, global::System.Convert.ToString); } if (content.Contains("SecondaryConnectionString")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).SecondaryConnectionString = (string) content.GetValueForProperty("SecondaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).SecondaryConnectionString, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).SecondaryConnectionString = (string) content.GetValueForProperty("SecondaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).SecondaryConnectionString, global::System.Convert.ToString); } if (content.Contains("AliasPrimaryConnectionString")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).AliasPrimaryConnectionString = (string) content.GetValueForProperty("AliasPrimaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).AliasPrimaryConnectionString, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).AliasPrimaryConnectionString = (string) content.GetValueForProperty("AliasPrimaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).AliasPrimaryConnectionString, global::System.Convert.ToString); } if (content.Contains("AliasSecondaryConnectionString")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).AliasSecondaryConnectionString = (string) content.GetValueForProperty("AliasSecondaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).AliasSecondaryConnectionString, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).AliasSecondaryConnectionString = (string) content.GetValueForProperty("AliasSecondaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).AliasSecondaryConnectionString, global::System.Convert.ToString); } if (content.Contains("PrimaryKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).PrimaryKey = (string) content.GetValueForProperty("PrimaryKey",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).PrimaryKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).PrimaryKey = (string) content.GetValueForProperty("PrimaryKey",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).PrimaryKey, global::System.Convert.ToString); } if (content.Contains("SecondaryKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).SecondaryKey = (string) content.GetValueForProperty("SecondaryKey",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).SecondaryKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).SecondaryKey = (string) content.GetValueForProperty("SecondaryKey",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).SecondaryKey, global::System.Convert.ToString); } if (content.Contains("KeyName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).KeyName = (string) content.GetValueForProperty("KeyName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal)this).KeyName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).KeyName = (string) content.GetValueForProperty("KeyName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal)this).KeyName, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AccessKeys(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AccessKeys(content); } @@ -183,7 +183,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/AccessKeys.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/AccessKeys.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/AccessKeys.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/AccessKeys.TypeConverter.cs index 10adb5299f9b..17826c745ca1 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/AccessKeys.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/AccessKeys.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/AccessKeys.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/AccessKeys.cs similarity index 85% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/AccessKeys.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/AccessKeys.cs index 23ba16511adc..d8671fb394b8 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/AccessKeys.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/AccessKeys.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Namespace/ServiceBus Connection String [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class AccessKeys : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal { /// Backing field for property. @@ -36,25 +36,25 @@ public partial class AccessKeys : public string KeyName { get => this._keyName; } /// Internal Acessors for AliasPrimaryConnectionString - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal.AliasPrimaryConnectionString { get => this._aliasPrimaryConnectionString; set { {_aliasPrimaryConnectionString = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal.AliasPrimaryConnectionString { get => this._aliasPrimaryConnectionString; set { {_aliasPrimaryConnectionString = value;} } } /// Internal Acessors for AliasSecondaryConnectionString - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal.AliasSecondaryConnectionString { get => this._aliasSecondaryConnectionString; set { {_aliasSecondaryConnectionString = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal.AliasSecondaryConnectionString { get => this._aliasSecondaryConnectionString; set { {_aliasSecondaryConnectionString = value;} } } /// Internal Acessors for KeyName - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal.KeyName { get => this._keyName; set { {_keyName = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal.KeyName { get => this._keyName; set { {_keyName = value;} } } /// Internal Acessors for PrimaryConnectionString - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal.PrimaryConnectionString { get => this._primaryConnectionString; set { {_primaryConnectionString = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal.PrimaryConnectionString { get => this._primaryConnectionString; set { {_primaryConnectionString = value;} } } /// Internal Acessors for PrimaryKey - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal.PrimaryKey { get => this._primaryKey; set { {_primaryKey = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal.PrimaryKey { get => this._primaryKey; set { {_primaryKey = value;} } } /// Internal Acessors for SecondaryConnectionString - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal.SecondaryConnectionString { get => this._secondaryConnectionString; set { {_secondaryConnectionString = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal.SecondaryConnectionString { get => this._secondaryConnectionString; set { {_secondaryConnectionString = value;} } } /// Internal Acessors for SecondaryKey - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeysInternal.SecondaryKey { get => this._secondaryKey; set { {_secondaryKey = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeysInternal.SecondaryKey { get => this._secondaryKey; set { {_secondaryKey = value;} } } /// Backing field for property. private string _primaryConnectionString; @@ -98,6 +98,9 @@ public partial interface IAccessKeys : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Primary connection string of the alias if GEO DR is enabled", SerializedName = @"aliasPrimaryConnectionString", PossibleTypes = new [] { typeof(string) })] @@ -106,6 +109,9 @@ public partial interface IAccessKeys : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Secondary connection string of the alias if GEO DR is enabled", SerializedName = @"aliasSecondaryConnectionString", PossibleTypes = new [] { typeof(string) })] @@ -114,6 +120,9 @@ public partial interface IAccessKeys : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"A string that describes the authorization rule.", SerializedName = @"keyName", PossibleTypes = new [] { typeof(string) })] @@ -122,6 +131,9 @@ public partial interface IAccessKeys : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Primary connection string of the created namespace authorization rule.", SerializedName = @"primaryConnectionString", PossibleTypes = new [] { typeof(string) })] @@ -130,6 +142,9 @@ public partial interface IAccessKeys : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"A base64-encoded 256-bit primary key for signing and validating the SAS token.", SerializedName = @"primaryKey", PossibleTypes = new [] { typeof(string) })] @@ -138,6 +153,9 @@ public partial interface IAccessKeys : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Secondary connection string of the created namespace authorization rule.", SerializedName = @"secondaryConnectionString", PossibleTypes = new [] { typeof(string) })] @@ -146,6 +164,9 @@ public partial interface IAccessKeys : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"A base64-encoded 256-bit primary key for signing and validating the SAS token.", SerializedName = @"secondaryKey", PossibleTypes = new [] { typeof(string) })] diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/AccessKeys.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/AccessKeys.json.cs similarity index 90% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/AccessKeys.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/AccessKeys.json.cs index f9b778ae2dc6..7d6a55fdaa6b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/AccessKeys.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/AccessKeys.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -65,24 +65,24 @@ internal AccessKeys(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.J { return; } - {_primaryConnectionString = If( json?.PropertyT("primaryConnectionString"), out var __jsonPrimaryConnectionString) ? (string)__jsonPrimaryConnectionString : (string)PrimaryConnectionString;} - {_secondaryConnectionString = If( json?.PropertyT("secondaryConnectionString"), out var __jsonSecondaryConnectionString) ? (string)__jsonSecondaryConnectionString : (string)SecondaryConnectionString;} - {_aliasPrimaryConnectionString = If( json?.PropertyT("aliasPrimaryConnectionString"), out var __jsonAliasPrimaryConnectionString) ? (string)__jsonAliasPrimaryConnectionString : (string)AliasPrimaryConnectionString;} - {_aliasSecondaryConnectionString = If( json?.PropertyT("aliasSecondaryConnectionString"), out var __jsonAliasSecondaryConnectionString) ? (string)__jsonAliasSecondaryConnectionString : (string)AliasSecondaryConnectionString;} - {_primaryKey = If( json?.PropertyT("primaryKey"), out var __jsonPrimaryKey) ? (string)__jsonPrimaryKey : (string)PrimaryKey;} - {_secondaryKey = If( json?.PropertyT("secondaryKey"), out var __jsonSecondaryKey) ? (string)__jsonSecondaryKey : (string)SecondaryKey;} - {_keyName = If( json?.PropertyT("keyName"), out var __jsonKeyName) ? (string)__jsonKeyName : (string)KeyName;} + {_primaryConnectionString = If( json?.PropertyT("primaryConnectionString"), out var __jsonPrimaryConnectionString) ? (string)__jsonPrimaryConnectionString : (string)_primaryConnectionString;} + {_secondaryConnectionString = If( json?.PropertyT("secondaryConnectionString"), out var __jsonSecondaryConnectionString) ? (string)__jsonSecondaryConnectionString : (string)_secondaryConnectionString;} + {_aliasPrimaryConnectionString = If( json?.PropertyT("aliasPrimaryConnectionString"), out var __jsonAliasPrimaryConnectionString) ? (string)__jsonAliasPrimaryConnectionString : (string)_aliasPrimaryConnectionString;} + {_aliasSecondaryConnectionString = If( json?.PropertyT("aliasSecondaryConnectionString"), out var __jsonAliasSecondaryConnectionString) ? (string)__jsonAliasSecondaryConnectionString : (string)_aliasSecondaryConnectionString;} + {_primaryKey = If( json?.PropertyT("primaryKey"), out var __jsonPrimaryKey) ? (string)__jsonPrimaryKey : (string)_primaryKey;} + {_secondaryKey = If( json?.PropertyT("secondaryKey"), out var __jsonSecondaryKey) ? (string)__jsonSecondaryKey : (string)_secondaryKey;} + {_keyName = If( json?.PropertyT("keyName"), out var __jsonKeyName) ? (string)__jsonKeyName : (string)_keyName;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new AccessKeys(json) : null; } @@ -106,31 +106,31 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._primaryConnectionString)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._primaryConnectionString.ToString()) : null, "primaryConnectionString" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._secondaryConnectionString)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._secondaryConnectionString.ToString()) : null, "secondaryConnectionString" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._aliasPrimaryConnectionString)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._aliasPrimaryConnectionString.ToString()) : null, "aliasPrimaryConnectionString" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._aliasSecondaryConnectionString)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._aliasSecondaryConnectionString.ToString()) : null, "aliasSecondaryConnectionString" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._primaryKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._primaryKey.ToString()) : null, "primaryKey" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._secondaryKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._secondaryKey.ToString()) : null, "secondaryKey" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._keyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._keyName.ToString()) : null, "keyName" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Action.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Action.PowerShell.cs similarity index 76% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Action.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Action.PowerShell.cs index def678ee079b..6250203678f0 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Action.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Action.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -66,7 +66,7 @@ public partial class Action partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -81,21 +81,21 @@ internal Action(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("SqlExpression")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).SqlExpression = (string) content.GetValueForProperty("SqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).SqlExpression, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).SqlExpression = (string) content.GetValueForProperty("SqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).SqlExpression, global::System.Convert.ToString); } if (content.Contains("CompatibilityLevel")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).CompatibilityLevel = (int?) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).CompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).CompatibilityLevel = (int?) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).CompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("RequiresPreprocessing")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).RequiresPreprocessing = (bool?) content.GetValueForProperty("RequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).RequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).RequiresPreprocessing = (bool?) content.GetValueForProperty("RequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).RequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -110,41 +110,41 @@ internal Action(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("SqlExpression")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).SqlExpression = (string) content.GetValueForProperty("SqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).SqlExpression, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).SqlExpression = (string) content.GetValueForProperty("SqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).SqlExpression, global::System.Convert.ToString); } if (content.Contains("CompatibilityLevel")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).CompatibilityLevel = (int?) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).CompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).CompatibilityLevel = (int?) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).CompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("RequiresPreprocessing")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).RequiresPreprocessing = (bool?) content.GetValueForProperty("RequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).RequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).RequiresPreprocessing = (bool?) content.GetValueForProperty("RequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).RequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Action(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Action(content); } @@ -154,7 +154,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Action.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Action.TypeConverter.cs similarity index 97% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Action.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Action.TypeConverter.cs index 3723ceb28b1d..2a0fff62a212 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Action.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Action.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Action.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Action.cs similarity index 91% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Action.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Action.cs index f2abfdbe57cf..438642c1767d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Action.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Action.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -13,8 +13,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Previe /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class Action : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal { /// Backing field for property. @@ -57,6 +57,9 @@ public partial interface IAction : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.", SerializedName = @"compatibilityLevel", PossibleTypes = new [] { typeof(int) })] @@ -65,6 +68,9 @@ public partial interface IAction : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether the rule action requires preprocessing.", SerializedName = @"requiresPreprocessing", PossibleTypes = new [] { typeof(bool) })] @@ -73,6 +79,9 @@ public partial interface IAction : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"SQL expression. e.g. MyProperty='ABC'", SerializedName = @"sqlExpression", PossibleTypes = new [] { typeof(string) })] diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Action.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Action.json.cs similarity index 92% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Action.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Action.json.cs index 46b9b6960ab7..f1894ba688d5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Action.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Action.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -68,20 +68,18 @@ internal Action(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonO { return; } - {_sqlExpression = If( json?.PropertyT("sqlExpression"), out var __jsonSqlExpression) ? (string)__jsonSqlExpression : (string)SqlExpression;} - {_compatibilityLevel = If( json?.PropertyT("compatibilityLevel"), out var __jsonCompatibilityLevel) ? (int?)__jsonCompatibilityLevel : CompatibilityLevel;} - {_requiresPreprocessing = If( json?.PropertyT("requiresPreprocessing"), out var __jsonRequiresPreprocessing) ? (bool?)__jsonRequiresPreprocessing : RequiresPreprocessing;} + {_sqlExpression = If( json?.PropertyT("sqlExpression"), out var __jsonSqlExpression) ? (string)__jsonSqlExpression : (string)_sqlExpression;} + {_compatibilityLevel = If( json?.PropertyT("compatibilityLevel"), out var __jsonCompatibilityLevel) ? (int?)__jsonCompatibilityLevel : _compatibilityLevel;} + {_requiresPreprocessing = If( json?.PropertyT("requiresPreprocessing"), out var __jsonRequiresPreprocessing) ? (bool?)__jsonRequiresPreprocessing : _requiresPreprocessing;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new Action(json) : null; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Any.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Any.PowerShell.cs index da2b0a379d05..9e768634d270 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Any.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Any.PowerShell.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - /// Any object + /// Anything [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] public partial class Any { @@ -146,7 +146,7 @@ public override string ToString() return ToJsonString(); } } - /// Any object + /// Anything [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] public partial interface IAny diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Any.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Any.cs index 212c1ccfd77d..bd6a390f946c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Any.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Any.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; - /// Any object + /// Anything public partial class Any : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAny, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAnyInternal @@ -19,13 +19,13 @@ public Any() } } - /// Any object + /// Anything public partial interface IAny : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable { } - /// Any object + /// Anything internal partial interface IAnyInternal { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Any.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Any.json.cs index 617c8a5f047c..0a4ea62d43fc 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Any.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Any.json.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; - /// Any object + /// Anything public partial class Any { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecovery.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecovery.PowerShell.cs deleted file mode 100644 index bb53e7410dfa..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecovery.PowerShell.cs +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - - /// Single item in List or Get Alias(Disaster Recovery configuration) operation - [System.ComponentModel.TypeConverter(typeof(ArmDisasterRecoveryTypeConverter))] - public partial class ArmDisasterRecovery - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ArmDisasterRecovery(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ArmDisasterRecoveryPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr.CreateFrom); - } - if (content.Contains("PendingReplicationOperationsCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("PartnerNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).PartnerNamespace = (string) content.GetValueForProperty("PartnerNamespace",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).PartnerNamespace, global::System.Convert.ToString); - } - if (content.Contains("AlternateName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).AlternateName, global::System.Convert.ToString); - } - if (content.Contains("Role")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery.CreateFrom); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ArmDisasterRecovery(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ArmDisasterRecoveryPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr.CreateFrom); - } - if (content.Contains("PendingReplicationOperationsCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("PartnerNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).PartnerNamespace = (string) content.GetValueForProperty("PartnerNamespace",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).PartnerNamespace, global::System.Convert.ToString); - } - if (content.Contains("AlternateName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).AlternateName, global::System.Convert.ToString); - } - if (content.Contains("Role")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery.CreateFrom); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ArmDisasterRecovery(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ArmDisasterRecovery(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Single item in List or Get Alias(Disaster Recovery configuration) operation - [System.ComponentModel.TypeConverter(typeof(ArmDisasterRecoveryTypeConverter))] - public partial interface IArmDisasterRecovery - - { - - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigProperties.PowerShell.cs deleted file mode 100644 index aaec0f99dc6a..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigProperties.PowerShell.cs +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - - /// Single item in List or Get Migration Config operation - [System.ComponentModel.TypeConverter(typeof(MigrationConfigPropertiesTypeConverter))] - public partial class MigrationConfigProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new MigrationConfigProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new MigrationConfigProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal MigrationConfigProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGenerated) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.MigrationConfigPropertiesAutoGeneratedTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("PendingReplicationOperationsCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("TargetNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).TargetNamespace = (string) content.GetValueForProperty("TargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).TargetNamespace, global::System.Convert.ToString); - } - if (content.Contains("PostMigrationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).PostMigrationName = (string) content.GetValueForProperty("PostMigrationName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).PostMigrationName, global::System.Convert.ToString); - } - if (content.Contains("MigrationState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).MigrationState = (string) content.GetValueForProperty("MigrationState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).MigrationState, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal MigrationConfigProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGenerated) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.MigrationConfigPropertiesAutoGeneratedTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("PendingReplicationOperationsCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("TargetNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).TargetNamespace = (string) content.GetValueForProperty("TargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).TargetNamespace, global::System.Convert.ToString); - } - if (content.Contains("PostMigrationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).PostMigrationName = (string) content.GetValueForProperty("PostMigrationName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).PostMigrationName, global::System.Convert.ToString); - } - if (content.Contains("MigrationState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).MigrationState = (string) content.GetValueForProperty("MigrationState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).MigrationState, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Single item in List or Get Migration Config operation - [System.ComponentModel.TypeConverter(typeof(MigrationConfigPropertiesTypeConverter))] - public partial interface IMigrationConfigProperties - - { - - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSet.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSet.PowerShell.cs deleted file mode 100644 index 82269e1089cd..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSet.PowerShell.cs +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - - /// Description of NetworkRuleSet resource. - [System.ComponentModel.TypeConverter(typeof(NetworkRuleSetTypeConverter))] - public partial class NetworkRuleSet - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new NetworkRuleSet(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new NetworkRuleSet(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal NetworkRuleSet(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NetworkRuleSetPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("DefaultAction")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).DefaultAction = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction?) content.GetValueForProperty("DefaultAction",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).DefaultAction, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction.CreateFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("TrustedServiceAccessEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).TrustedServiceAccessEnabled = (bool?) content.GetValueForProperty("TrustedServiceAccessEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).TrustedServiceAccessEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("VirtualNetworkRule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).VirtualNetworkRule = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[]) content.GetValueForProperty("VirtualNetworkRule",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).VirtualNetworkRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NwRuleSetVirtualNetworkRulesTypeConverter.ConvertFrom)); - } - if (content.Contains("IPRule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).IPRule = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[]) content.GetValueForProperty("IPRule",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).IPRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NwRuleSetIPRulesTypeConverter.ConvertFrom)); - } - if (content.Contains("PublicNetworkAccess")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag.CreateFrom); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal NetworkRuleSet(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NetworkRuleSetPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("DefaultAction")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).DefaultAction = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction?) content.GetValueForProperty("DefaultAction",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).DefaultAction, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction.CreateFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("TrustedServiceAccessEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).TrustedServiceAccessEnabled = (bool?) content.GetValueForProperty("TrustedServiceAccessEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).TrustedServiceAccessEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("VirtualNetworkRule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).VirtualNetworkRule = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[]) content.GetValueForProperty("VirtualNetworkRule",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).VirtualNetworkRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NwRuleSetVirtualNetworkRulesTypeConverter.ConvertFrom)); - } - if (content.Contains("IPRule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).IPRule = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[]) content.GetValueForProperty("IPRule",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).IPRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NwRuleSetIPRulesTypeConverter.ConvertFrom)); - } - if (content.Contains("PublicNetworkAccess")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag.CreateFrom); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Description of NetworkRuleSet resource. - [System.ComponentModel.TypeConverter(typeof(NetworkRuleSetTypeConverter))] - public partial interface INetworkRuleSet - - { - - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnection.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnection.PowerShell.cs deleted file mode 100644 index 55707b4b4a1a..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnection.PowerShell.cs +++ /dev/null @@ -1,302 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - - /// Properties of the PrivateEndpointConnection. - [System.ComponentModel.TypeConverter(typeof(PrivateEndpointConnectionTypeConverter))] - public partial class PrivateEndpointConnection - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new PrivateEndpointConnection(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new PrivateEndpointConnection(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal PrivateEndpointConnection(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnectionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("PrivateEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("PrivateLinkServiceConnectionState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ConnectionStateTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState.CreateFrom); - } - if (content.Contains("PrivateEndpointId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).PrivateEndpointId, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ConnectionState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).ConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus?) content.GetValueForProperty("ConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).ConnectionState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).Description, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal PrivateEndpointConnection(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnectionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("PrivateEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("PrivateLinkServiceConnectionState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ConnectionStateTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState.CreateFrom); - } - if (content.Contains("PrivateEndpointId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).PrivateEndpointId, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ConnectionState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).ConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus?) content.GetValueForProperty("ConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).ConnectionState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal)this).Description, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Properties of the PrivateEndpointConnection. - [System.ComponentModel.TypeConverter(typeof(PrivateEndpointConnectionTypeConverter))] - public partial interface IPrivateEndpointConnection - - { - - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Rule.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Rule.PowerShell.cs deleted file mode 100644 index db5010e33f24..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Rule.PowerShell.cs +++ /dev/null @@ -1,412 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - - /// Description of Rule Resource. - [System.ComponentModel.TypeConverter(typeof(RuleTypeConverter))] - public partial class Rule - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Rule(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Rule(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Rule(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleproperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.RulepropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Action")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ActionTypeConverter.ConvertFrom); - } - if (content.Contains("SqlFilter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SqlFilter = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter) content.GetValueForProperty("SqlFilter",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SqlFilter, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SqlFilterTypeConverter.ConvertFrom); - } - if (content.Contains("CorrelationFilter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).CorrelationFilter = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter) content.GetValueForProperty("CorrelationFilter",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).CorrelationFilter, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilterTypeConverter.ConvertFrom); - } - if (content.Contains("FilterType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).FilterType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType?) content.GetValueForProperty("FilterType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).FilterType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType.CreateFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ActionSqlExpression")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ActionSqlExpression = (string) content.GetValueForProperty("ActionSqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ActionSqlExpression, global::System.Convert.ToString); - } - if (content.Contains("ActionCompatibilityLevel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ActionCompatibilityLevel = (int?) content.GetValueForProperty("ActionCompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ActionCompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("SqlExpression")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SqlExpression = (string) content.GetValueForProperty("SqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SqlExpression, global::System.Convert.ToString); - } - if (content.Contains("SqlFilterCompatibilityLevel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SqlFilterCompatibilityLevel = (int?) content.GetValueForProperty("SqlFilterCompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SqlFilterCompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CorrelationFilterProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).CorrelationFilterProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties) content.GetValueForProperty("CorrelationFilterProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).CorrelationFilterProperty, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilterPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("CorrelationId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).CorrelationId = (string) content.GetValueForProperty("CorrelationId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).CorrelationId, global::System.Convert.ToString); - } - if (content.Contains("MessageId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).MessageId = (string) content.GetValueForProperty("MessageId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).MessageId, global::System.Convert.ToString); - } - if (content.Contains("To")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).To = (string) content.GetValueForProperty("To",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).To, global::System.Convert.ToString); - } - if (content.Contains("ReplyTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ReplyTo = (string) content.GetValueForProperty("ReplyTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ReplyTo, global::System.Convert.ToString); - } - if (content.Contains("Label")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).Label = (string) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).Label, global::System.Convert.ToString); - } - if (content.Contains("SessionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SessionId = (string) content.GetValueForProperty("SessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SessionId, global::System.Convert.ToString); - } - if (content.Contains("ContentType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ContentType = (string) content.GetValueForProperty("ContentType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ContentType, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ActionRequiresPreprocessing")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ActionRequiresPreprocessing = (bool?) content.GetValueForProperty("ActionRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ActionRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("SqlFilterRequiresPreprocessing")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SqlFilterRequiresPreprocessing = (bool?) content.GetValueForProperty("SqlFilterRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SqlFilterRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ReplyToSessionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ReplyToSessionId = (string) content.GetValueForProperty("ReplyToSessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ReplyToSessionId, global::System.Convert.ToString); - } - if (content.Contains("CorrelationFilterRequiresPreprocessing")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).CorrelationFilterRequiresPreprocessing = (bool?) content.GetValueForProperty("CorrelationFilterRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).CorrelationFilterRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Rule(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleproperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.RulepropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Action")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ActionTypeConverter.ConvertFrom); - } - if (content.Contains("SqlFilter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SqlFilter = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter) content.GetValueForProperty("SqlFilter",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SqlFilter, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SqlFilterTypeConverter.ConvertFrom); - } - if (content.Contains("CorrelationFilter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).CorrelationFilter = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter) content.GetValueForProperty("CorrelationFilter",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).CorrelationFilter, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilterTypeConverter.ConvertFrom); - } - if (content.Contains("FilterType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).FilterType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType?) content.GetValueForProperty("FilterType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).FilterType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType.CreateFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ActionSqlExpression")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ActionSqlExpression = (string) content.GetValueForProperty("ActionSqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ActionSqlExpression, global::System.Convert.ToString); - } - if (content.Contains("ActionCompatibilityLevel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ActionCompatibilityLevel = (int?) content.GetValueForProperty("ActionCompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ActionCompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("SqlExpression")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SqlExpression = (string) content.GetValueForProperty("SqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SqlExpression, global::System.Convert.ToString); - } - if (content.Contains("SqlFilterCompatibilityLevel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SqlFilterCompatibilityLevel = (int?) content.GetValueForProperty("SqlFilterCompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SqlFilterCompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CorrelationFilterProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).CorrelationFilterProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties) content.GetValueForProperty("CorrelationFilterProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).CorrelationFilterProperty, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilterPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("CorrelationId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).CorrelationId = (string) content.GetValueForProperty("CorrelationId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).CorrelationId, global::System.Convert.ToString); - } - if (content.Contains("MessageId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).MessageId = (string) content.GetValueForProperty("MessageId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).MessageId, global::System.Convert.ToString); - } - if (content.Contains("To")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).To = (string) content.GetValueForProperty("To",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).To, global::System.Convert.ToString); - } - if (content.Contains("ReplyTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ReplyTo = (string) content.GetValueForProperty("ReplyTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ReplyTo, global::System.Convert.ToString); - } - if (content.Contains("Label")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).Label = (string) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).Label, global::System.Convert.ToString); - } - if (content.Contains("SessionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SessionId = (string) content.GetValueForProperty("SessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SessionId, global::System.Convert.ToString); - } - if (content.Contains("ContentType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ContentType = (string) content.GetValueForProperty("ContentType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ContentType, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ActionRequiresPreprocessing")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ActionRequiresPreprocessing = (bool?) content.GetValueForProperty("ActionRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ActionRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("SqlFilterRequiresPreprocessing")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SqlFilterRequiresPreprocessing = (bool?) content.GetValueForProperty("SqlFilterRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).SqlFilterRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ReplyToSessionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ReplyToSessionId = (string) content.GetValueForProperty("ReplyToSessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).ReplyToSessionId, global::System.Convert.ToString); - } - if (content.Contains("CorrelationFilterRequiresPreprocessing")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).CorrelationFilterRequiresPreprocessing = (bool?) content.GetValueForProperty("CorrelationFilterRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal)this).CorrelationFilterRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Description of Rule Resource. - [System.ComponentModel.TypeConverter(typeof(RuleTypeConverter))] - public partial interface IRule - - { - - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Ruleproperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Ruleproperties.PowerShell.cs deleted file mode 100644 index e2a5e266fccc..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Ruleproperties.PowerShell.cs +++ /dev/null @@ -1,316 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - - /// Description of Rule Resource. - [System.ComponentModel.TypeConverter(typeof(RulepropertiesTypeConverter))] - public partial class Ruleproperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleproperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Ruleproperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleproperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Ruleproperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleproperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Ruleproperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Action")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ActionTypeConverter.ConvertFrom); - } - if (content.Contains("SqlFilter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).SqlFilter = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter) content.GetValueForProperty("SqlFilter",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).SqlFilter, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SqlFilterTypeConverter.ConvertFrom); - } - if (content.Contains("CorrelationFilter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilter = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter) content.GetValueForProperty("CorrelationFilter",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilter, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilterTypeConverter.ConvertFrom); - } - if (content.Contains("FilterType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).FilterType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType?) content.GetValueForProperty("FilterType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).FilterType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType.CreateFrom); - } - if (content.Contains("ActionSqlExpression")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).ActionSqlExpression = (string) content.GetValueForProperty("ActionSqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).ActionSqlExpression, global::System.Convert.ToString); - } - if (content.Contains("ActionCompatibilityLevel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).ActionCompatibilityLevel = (int?) content.GetValueForProperty("ActionCompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).ActionCompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("SqlFilterSqlExpression")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).SqlFilterSqlExpression = (string) content.GetValueForProperty("SqlFilterSqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).SqlFilterSqlExpression, global::System.Convert.ToString); - } - if (content.Contains("SqlFilterCompatibilityLevel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).SqlFilterCompatibilityLevel = (int?) content.GetValueForProperty("SqlFilterCompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).SqlFilterCompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CorrelationFilterProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties) content.GetValueForProperty("CorrelationFilterProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterProperty, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilterPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("CorrelationFilterCorrelationId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterCorrelationId = (string) content.GetValueForProperty("CorrelationFilterCorrelationId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterCorrelationId, global::System.Convert.ToString); - } - if (content.Contains("CorrelationFilterMessageId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterMessageId = (string) content.GetValueForProperty("CorrelationFilterMessageId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterMessageId, global::System.Convert.ToString); - } - if (content.Contains("CorrelationFilterTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterTo = (string) content.GetValueForProperty("CorrelationFilterTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterTo, global::System.Convert.ToString); - } - if (content.Contains("CorrelationFilterReplyTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterReplyTo = (string) content.GetValueForProperty("CorrelationFilterReplyTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterReplyTo, global::System.Convert.ToString); - } - if (content.Contains("CorrelationFilterLabel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterLabel = (string) content.GetValueForProperty("CorrelationFilterLabel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterLabel, global::System.Convert.ToString); - } - if (content.Contains("CorrelationFilterSessionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterSessionId = (string) content.GetValueForProperty("CorrelationFilterSessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterSessionId, global::System.Convert.ToString); - } - if (content.Contains("CorrelationFilterContentType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterContentType = (string) content.GetValueForProperty("CorrelationFilterContentType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterContentType, global::System.Convert.ToString); - } - if (content.Contains("ActionRequiresPreprocessing")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).ActionRequiresPreprocessing = (bool?) content.GetValueForProperty("ActionRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).ActionRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("SqlFilterRequiresPreprocessing")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).SqlFilterRequiresPreprocessing = (bool?) content.GetValueForProperty("SqlFilterRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).SqlFilterRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("CorrelationFilterReplyToSessionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterReplyToSessionId = (string) content.GetValueForProperty("CorrelationFilterReplyToSessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterReplyToSessionId, global::System.Convert.ToString); - } - if (content.Contains("CorrelationFilterRequiresPreprocessing")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterRequiresPreprocessing = (bool?) content.GetValueForProperty("CorrelationFilterRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Ruleproperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Action")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ActionTypeConverter.ConvertFrom); - } - if (content.Contains("SqlFilter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).SqlFilter = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter) content.GetValueForProperty("SqlFilter",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).SqlFilter, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SqlFilterTypeConverter.ConvertFrom); - } - if (content.Contains("CorrelationFilter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilter = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter) content.GetValueForProperty("CorrelationFilter",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilter, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilterTypeConverter.ConvertFrom); - } - if (content.Contains("FilterType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).FilterType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType?) content.GetValueForProperty("FilterType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).FilterType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType.CreateFrom); - } - if (content.Contains("ActionSqlExpression")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).ActionSqlExpression = (string) content.GetValueForProperty("ActionSqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).ActionSqlExpression, global::System.Convert.ToString); - } - if (content.Contains("ActionCompatibilityLevel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).ActionCompatibilityLevel = (int?) content.GetValueForProperty("ActionCompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).ActionCompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("SqlFilterSqlExpression")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).SqlFilterSqlExpression = (string) content.GetValueForProperty("SqlFilterSqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).SqlFilterSqlExpression, global::System.Convert.ToString); - } - if (content.Contains("SqlFilterCompatibilityLevel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).SqlFilterCompatibilityLevel = (int?) content.GetValueForProperty("SqlFilterCompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).SqlFilterCompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CorrelationFilterProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties) content.GetValueForProperty("CorrelationFilterProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterProperty, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilterPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("CorrelationFilterCorrelationId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterCorrelationId = (string) content.GetValueForProperty("CorrelationFilterCorrelationId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterCorrelationId, global::System.Convert.ToString); - } - if (content.Contains("CorrelationFilterMessageId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterMessageId = (string) content.GetValueForProperty("CorrelationFilterMessageId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterMessageId, global::System.Convert.ToString); - } - if (content.Contains("CorrelationFilterTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterTo = (string) content.GetValueForProperty("CorrelationFilterTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterTo, global::System.Convert.ToString); - } - if (content.Contains("CorrelationFilterReplyTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterReplyTo = (string) content.GetValueForProperty("CorrelationFilterReplyTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterReplyTo, global::System.Convert.ToString); - } - if (content.Contains("CorrelationFilterLabel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterLabel = (string) content.GetValueForProperty("CorrelationFilterLabel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterLabel, global::System.Convert.ToString); - } - if (content.Contains("CorrelationFilterSessionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterSessionId = (string) content.GetValueForProperty("CorrelationFilterSessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterSessionId, global::System.Convert.ToString); - } - if (content.Contains("CorrelationFilterContentType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterContentType = (string) content.GetValueForProperty("CorrelationFilterContentType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterContentType, global::System.Convert.ToString); - } - if (content.Contains("ActionRequiresPreprocessing")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).ActionRequiresPreprocessing = (bool?) content.GetValueForProperty("ActionRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).ActionRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("SqlFilterRequiresPreprocessing")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).SqlFilterRequiresPreprocessing = (bool?) content.GetValueForProperty("SqlFilterRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).SqlFilterRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("CorrelationFilterReplyToSessionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterReplyToSessionId = (string) content.GetValueForProperty("CorrelationFilterReplyToSessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterReplyToSessionId, global::System.Convert.ToString); - } - if (content.Contains("CorrelationFilterRequiresPreprocessing")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterRequiresPreprocessing = (bool?) content.GetValueForProperty("CorrelationFilterRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)this).CorrelationFilterRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Description of Rule Resource. - [System.ComponentModel.TypeConverter(typeof(RulepropertiesTypeConverter))] - public partial interface IRuleproperties - - { - - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespace.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespace.PowerShell.cs deleted file mode 100644 index 7932f847c198..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespace.PowerShell.cs +++ /dev/null @@ -1,468 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - - /// Description of a namespace resource. - [System.ComponentModel.TypeConverter(typeof(SbNamespaceTypeConverter))] - public partial class SbNamespace - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SbNamespace(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SbNamespace(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SbNamespace(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSkuTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IdentityTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespacePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName.CreateFrom); - } - if (content.Contains("SkuTier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier.CreateFrom); - } - if (content.Contains("PrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).PrincipalId, global::System.Convert.ToString); - } - if (content.Contains("TenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).TenantId, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("Encryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.EncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("SkuCapacity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("UserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("MinimumTlsVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).MinimumTlsVersion = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion?) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).MinimumTlsVersion, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ServiceBusEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); - } - if (content.Contains("MetricId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).MetricId, global::System.Convert.ToString); - } - if (content.Contains("ZoneRedundant")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).ZoneRedundant = (bool?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).ZoneRedundant, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("PrivateEndpointConnection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnectionTypeConverter.ConvertFrom)); - } - if (content.Contains("DisableLocalAuth")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AlternateName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).AlternateName, global::System.Convert.ToString); - } - if (content.Contains("PublicNetworkAccess")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess.CreateFrom); - } - if (content.Contains("PremiumMessagingPartition")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).PremiumMessagingPartition = (int?) content.GetValueForProperty("PremiumMessagingPartition",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).PremiumMessagingPartition, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("KeySource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).KeySource = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource?) content.GetValueForProperty("KeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).KeySource, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource.CreateFrom); - } - if (content.Contains("KeyVaultProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).KeyVaultProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]) content.GetValueForProperty("KeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).KeyVaultProperty, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultPropertiesTypeConverter.ConvertFrom)); - } - if (content.Contains("RequireInfrastructureEncryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).RequireInfrastructureEncryption = (bool?) content.GetValueForProperty("RequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).RequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SbNamespace(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSkuTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IdentityTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespacePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName.CreateFrom); - } - if (content.Contains("SkuTier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier.CreateFrom); - } - if (content.Contains("PrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).PrincipalId, global::System.Convert.ToString); - } - if (content.Contains("TenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).TenantId, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("Encryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.EncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("SkuCapacity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("UserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("MinimumTlsVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).MinimumTlsVersion = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion?) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).MinimumTlsVersion, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ServiceBusEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); - } - if (content.Contains("MetricId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).MetricId, global::System.Convert.ToString); - } - if (content.Contains("ZoneRedundant")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).ZoneRedundant = (bool?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).ZoneRedundant, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("PrivateEndpointConnection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnectionTypeConverter.ConvertFrom)); - } - if (content.Contains("DisableLocalAuth")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AlternateName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).AlternateName, global::System.Convert.ToString); - } - if (content.Contains("PublicNetworkAccess")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess.CreateFrom); - } - if (content.Contains("PremiumMessagingPartition")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).PremiumMessagingPartition = (int?) content.GetValueForProperty("PremiumMessagingPartition",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).PremiumMessagingPartition, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("KeySource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).KeySource = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource?) content.GetValueForProperty("KeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).KeySource, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource.CreateFrom); - } - if (content.Contains("KeyVaultProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).KeyVaultProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]) content.GetValueForProperty("KeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).KeyVaultProperty, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultPropertiesTypeConverter.ConvertFrom)); - } - if (content.Contains("RequireInfrastructureEncryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).RequireInfrastructureEncryption = (bool?) content.GetValueForProperty("RequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal)this).RequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Description of a namespace resource. - [System.ComponentModel.TypeConverter(typeof(SbNamespaceTypeConverter))] - public partial interface ISbNamespace - - { - - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceProperties.PowerShell.cs deleted file mode 100644 index 11e06859e2e8..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceProperties.PowerShell.cs +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - - /// Properties of the namespace. - [System.ComponentModel.TypeConverter(typeof(SbNamespacePropertiesTypeConverter))] - public partial class SbNamespaceProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SbNamespaceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SbNamespaceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SbNamespaceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Encryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.EncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("MinimumTlsVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).MinimumTlsVersion = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion?) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).MinimumTlsVersion, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ServiceBusEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); - } - if (content.Contains("MetricId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).MetricId, global::System.Convert.ToString); - } - if (content.Contains("ZoneRedundant")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).ZoneRedundant = (bool?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).ZoneRedundant, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("PrivateEndpointConnection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnectionTypeConverter.ConvertFrom)); - } - if (content.Contains("DisableLocalAuth")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AlternateName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).AlternateName, global::System.Convert.ToString); - } - if (content.Contains("PublicNetworkAccess")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess.CreateFrom); - } - if (content.Contains("PremiumMessagingPartition")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).PremiumMessagingPartition = (int?) content.GetValueForProperty("PremiumMessagingPartition",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).PremiumMessagingPartition, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EncryptionKeySource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).EncryptionKeySource = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource?) content.GetValueForProperty("EncryptionKeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).EncryptionKeySource, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource.CreateFrom); - } - if (content.Contains("EncryptionKeyVaultProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).EncryptionKeyVaultProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]) content.GetValueForProperty("EncryptionKeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).EncryptionKeyVaultProperty, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultPropertiesTypeConverter.ConvertFrom)); - } - if (content.Contains("EncryptionRequireInfrastructureEncryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).EncryptionRequireInfrastructureEncryption = (bool?) content.GetValueForProperty("EncryptionRequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).EncryptionRequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SbNamespaceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Encryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.EncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("MinimumTlsVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).MinimumTlsVersion = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion?) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).MinimumTlsVersion, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ServiceBusEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); - } - if (content.Contains("MetricId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).MetricId, global::System.Convert.ToString); - } - if (content.Contains("ZoneRedundant")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).ZoneRedundant = (bool?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).ZoneRedundant, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("PrivateEndpointConnection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnectionTypeConverter.ConvertFrom)); - } - if (content.Contains("DisableLocalAuth")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AlternateName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).AlternateName, global::System.Convert.ToString); - } - if (content.Contains("PublicNetworkAccess")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess.CreateFrom); - } - if (content.Contains("PremiumMessagingPartition")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).PremiumMessagingPartition = (int?) content.GetValueForProperty("PremiumMessagingPartition",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).PremiumMessagingPartition, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EncryptionKeySource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).EncryptionKeySource = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource?) content.GetValueForProperty("EncryptionKeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).EncryptionKeySource, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource.CreateFrom); - } - if (content.Contains("EncryptionKeyVaultProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).EncryptionKeyVaultProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]) content.GetValueForProperty("EncryptionKeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).EncryptionKeyVaultProperty, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultPropertiesTypeConverter.ConvertFrom)); - } - if (content.Contains("EncryptionRequireInfrastructureEncryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).EncryptionRequireInfrastructureEncryption = (bool?) content.GetValueForProperty("EncryptionRequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)this).EncryptionRequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Properties of the namespace. - [System.ComponentModel.TypeConverter(typeof(SbNamespacePropertiesTypeConverter))] - public partial interface ISbNamespaceProperties - - { - - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateParameters.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateParameters.PowerShell.cs deleted file mode 100644 index 29449c739614..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateParameters.PowerShell.cs +++ /dev/null @@ -1,382 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - - /// Description of a namespace resource. - [System.ComponentModel.TypeConverter(typeof(SbNamespaceUpdateParametersTypeConverter))] - public partial class SbNamespaceUpdateParameters - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SbNamespaceUpdateParameters(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SbNamespaceUpdateParameters(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SbNamespaceUpdateParameters(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSkuTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespaceUpdatePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IdentityTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ResourceNamespacePatchTagsTypeConverter.ConvertFrom); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName.CreateFrom); - } - if (content.Contains("SkuTier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier.CreateFrom); - } - if (content.Contains("Encryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.EncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("SkuCapacity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ServiceBusEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); - } - if (content.Contains("MetricId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).MetricId, global::System.Convert.ToString); - } - if (content.Contains("PrivateEndpointConnection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnectionTypeConverter.ConvertFrom)); - } - if (content.Contains("DisableLocalAuth")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AlternateName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).AlternateName, global::System.Convert.ToString); - } - if (content.Contains("EncryptionKeySource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).EncryptionKeySource = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource?) content.GetValueForProperty("EncryptionKeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).EncryptionKeySource, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource.CreateFrom); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("EncryptionKeyVaultProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).EncryptionKeyVaultProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]) content.GetValueForProperty("EncryptionKeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).EncryptionKeyVaultProperty, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultPropertiesTypeConverter.ConvertFrom)); - } - if (content.Contains("EncryptionRequireInfrastructureEncryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).EncryptionRequireInfrastructureEncryption = (bool?) content.GetValueForProperty("EncryptionRequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).EncryptionRequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SbNamespaceUpdateParameters(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSkuTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespaceUpdatePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IdentityTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ResourceNamespacePatchTagsTypeConverter.ConvertFrom); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName.CreateFrom); - } - if (content.Contains("SkuTier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier.CreateFrom); - } - if (content.Contains("Encryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.EncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("SkuCapacity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ServiceBusEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); - } - if (content.Contains("MetricId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).MetricId, global::System.Convert.ToString); - } - if (content.Contains("PrivateEndpointConnection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnectionTypeConverter.ConvertFrom)); - } - if (content.Contains("DisableLocalAuth")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AlternateName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).AlternateName, global::System.Convert.ToString); - } - if (content.Contains("EncryptionKeySource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).EncryptionKeySource = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource?) content.GetValueForProperty("EncryptionKeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).EncryptionKeySource, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource.CreateFrom); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("EncryptionKeyVaultProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).EncryptionKeyVaultProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]) content.GetValueForProperty("EncryptionKeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).EncryptionKeyVaultProperty, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultPropertiesTypeConverter.ConvertFrom)); - } - if (content.Contains("EncryptionRequireInfrastructureEncryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).EncryptionRequireInfrastructureEncryption = (bool?) content.GetValueForProperty("EncryptionRequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal)this).EncryptionRequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Description of a namespace resource. - [System.ComponentModel.TypeConverter(typeof(SbNamespaceUpdateParametersTypeConverter))] - public partial interface ISbNamespaceUpdateParameters - - { - - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateProperties.PowerShell.cs deleted file mode 100644 index 4ea15543f6d4..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateProperties.PowerShell.cs +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - - /// Properties of the namespace. - [System.ComponentModel.TypeConverter(typeof(SbNamespaceUpdatePropertiesTypeConverter))] - public partial class SbNamespaceUpdateProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SbNamespaceUpdateProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SbNamespaceUpdateProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SbNamespaceUpdateProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Encryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.EncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ServiceBusEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); - } - if (content.Contains("MetricId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).MetricId, global::System.Convert.ToString); - } - if (content.Contains("PrivateEndpointConnection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnectionTypeConverter.ConvertFrom)); - } - if (content.Contains("DisableLocalAuth")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AlternateName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).AlternateName, global::System.Convert.ToString); - } - if (content.Contains("EncryptionKeySource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).EncryptionKeySource = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource?) content.GetValueForProperty("EncryptionKeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).EncryptionKeySource, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource.CreateFrom); - } - if (content.Contains("EncryptionKeyVaultProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).EncryptionKeyVaultProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]) content.GetValueForProperty("EncryptionKeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).EncryptionKeyVaultProperty, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultPropertiesTypeConverter.ConvertFrom)); - } - if (content.Contains("EncryptionRequireInfrastructureEncryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).EncryptionRequireInfrastructureEncryption = (bool?) content.GetValueForProperty("EncryptionRequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).EncryptionRequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SbNamespaceUpdateProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Encryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.EncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ServiceBusEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); - } - if (content.Contains("MetricId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).MetricId, global::System.Convert.ToString); - } - if (content.Contains("PrivateEndpointConnection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnectionTypeConverter.ConvertFrom)); - } - if (content.Contains("DisableLocalAuth")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AlternateName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).AlternateName, global::System.Convert.ToString); - } - if (content.Contains("EncryptionKeySource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).EncryptionKeySource = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource?) content.GetValueForProperty("EncryptionKeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).EncryptionKeySource, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource.CreateFrom); - } - if (content.Contains("EncryptionKeyVaultProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).EncryptionKeyVaultProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]) content.GetValueForProperty("EncryptionKeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).EncryptionKeyVaultProperty, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultPropertiesTypeConverter.ConvertFrom)); - } - if (content.Contains("EncryptionRequireInfrastructureEncryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).EncryptionRequireInfrastructureEncryption = (bool?) content.GetValueForProperty("EncryptionRequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)this).EncryptionRequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Properties of the namespace. - [System.ComponentModel.TypeConverter(typeof(SbNamespaceUpdatePropertiesTypeConverter))] - public partial interface ISbNamespaceUpdateProperties - - { - - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueue.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueue.PowerShell.cs deleted file mode 100644 index b845947138df..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueue.PowerShell.cs +++ /dev/null @@ -1,468 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - - /// Description of queue Resource. - [System.ComponentModel.TypeConverter(typeof(SbQueueTypeConverter))] - public partial class SbQueue - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SbQueue(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SbQueue(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SbQueue(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbQueuePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CountDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("AccessedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SizeInByte")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SizeInByte = (long?) content.GetValueForProperty("SizeInByte",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SizeInByte, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("MessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).MessageCount = (long?) content.GetValueForProperty("MessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).MessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("LockDuration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).LockDuration = (global::System.TimeSpan?) content.GetValueForProperty("LockDuration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).LockDuration, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("MaxSizeInMegabytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).MaxSizeInMegabytes = (int?) content.GetValueForProperty("MaxSizeInMegabytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).MaxSizeInMegabytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MaxMessageSizeInKilobytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).MaxMessageSizeInKilobytes = (long?) content.GetValueForProperty("MaxMessageSizeInKilobytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).MaxMessageSizeInKilobytes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("RequiresDuplicateDetection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).RequiresDuplicateDetection = (bool?) content.GetValueForProperty("RequiresDuplicateDetection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).RequiresDuplicateDetection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("RequiresSession")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).RequiresSession = (bool?) content.GetValueForProperty("RequiresSession",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).RequiresSession, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DefaultMessageTimeToLive")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("DeadLetteringOnMessageExpiration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).DeadLetteringOnMessageExpiration = (bool?) content.GetValueForProperty("DeadLetteringOnMessageExpiration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).DeadLetteringOnMessageExpiration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DuplicateDetectionHistoryTimeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("MaxDeliveryCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).MaxDeliveryCount = (int?) content.GetValueForProperty("MaxDeliveryCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).MaxDeliveryCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus.CreateFrom); - } - if (content.Contains("EnableBatchedOperations")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AutoDeleteOnIdle")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("EnablePartitioning")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).EnablePartitioning = (bool?) content.GetValueForProperty("EnablePartitioning",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).EnablePartitioning, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("EnableExpress")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).EnableExpress = (bool?) content.GetValueForProperty("EnableExpress",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).EnableExpress, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ForwardTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).ForwardTo = (string) content.GetValueForProperty("ForwardTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).ForwardTo, global::System.Convert.ToString); - } - if (content.Contains("ForwardDeadLetteredMessagesTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).ForwardDeadLetteredMessagesTo = (string) content.GetValueForProperty("ForwardDeadLetteredMessagesTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).ForwardDeadLetteredMessagesTo, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CountDetailActiveMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailScheduledMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SbQueue(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbQueuePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CountDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("AccessedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SizeInByte")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SizeInByte = (long?) content.GetValueForProperty("SizeInByte",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SizeInByte, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("MessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).MessageCount = (long?) content.GetValueForProperty("MessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).MessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("LockDuration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).LockDuration = (global::System.TimeSpan?) content.GetValueForProperty("LockDuration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).LockDuration, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("MaxSizeInMegabytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).MaxSizeInMegabytes = (int?) content.GetValueForProperty("MaxSizeInMegabytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).MaxSizeInMegabytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MaxMessageSizeInKilobytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).MaxMessageSizeInKilobytes = (long?) content.GetValueForProperty("MaxMessageSizeInKilobytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).MaxMessageSizeInKilobytes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("RequiresDuplicateDetection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).RequiresDuplicateDetection = (bool?) content.GetValueForProperty("RequiresDuplicateDetection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).RequiresDuplicateDetection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("RequiresSession")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).RequiresSession = (bool?) content.GetValueForProperty("RequiresSession",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).RequiresSession, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DefaultMessageTimeToLive")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("DeadLetteringOnMessageExpiration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).DeadLetteringOnMessageExpiration = (bool?) content.GetValueForProperty("DeadLetteringOnMessageExpiration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).DeadLetteringOnMessageExpiration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DuplicateDetectionHistoryTimeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("MaxDeliveryCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).MaxDeliveryCount = (int?) content.GetValueForProperty("MaxDeliveryCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).MaxDeliveryCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus.CreateFrom); - } - if (content.Contains("EnableBatchedOperations")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AutoDeleteOnIdle")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("EnablePartitioning")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).EnablePartitioning = (bool?) content.GetValueForProperty("EnablePartitioning",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).EnablePartitioning, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("EnableExpress")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).EnableExpress = (bool?) content.GetValueForProperty("EnableExpress",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).EnableExpress, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ForwardTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).ForwardTo = (string) content.GetValueForProperty("ForwardTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).ForwardTo, global::System.Convert.ToString); - } - if (content.Contains("ForwardDeadLetteredMessagesTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).ForwardDeadLetteredMessagesTo = (string) content.GetValueForProperty("ForwardDeadLetteredMessagesTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).ForwardDeadLetteredMessagesTo, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CountDetailActiveMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailScheduledMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Description of queue Resource. - [System.ComponentModel.TypeConverter(typeof(SbQueueTypeConverter))] - public partial interface ISbQueue - - { - - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueProperties.PowerShell.cs deleted file mode 100644 index d1dac4a8e2fc..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueProperties.PowerShell.cs +++ /dev/null @@ -1,374 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - - /// The Queue Properties definition. - [System.ComponentModel.TypeConverter(typeof(SbQueuePropertiesTypeConverter))] - public partial class SbQueueProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SbQueueProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SbQueueProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SbQueueProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("CountDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("AccessedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SizeInByte")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).SizeInByte = (long?) content.GetValueForProperty("SizeInByte",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).SizeInByte, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("MessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).MessageCount = (long?) content.GetValueForProperty("MessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).MessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("LockDuration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).LockDuration = (global::System.TimeSpan?) content.GetValueForProperty("LockDuration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).LockDuration, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("MaxSizeInMegabytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).MaxSizeInMegabytes = (int?) content.GetValueForProperty("MaxSizeInMegabytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).MaxSizeInMegabytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MaxMessageSizeInKilobytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).MaxMessageSizeInKilobytes = (long?) content.GetValueForProperty("MaxMessageSizeInKilobytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).MaxMessageSizeInKilobytes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("RequiresDuplicateDetection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).RequiresDuplicateDetection = (bool?) content.GetValueForProperty("RequiresDuplicateDetection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).RequiresDuplicateDetection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("RequiresSession")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).RequiresSession = (bool?) content.GetValueForProperty("RequiresSession",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).RequiresSession, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DefaultMessageTimeToLive")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("DeadLetteringOnMessageExpiration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).DeadLetteringOnMessageExpiration = (bool?) content.GetValueForProperty("DeadLetteringOnMessageExpiration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).DeadLetteringOnMessageExpiration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DuplicateDetectionHistoryTimeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("MaxDeliveryCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).MaxDeliveryCount = (int?) content.GetValueForProperty("MaxDeliveryCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).MaxDeliveryCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus.CreateFrom); - } - if (content.Contains("EnableBatchedOperations")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AutoDeleteOnIdle")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("EnablePartitioning")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).EnablePartitioning = (bool?) content.GetValueForProperty("EnablePartitioning",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).EnablePartitioning, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("EnableExpress")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).EnableExpress = (bool?) content.GetValueForProperty("EnableExpress",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).EnableExpress, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ForwardTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).ForwardTo = (string) content.GetValueForProperty("ForwardTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).ForwardTo, global::System.Convert.ToString); - } - if (content.Contains("ForwardDeadLetteredMessagesTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).ForwardDeadLetteredMessagesTo = (string) content.GetValueForProperty("ForwardDeadLetteredMessagesTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).ForwardDeadLetteredMessagesTo, global::System.Convert.ToString); - } - if (content.Contains("CountDetailActiveMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailScheduledMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SbQueueProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("CountDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("AccessedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SizeInByte")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).SizeInByte = (long?) content.GetValueForProperty("SizeInByte",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).SizeInByte, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("MessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).MessageCount = (long?) content.GetValueForProperty("MessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).MessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("LockDuration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).LockDuration = (global::System.TimeSpan?) content.GetValueForProperty("LockDuration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).LockDuration, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("MaxSizeInMegabytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).MaxSizeInMegabytes = (int?) content.GetValueForProperty("MaxSizeInMegabytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).MaxSizeInMegabytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MaxMessageSizeInKilobytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).MaxMessageSizeInKilobytes = (long?) content.GetValueForProperty("MaxMessageSizeInKilobytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).MaxMessageSizeInKilobytes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("RequiresDuplicateDetection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).RequiresDuplicateDetection = (bool?) content.GetValueForProperty("RequiresDuplicateDetection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).RequiresDuplicateDetection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("RequiresSession")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).RequiresSession = (bool?) content.GetValueForProperty("RequiresSession",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).RequiresSession, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DefaultMessageTimeToLive")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("DeadLetteringOnMessageExpiration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).DeadLetteringOnMessageExpiration = (bool?) content.GetValueForProperty("DeadLetteringOnMessageExpiration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).DeadLetteringOnMessageExpiration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DuplicateDetectionHistoryTimeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("MaxDeliveryCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).MaxDeliveryCount = (int?) content.GetValueForProperty("MaxDeliveryCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).MaxDeliveryCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus.CreateFrom); - } - if (content.Contains("EnableBatchedOperations")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AutoDeleteOnIdle")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("EnablePartitioning")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).EnablePartitioning = (bool?) content.GetValueForProperty("EnablePartitioning",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).EnablePartitioning, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("EnableExpress")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).EnableExpress = (bool?) content.GetValueForProperty("EnableExpress",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).EnableExpress, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ForwardTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).ForwardTo = (string) content.GetValueForProperty("ForwardTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).ForwardTo, global::System.Convert.ToString); - } - if (content.Contains("ForwardDeadLetteredMessagesTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).ForwardDeadLetteredMessagesTo = (string) content.GetValueForProperty("ForwardDeadLetteredMessagesTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).ForwardDeadLetteredMessagesTo, global::System.Convert.ToString); - } - if (content.Contains("CountDetailActiveMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailScheduledMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// The Queue Properties definition. - [System.ComponentModel.TypeConverter(typeof(SbQueuePropertiesTypeConverter))] - public partial interface ISbQueueProperties - - { - - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscription.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscription.PowerShell.cs deleted file mode 100644 index bb7d6cf95e0b..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscription.PowerShell.cs +++ /dev/null @@ -1,468 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - - /// Description of subscription resource. - [System.ComponentModel.TypeConverter(typeof(SbSubscriptionTypeConverter))] - public partial class SbSubscription - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SbSubscription(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SbSubscription(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SbSubscription(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSubscriptionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CountDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("ClientAffineProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).ClientAffineProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties) content.GetValueForProperty("ClientAffineProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).ClientAffineProperty, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbClientAffinePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("MessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).MessageCount = (long?) content.GetValueForProperty("MessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).MessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("AccessedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LockDuration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).LockDuration = (global::System.TimeSpan?) content.GetValueForProperty("LockDuration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).LockDuration, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("RequiresSession")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).RequiresSession = (bool?) content.GetValueForProperty("RequiresSession",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).RequiresSession, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DefaultMessageTimeToLive")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("DeadLetteringOnFilterEvaluationException")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).DeadLetteringOnFilterEvaluationException = (bool?) content.GetValueForProperty("DeadLetteringOnFilterEvaluationException",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).DeadLetteringOnFilterEvaluationException, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DeadLetteringOnMessageExpiration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).DeadLetteringOnMessageExpiration = (bool?) content.GetValueForProperty("DeadLetteringOnMessageExpiration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).DeadLetteringOnMessageExpiration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DuplicateDetectionHistoryTimeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("MaxDeliveryCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).MaxDeliveryCount = (int?) content.GetValueForProperty("MaxDeliveryCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).MaxDeliveryCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus.CreateFrom); - } - if (content.Contains("EnableBatchedOperations")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AutoDeleteOnIdle")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("ForwardTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).ForwardTo = (string) content.GetValueForProperty("ForwardTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).ForwardTo, global::System.Convert.ToString); - } - if (content.Contains("ForwardDeadLetteredMessagesTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).ForwardDeadLetteredMessagesTo = (string) content.GetValueForProperty("ForwardDeadLetteredMessagesTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).ForwardDeadLetteredMessagesTo, global::System.Convert.ToString); - } - if (content.Contains("IsClientAffine")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).IsClientAffine = (bool?) content.GetValueForProperty("IsClientAffine",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).IsClientAffine, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CountDetailActiveMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailScheduledMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).ClientId, global::System.Convert.ToString); - } - if (content.Contains("IsDurable")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).IsDurable = (bool?) content.GetValueForProperty("IsDurable",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).IsDurable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("IsShared")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).IsShared = (bool?) content.GetValueForProperty("IsShared",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).IsShared, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SbSubscription(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSubscriptionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CountDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("ClientAffineProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).ClientAffineProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties) content.GetValueForProperty("ClientAffineProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).ClientAffineProperty, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbClientAffinePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("MessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).MessageCount = (long?) content.GetValueForProperty("MessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).MessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("AccessedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LockDuration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).LockDuration = (global::System.TimeSpan?) content.GetValueForProperty("LockDuration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).LockDuration, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("RequiresSession")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).RequiresSession = (bool?) content.GetValueForProperty("RequiresSession",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).RequiresSession, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DefaultMessageTimeToLive")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("DeadLetteringOnFilterEvaluationException")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).DeadLetteringOnFilterEvaluationException = (bool?) content.GetValueForProperty("DeadLetteringOnFilterEvaluationException",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).DeadLetteringOnFilterEvaluationException, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DeadLetteringOnMessageExpiration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).DeadLetteringOnMessageExpiration = (bool?) content.GetValueForProperty("DeadLetteringOnMessageExpiration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).DeadLetteringOnMessageExpiration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DuplicateDetectionHistoryTimeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("MaxDeliveryCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).MaxDeliveryCount = (int?) content.GetValueForProperty("MaxDeliveryCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).MaxDeliveryCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus.CreateFrom); - } - if (content.Contains("EnableBatchedOperations")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AutoDeleteOnIdle")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("ForwardTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).ForwardTo = (string) content.GetValueForProperty("ForwardTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).ForwardTo, global::System.Convert.ToString); - } - if (content.Contains("ForwardDeadLetteredMessagesTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).ForwardDeadLetteredMessagesTo = (string) content.GetValueForProperty("ForwardDeadLetteredMessagesTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).ForwardDeadLetteredMessagesTo, global::System.Convert.ToString); - } - if (content.Contains("IsClientAffine")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).IsClientAffine = (bool?) content.GetValueForProperty("IsClientAffine",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).IsClientAffine, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CountDetailActiveMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailScheduledMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).ClientId, global::System.Convert.ToString); - } - if (content.Contains("IsDurable")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).IsDurable = (bool?) content.GetValueForProperty("IsDurable",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).IsDurable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("IsShared")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).IsShared = (bool?) content.GetValueForProperty("IsShared",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal)this).IsShared, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Description of subscription resource. - [System.ComponentModel.TypeConverter(typeof(SbSubscriptionTypeConverter))] - public partial interface ISbSubscription - - { - - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionProperties.PowerShell.cs deleted file mode 100644 index eca6a3d4b76a..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionProperties.PowerShell.cs +++ /dev/null @@ -1,374 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - - /// Description of Subscription Resource. - [System.ComponentModel.TypeConverter(typeof(SbSubscriptionPropertiesTypeConverter))] - public partial class SbSubscriptionProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SbSubscriptionProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SbSubscriptionProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SbSubscriptionProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("CountDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("ClientAffineProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ClientAffineProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties) content.GetValueForProperty("ClientAffineProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ClientAffineProperty, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbClientAffinePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("MessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).MessageCount = (long?) content.GetValueForProperty("MessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).MessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("AccessedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LockDuration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).LockDuration = (global::System.TimeSpan?) content.GetValueForProperty("LockDuration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).LockDuration, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("RequiresSession")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).RequiresSession = (bool?) content.GetValueForProperty("RequiresSession",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).RequiresSession, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DefaultMessageTimeToLive")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("DeadLetteringOnFilterEvaluationException")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).DeadLetteringOnFilterEvaluationException = (bool?) content.GetValueForProperty("DeadLetteringOnFilterEvaluationException",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).DeadLetteringOnFilterEvaluationException, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DeadLetteringOnMessageExpiration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).DeadLetteringOnMessageExpiration = (bool?) content.GetValueForProperty("DeadLetteringOnMessageExpiration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).DeadLetteringOnMessageExpiration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DuplicateDetectionHistoryTimeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("MaxDeliveryCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).MaxDeliveryCount = (int?) content.GetValueForProperty("MaxDeliveryCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).MaxDeliveryCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus.CreateFrom); - } - if (content.Contains("EnableBatchedOperations")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AutoDeleteOnIdle")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("ForwardTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ForwardTo = (string) content.GetValueForProperty("ForwardTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ForwardTo, global::System.Convert.ToString); - } - if (content.Contains("ForwardDeadLetteredMessagesTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ForwardDeadLetteredMessagesTo = (string) content.GetValueForProperty("ForwardDeadLetteredMessagesTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ForwardDeadLetteredMessagesTo, global::System.Convert.ToString); - } - if (content.Contains("IsClientAffine")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).IsClientAffine = (bool?) content.GetValueForProperty("IsClientAffine",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).IsClientAffine, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("CountDetailActiveMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailScheduledMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ClientAffinePropertyClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyClientId = (string) content.GetValueForProperty("ClientAffinePropertyClientId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyClientId, global::System.Convert.ToString); - } - if (content.Contains("ClientAffinePropertyIsDurable")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyIsDurable = (bool?) content.GetValueForProperty("ClientAffinePropertyIsDurable",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyIsDurable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ClientAffinePropertyIsShared")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyIsShared = (bool?) content.GetValueForProperty("ClientAffinePropertyIsShared",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyIsShared, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SbSubscriptionProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("CountDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("ClientAffineProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ClientAffineProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties) content.GetValueForProperty("ClientAffineProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ClientAffineProperty, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbClientAffinePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("MessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).MessageCount = (long?) content.GetValueForProperty("MessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).MessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("AccessedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LockDuration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).LockDuration = (global::System.TimeSpan?) content.GetValueForProperty("LockDuration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).LockDuration, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("RequiresSession")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).RequiresSession = (bool?) content.GetValueForProperty("RequiresSession",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).RequiresSession, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DefaultMessageTimeToLive")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("DeadLetteringOnFilterEvaluationException")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).DeadLetteringOnFilterEvaluationException = (bool?) content.GetValueForProperty("DeadLetteringOnFilterEvaluationException",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).DeadLetteringOnFilterEvaluationException, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DeadLetteringOnMessageExpiration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).DeadLetteringOnMessageExpiration = (bool?) content.GetValueForProperty("DeadLetteringOnMessageExpiration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).DeadLetteringOnMessageExpiration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DuplicateDetectionHistoryTimeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("MaxDeliveryCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).MaxDeliveryCount = (int?) content.GetValueForProperty("MaxDeliveryCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).MaxDeliveryCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus.CreateFrom); - } - if (content.Contains("EnableBatchedOperations")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AutoDeleteOnIdle")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("ForwardTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ForwardTo = (string) content.GetValueForProperty("ForwardTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ForwardTo, global::System.Convert.ToString); - } - if (content.Contains("ForwardDeadLetteredMessagesTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ForwardDeadLetteredMessagesTo = (string) content.GetValueForProperty("ForwardDeadLetteredMessagesTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ForwardDeadLetteredMessagesTo, global::System.Convert.ToString); - } - if (content.Contains("IsClientAffine")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).IsClientAffine = (bool?) content.GetValueForProperty("IsClientAffine",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).IsClientAffine, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("CountDetailActiveMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailScheduledMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ClientAffinePropertyClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyClientId = (string) content.GetValueForProperty("ClientAffinePropertyClientId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyClientId, global::System.Convert.ToString); - } - if (content.Contains("ClientAffinePropertyIsDurable")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyIsDurable = (bool?) content.GetValueForProperty("ClientAffinePropertyIsDurable",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyIsDurable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ClientAffinePropertyIsShared")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyIsShared = (bool?) content.GetValueForProperty("ClientAffinePropertyIsShared",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyIsShared, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Description of Subscription Resource. - [System.ComponentModel.TypeConverter(typeof(SbSubscriptionPropertiesTypeConverter))] - public partial interface ISbSubscriptionProperties - - { - - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopic.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopic.PowerShell.cs deleted file mode 100644 index f5a8ec2fc91f..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopic.PowerShell.cs +++ /dev/null @@ -1,428 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - - /// Description of topic resource. - [System.ComponentModel.TypeConverter(typeof(SbTopicTypeConverter))] - public partial class SbTopic - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SbTopic(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SbTopic(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SbTopic(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbTopicPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CountDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("SizeInByte")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SizeInByte = (long?) content.GetValueForProperty("SizeInByte",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SizeInByte, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("AccessedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SubscriptionCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SubscriptionCount = (int?) content.GetValueForProperty("SubscriptionCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SubscriptionCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DefaultMessageTimeToLive")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("MaxSizeInMegabytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).MaxSizeInMegabytes = (int?) content.GetValueForProperty("MaxSizeInMegabytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).MaxSizeInMegabytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MaxMessageSizeInKilobytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).MaxMessageSizeInKilobytes = (long?) content.GetValueForProperty("MaxMessageSizeInKilobytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).MaxMessageSizeInKilobytes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("RequiresDuplicateDetection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).RequiresDuplicateDetection = (bool?) content.GetValueForProperty("RequiresDuplicateDetection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).RequiresDuplicateDetection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DuplicateDetectionHistoryTimeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("EnableBatchedOperations")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus.CreateFrom); - } - if (content.Contains("SupportOrdering")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SupportOrdering = (bool?) content.GetValueForProperty("SupportOrdering",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SupportOrdering, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AutoDeleteOnIdle")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("EnablePartitioning")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).EnablePartitioning = (bool?) content.GetValueForProperty("EnablePartitioning",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).EnablePartitioning, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("EnableExpress")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).EnableExpress = (bool?) content.GetValueForProperty("EnableExpress",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).EnableExpress, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CountDetailActiveMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailScheduledMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SbTopic(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbTopicPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CountDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("SizeInByte")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SizeInByte = (long?) content.GetValueForProperty("SizeInByte",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SizeInByte, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("AccessedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SubscriptionCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SubscriptionCount = (int?) content.GetValueForProperty("SubscriptionCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SubscriptionCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DefaultMessageTimeToLive")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("MaxSizeInMegabytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).MaxSizeInMegabytes = (int?) content.GetValueForProperty("MaxSizeInMegabytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).MaxSizeInMegabytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MaxMessageSizeInKilobytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).MaxMessageSizeInKilobytes = (long?) content.GetValueForProperty("MaxMessageSizeInKilobytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).MaxMessageSizeInKilobytes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("RequiresDuplicateDetection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).RequiresDuplicateDetection = (bool?) content.GetValueForProperty("RequiresDuplicateDetection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).RequiresDuplicateDetection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DuplicateDetectionHistoryTimeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("EnableBatchedOperations")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus.CreateFrom); - } - if (content.Contains("SupportOrdering")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SupportOrdering = (bool?) content.GetValueForProperty("SupportOrdering",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SupportOrdering, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AutoDeleteOnIdle")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("EnablePartitioning")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).EnablePartitioning = (bool?) content.GetValueForProperty("EnablePartitioning",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).EnablePartitioning, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("EnableExpress")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).EnableExpress = (bool?) content.GetValueForProperty("EnableExpress",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).EnableExpress, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CountDetailActiveMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailScheduledMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Description of topic resource. - [System.ComponentModel.TypeConverter(typeof(SbTopicTypeConverter))] - public partial interface ISbTopic - - { - - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicProperties.PowerShell.cs deleted file mode 100644 index 2e4391fb9332..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicProperties.PowerShell.cs +++ /dev/null @@ -1,334 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; - - /// The Topic Properties definition. - [System.ComponentModel.TypeConverter(typeof(SbTopicPropertiesTypeConverter))] - public partial class SbTopicProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SbTopicProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SbTopicProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SbTopicProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("CountDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("SizeInByte")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).SizeInByte = (long?) content.GetValueForProperty("SizeInByte",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).SizeInByte, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("AccessedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SubscriptionCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).SubscriptionCount = (int?) content.GetValueForProperty("SubscriptionCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).SubscriptionCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DefaultMessageTimeToLive")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("MaxSizeInMegabytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).MaxSizeInMegabytes = (int?) content.GetValueForProperty("MaxSizeInMegabytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).MaxSizeInMegabytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MaxMessageSizeInKilobytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).MaxMessageSizeInKilobytes = (long?) content.GetValueForProperty("MaxMessageSizeInKilobytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).MaxMessageSizeInKilobytes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("RequiresDuplicateDetection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).RequiresDuplicateDetection = (bool?) content.GetValueForProperty("RequiresDuplicateDetection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).RequiresDuplicateDetection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DuplicateDetectionHistoryTimeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("EnableBatchedOperations")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus.CreateFrom); - } - if (content.Contains("SupportOrdering")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).SupportOrdering = (bool?) content.GetValueForProperty("SupportOrdering",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).SupportOrdering, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AutoDeleteOnIdle")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("EnablePartitioning")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).EnablePartitioning = (bool?) content.GetValueForProperty("EnablePartitioning",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).EnablePartitioning, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("EnableExpress")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).EnableExpress = (bool?) content.GetValueForProperty("EnableExpress",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).EnableExpress, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("CountDetailActiveMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailScheduledMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SbTopicProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("CountDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("SizeInByte")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).SizeInByte = (long?) content.GetValueForProperty("SizeInByte",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).SizeInByte, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("AccessedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SubscriptionCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).SubscriptionCount = (int?) content.GetValueForProperty("SubscriptionCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).SubscriptionCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DefaultMessageTimeToLive")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("MaxSizeInMegabytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).MaxSizeInMegabytes = (int?) content.GetValueForProperty("MaxSizeInMegabytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).MaxSizeInMegabytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MaxMessageSizeInKilobytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).MaxMessageSizeInKilobytes = (long?) content.GetValueForProperty("MaxMessageSizeInKilobytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).MaxMessageSizeInKilobytes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("RequiresDuplicateDetection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).RequiresDuplicateDetection = (bool?) content.GetValueForProperty("RequiresDuplicateDetection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).RequiresDuplicateDetection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DuplicateDetectionHistoryTimeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("EnableBatchedOperations")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus.CreateFrom); - } - if (content.Contains("SupportOrdering")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).SupportOrdering = (bool?) content.GetValueForProperty("SupportOrdering",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).SupportOrdering, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AutoDeleteOnIdle")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); - } - if (content.Contains("EnablePartitioning")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).EnablePartitioning = (bool?) content.GetValueForProperty("EnablePartitioning",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).EnablePartitioning, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("EnableExpress")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).EnableExpress = (bool?) content.GetValueForProperty("EnableExpress",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).EnableExpress, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("CountDetailActiveMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailScheduledMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("CountDetailTransferDeadLetterMessageCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// The Topic Properties definition. - [System.ComponentModel.TypeConverter(typeof(SbTopicPropertiesTypeConverter))] - public partial interface ISbTopicProperties - - { - - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecovery.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecovery.PowerShell.cs new file mode 100644 index 000000000000..3725224e9505 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecovery.PowerShell.cs @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + + /// Single item in List or Get Alias(Disaster Recovery configuration) operation + [System.ComponentModel.TypeConverter(typeof(ArmDisasterRecoveryTypeConverter))] + public partial class ArmDisasterRecovery + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ArmDisasterRecovery(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ArmDisasterRecoveryPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PendingReplicationOperationsCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("PartnerNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).PartnerNamespace = (string) content.GetValueForProperty("PartnerNamespace",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).PartnerNamespace, global::System.Convert.ToString); + } + if (content.Contains("AlternateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).AlternateName, global::System.Convert.ToString); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).Role, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ArmDisasterRecovery(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ArmDisasterRecoveryPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PendingReplicationOperationsCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("PartnerNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).PartnerNamespace = (string) content.GetValueForProperty("PartnerNamespace",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).PartnerNamespace, global::System.Convert.ToString); + } + if (content.Contains("AlternateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).AlternateName, global::System.Convert.ToString); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).Role, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ArmDisasterRecovery(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ArmDisasterRecovery(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Single item in List or Get Alias(Disaster Recovery configuration) operation + [System.ComponentModel.TypeConverter(typeof(ArmDisasterRecoveryTypeConverter))] + public partial interface IArmDisasterRecovery + + { + + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecovery.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecovery.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecovery.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecovery.TypeConverter.cs index 1725cd060901..ff450cf09532 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecovery.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecovery.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecovery.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecovery.cs similarity index 61% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecovery.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecovery.cs index a374d8de9ac9..c1f5b149ab86 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecovery.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecovery.cs @@ -3,92 +3,91 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Single item in List or Get Alias(Disaster Recovery configuration) operation [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class ArmDisasterRecovery : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(); /// Primary/Secondary eventhub namespace name, which is part of GEO DR pairing [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string AlternateName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)Property).AlternateName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)Property).AlternateName = value ?? null; } + public string AlternateName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)Property).AlternateName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)Property).AlternateName = value ?? null; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id = value; } - - /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; } /// Internal Acessors for PendingReplicationOperationsCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal.PendingReplicationOperationsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)Property).PendingReplicationOperationsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)Property).PendingReplicationOperationsCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal.PendingReplicationOperationsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)Property).PendingReplicationOperationsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)Property).PendingReplicationOperationsCount = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ArmDisasterRecoveryProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ArmDisasterRecoveryProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Role - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal.Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)Property).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)Property).Role = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal.Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)Property).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)Property).Role = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Location + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; } /// /// ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string PartnerNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)Property).PartnerNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)Property).PartnerNamespace = value ?? null; } + public string PartnerNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)Property).PartnerNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)Property).PartnerNamespace = value ?? null; } /// Number of entities pending to be replicated. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? PendingReplicationOperationsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)Property).PendingReplicationOperationsCount; } + public long? PendingReplicationOperationsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)Property).PendingReplicationOperationsCount; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryProperties _property; /// /// Properties required to the Create Or Update Alias(Disaster Recovery configurations) /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ArmDisasterRecoveryProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ArmDisasterRecoveryProperties()); set => this._property = value; } /// /// Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed' /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)Property).ProvisioningState; } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)Property).ProvisioningState; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] @@ -98,44 +97,44 @@ public partial class ArmDisasterRecovery : /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery? Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)Property).Role; } + public string Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)Property).Role; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; } /// Creates an new instance. public ArmDisasterRecovery() @@ -158,12 +157,15 @@ public ArmDisasterRecovery() /// Single item in List or Get Alias(Disaster Recovery configuration) operation public partial interface IArmDisasterRecovery : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource { /// Primary/Secondary eventhub namespace name, which is part of GEO DR pairing [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Primary/Secondary eventhub namespace name, which is part of GEO DR pairing", SerializedName = @"alternateName", PossibleTypes = new [] { typeof(string) })] @@ -174,6 +176,9 @@ public partial interface IArmDisasterRecovery : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing", SerializedName = @"partnerNamespace", PossibleTypes = new [] { typeof(string) })] @@ -182,6 +187,9 @@ public partial interface IArmDisasterRecovery : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of entities pending to be replicated.", SerializedName = @"pendingReplicationOperationsCount", PossibleTypes = new [] { typeof(long) })] @@ -192,73 +200,101 @@ public partial interface IArmDisasterRecovery : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Failed")] + string ProvisioningState { get; } /// /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'", SerializedName = @"role", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery? Role { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Primary", "PrimaryNotReplicating", "Secondary")] + string Role { get; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } } /// Single item in List or Get Alias(Disaster Recovery configuration) operation internal partial interface IArmDisasterRecoveryInternal : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal { /// Primary/Secondary eventhub namespace name, which is part of GEO DR pairing string AlternateName { get; set; } @@ -271,29 +307,33 @@ internal partial interface IArmDisasterRecoveryInternal : /// /// Properties required to the Create Or Update Alias(Disaster Recovery configurations) /// - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryProperties Property { get; set; } /// /// Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed' /// - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Failed")] + string ProvisioningState { get; set; } /// /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' /// - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery? Role { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Primary", "PrimaryNotReplicating", "Secondary")] + string Role { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecovery.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecovery.json.cs similarity index 91% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecovery.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecovery.json.cs index 5f8e78a2d0a8..e0fb5e273024 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecovery.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecovery.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -65,20 +65,20 @@ internal ArmDisasterRecovery(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runti { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ArmDisasterRecoveryProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ArmDisasterRecoveryProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new ArmDisasterRecovery(json) : null; } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryListResult.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.PowerShell.cs similarity index 74% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryListResult.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.PowerShell.cs index a323f4213965..34dc0066ba28 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryListResult.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ArmDisasterRecoveryListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal ArmDisasterRecoveryListResult(global::System.Collections.IDictionary co // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ArmDisasterRecoveryTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ArmDisasterRecoveryTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -103,39 +103,37 @@ internal ArmDisasterRecoveryListResult(global::System.Management.Automation.PSOb // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ArmDisasterRecoveryTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ArmDisasterRecoveryTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ArmDisasterRecoveryListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ArmDisasterRecoveryListResult(content); } @@ -145,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryListResult.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryListResult.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.TypeConverter.cs index 022d76c065e1..8096cc69395d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryListResult.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryListResult.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.cs similarity index 74% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryListResult.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.cs index f344583f19f1..a0f38c4bae16 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryListResult.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.cs @@ -3,19 +3,19 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The result of the List Alias(Disaster Recovery configuration) operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class ArmDisasterRecoveryListResult : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResult, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResult, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class ArmDisasterRecoveryListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery[] _value; + private System.Collections.Generic.List _value; /// List of Alias(Disaster Recovery configurations) [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public ArmDisasterRecoveryListResult() @@ -49,6 +49,9 @@ public partial interface IArmDisasterRecoveryListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Link to the next set of results. Not empty if Value contains incomplete list of Alias(Disaster Recovery configuration)", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -57,10 +60,13 @@ public partial interface IArmDisasterRecoveryListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of Alias(Disaster Recovery configurations)", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery) })] + System.Collections.Generic.List Value { get; set; } } /// The result of the List Alias(Disaster Recovery configuration) operation. @@ -72,7 +78,7 @@ internal partial interface IArmDisasterRecoveryListResultInternal /// string NextLink { get; set; } /// List of Alias(Disaster Recovery configurations) - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryListResult.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.json.cs similarity index 88% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryListResult.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.json.cs index eab69dbc84de..1bcea8360d91 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryListResult.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ArmDisasterRecoveryListResult(Microsoft.Azure.PowerShell.Cmdlets.Servic { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ArmDisasterRecovery.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ArmDisasterRecovery.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new ArmDisasterRecoveryListResult(json) : null; } @@ -110,7 +110,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso } container.Add("value",__w); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.PowerShell.cs similarity index 65% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryProperties.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.PowerShell.cs index 57369b901b3e..e02a6d72b426 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryProperties.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -65,7 +65,7 @@ public partial class ArmDisasterRecoveryProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -80,29 +80,29 @@ internal ArmDisasterRecoveryProperties(global::System.Collections.IDictionary co // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PendingReplicationOperationsCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("PartnerNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).PartnerNamespace = (string) content.GetValueForProperty("PartnerNamespace",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).PartnerNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).PartnerNamespace = (string) content.GetValueForProperty("PartnerNamespace",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).PartnerNamespace, global::System.Convert.ToString); } if (content.Contains("AlternateName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).AlternateName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).AlternateName, global::System.Convert.ToString); } if (content.Contains("Role")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).Role, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -117,51 +117,49 @@ internal ArmDisasterRecoveryProperties(global::System.Management.Automation.PSOb // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PendingReplicationOperationsCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("PartnerNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).PartnerNamespace = (string) content.GetValueForProperty("PartnerNamespace",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).PartnerNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).PartnerNamespace = (string) content.GetValueForProperty("PartnerNamespace",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).PartnerNamespace, global::System.Convert.ToString); } if (content.Contains("AlternateName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).AlternateName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).AlternateName, global::System.Convert.ToString); } if (content.Contains("Role")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal)this).Role, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ArmDisasterRecoveryProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ArmDisasterRecoveryProperties(content); } @@ -171,7 +169,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryProperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryProperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.TypeConverter.cs index f29cc8900dc0..df1854a14b86 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryProperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryProperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.cs similarity index 76% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryProperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.cs index eb514f850384..78bacc394120 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryProperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -12,8 +12,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Previe /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class ArmDisasterRecoveryProperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryProperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryProperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal { /// Backing field for property. @@ -24,13 +24,13 @@ public partial class ArmDisasterRecoveryProperties : public string AlternateName { get => this._alternateName; set => this._alternateName = value; } /// Internal Acessors for PendingReplicationOperationsCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal.PendingReplicationOperationsCount { get => this._pendingReplicationOperationsCount; set { {_pendingReplicationOperationsCount = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal.PendingReplicationOperationsCount { get => this._pendingReplicationOperationsCount; set { {_pendingReplicationOperationsCount = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for Role - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryPropertiesInternal.Role { get => this._role; set { {_role = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryPropertiesInternal.Role { get => this._role; set { {_role = value;} } } /// Backing field for property. private string _partnerNamespace; @@ -49,22 +49,22 @@ public partial class ArmDisasterRecoveryProperties : public long? PendingReplicationOperationsCount { get => this._pendingReplicationOperationsCount; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr? _provisioningState; + private string _provisioningState; /// /// Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed' /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr? ProvisioningState { get => this._provisioningState; } + public string ProvisioningState { get => this._provisioningState; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery? _role; + private string _role; /// /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery? Role { get => this._role; } + public string Role { get => this._role; } /// Creates an new instance. public ArmDisasterRecoveryProperties() @@ -80,6 +80,9 @@ public partial interface IArmDisasterRecoveryProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Primary/Secondary eventhub namespace name, which is part of GEO DR pairing", SerializedName = @"alternateName", PossibleTypes = new [] { typeof(string) })] @@ -90,6 +93,9 @@ public partial interface IArmDisasterRecoveryProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing", SerializedName = @"partnerNamespace", PossibleTypes = new [] { typeof(string) })] @@ -98,6 +104,9 @@ public partial interface IArmDisasterRecoveryProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of entities pending to be replicated.", SerializedName = @"pendingReplicationOperationsCount", PossibleTypes = new [] { typeof(long) })] @@ -108,20 +117,28 @@ public partial interface IArmDisasterRecoveryProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Failed")] + string ProvisioningState { get; } /// /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'", SerializedName = @"role", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery? Role { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Primary", "PrimaryNotReplicating", "Secondary")] + string Role { get; } } /// Properties required to the Create Or Update Alias(Disaster Recovery configurations) @@ -139,11 +156,13 @@ internal partial interface IArmDisasterRecoveryPropertiesInternal /// /// Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed' /// - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Failed")] + string ProvisioningState { get; set; } /// /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' /// - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery? Role { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Primary", "PrimaryNotReplicating", "Secondary")] + string Role { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryProperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.json.cs similarity index 91% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryProperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.json.cs index df0a4cdc2663..fa0361bc296c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ArmDisasterRecoveryProperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -67,22 +67,22 @@ internal ArmDisasterRecoveryProperties(Microsoft.Azure.PowerShell.Cmdlets.Servic { return; } - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_pendingReplicationOperationsCount = If( json?.PropertyT("pendingReplicationOperationsCount"), out var __jsonPendingReplicationOperationsCount) ? (long?)__jsonPendingReplicationOperationsCount : PendingReplicationOperationsCount;} - {_partnerNamespace = If( json?.PropertyT("partnerNamespace"), out var __jsonPartnerNamespace) ? (string)__jsonPartnerNamespace : (string)PartnerNamespace;} - {_alternateName = If( json?.PropertyT("alternateName"), out var __jsonAlternateName) ? (string)__jsonAlternateName : (string)AlternateName;} - {_role = If( json?.PropertyT("role"), out var __jsonRole) ? (string)__jsonRole : (string)Role;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_pendingReplicationOperationsCount = If( json?.PropertyT("pendingReplicationOperationsCount"), out var __jsonPendingReplicationOperationsCount) ? (long?)__jsonPendingReplicationOperationsCount : _pendingReplicationOperationsCount;} + {_partnerNamespace = If( json?.PropertyT("partnerNamespace"), out var __jsonPartnerNamespace) ? (string)__jsonPartnerNamespace : (string)_partnerNamespace;} + {_alternateName = If( json?.PropertyT("alternateName"), out var __jsonAlternateName) ? (string)__jsonAlternateName : (string)_alternateName;} + {_role = If( json?.PropertyT("role"), out var __jsonRole) ? (string)__jsonRole : (string)_role;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new ArmDisasterRecoveryProperties(json) : null; } @@ -106,17 +106,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._pendingReplicationOperationsCount ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNumber((long)this._pendingReplicationOperationsCount) : null, "pendingReplicationOperationsCount" ,container.Add ); } AddIf( null != (((object)this._partnerNamespace)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._partnerNamespace.ToString()) : null, "partnerNamespace" ,container.Add ); AddIf( null != (((object)this._alternateName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._alternateName.ToString()) : null, "alternateName" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._role)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._role.ToString()) : null, "role" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailability.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailability.PowerShell.cs similarity index 83% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailability.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailability.PowerShell.cs index 0d3f76f69f9d..b696de18f7b4 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailability.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailability.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CheckNameAvailability partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,13 +78,13 @@ internal CheckNameAvailability(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityInternal)this).Name, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -99,35 +99,33 @@ internal CheckNameAvailability(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityInternal)this).Name, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CheckNameAvailability(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CheckNameAvailability(content); } @@ -137,7 +135,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailability.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailability.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailability.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailability.TypeConverter.cs index 2a9aa5b30096..eb12efb787fb 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailability.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailability.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailability.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailability.cs similarity index 89% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailability.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailability.cs index 8ca8fb4d648d..0165b20bd529 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailability.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailability.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Description of a Check Name availability request properties. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class CheckNameAvailability : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityInternal { /// Backing field for property. @@ -41,6 +41,9 @@ public partial interface ICheckNameAvailability : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailability.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailability.json.cs similarity index 93% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailability.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailability.json.cs index 037a6ab2338f..9180b1b5ee51 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailability.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailability.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -65,18 +65,18 @@ internal CheckNameAvailability(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Run { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new CheckNameAvailability(json) : null; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailabilityResult.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailabilityResult.PowerShell.cs similarity index 73% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailabilityResult.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailabilityResult.PowerShell.cs index 85e0e2b460ff..7be1564f182b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailabilityResult.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailabilityResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CheckNameAvailabilityResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,21 +78,21 @@ internal CheckNameAvailabilityResult(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResultInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResultInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("NameAvailable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResultInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResultInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResultInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResultInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Reason")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResultInternal)this).Reason = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason?) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResultInternal)this).Reason, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResultInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResultInternal)this).Reason, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -107,43 +107,41 @@ internal CheckNameAvailabilityResult(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResultInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResultInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("NameAvailable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResultInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResultInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResultInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResultInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Reason")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResultInternal)this).Reason = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason?) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResultInternal)this).Reason, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResultInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResultInternal)this).Reason, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CheckNameAvailabilityResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CheckNameAvailabilityResult(content); } @@ -153,7 +151,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailabilityResult.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailabilityResult.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailabilityResult.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailabilityResult.TypeConverter.cs index 4e0c2d7fb1f7..30782f0968ff 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailabilityResult.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailabilityResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailabilityResult.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailabilityResult.cs similarity index 77% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailabilityResult.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailabilityResult.cs index 59939522b0e4..f00a19e45c5a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailabilityResult.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailabilityResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Description of a Check Name availability request properties. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class CheckNameAvailabilityResult : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResultInternal { /// Backing field for property. @@ -22,7 +22,7 @@ public partial class CheckNameAvailabilityResult : public string Message { get => this._message; } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResultInternal.Message { get => this._message; set { {_message = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResultInternal.Message { get => this._message; set { {_message = value;} } } /// Backing field for property. private bool? _nameAvailable; @@ -34,11 +34,11 @@ public partial class CheckNameAvailabilityResult : public bool? NameAvailable { get => this._nameAvailable; set => this._nameAvailable = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason? _reason; + private string _reason; /// The reason for unavailability of a namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason? Reason { get => this._reason; set => this._reason = value; } + public string Reason { get => this._reason; set => this._reason = value; } /// Creates an new instance. public CheckNameAvailabilityResult() @@ -54,6 +54,9 @@ public partial interface ICheckNameAvailabilityResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The detailed info regarding the reason associated with the namespace.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -64,6 +67,9 @@ public partial interface ICheckNameAvailabilityResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value indicating namespace is availability, true if the namespace is available; otherwise, false.", SerializedName = @"nameAvailable", PossibleTypes = new [] { typeof(bool) })] @@ -72,10 +78,14 @@ public partial interface ICheckNameAvailabilityResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The reason for unavailability of a namespace.", SerializedName = @"reason", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason? Reason { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("None", "InvalidName", "SubscriptionIsDisabled", "NameInUse", "NameInLockdown", "TooManyNamespaceInCurrentSubscription")] + string Reason { get; set; } } /// Description of a Check Name availability request properties. @@ -89,7 +99,8 @@ internal partial interface ICheckNameAvailabilityResultInternal /// bool? NameAvailable { get; set; } /// The reason for unavailability of a namespace. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason? Reason { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("None", "InvalidName", "SubscriptionIsDisabled", "NameInUse", "NameInLockdown", "TooManyNamespaceInCurrentSubscription")] + string Reason { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailabilityResult.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailabilityResult.json.cs similarity index 92% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailabilityResult.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailabilityResult.json.cs index 39261ffbdf68..cf1b17439230 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CheckNameAvailabilityResult.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CheckNameAvailabilityResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -65,20 +65,20 @@ internal CheckNameAvailabilityResult(Microsoft.Azure.PowerShell.Cmdlets.ServiceB { return; } - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_nameAvailable = If( json?.PropertyT("nameAvailable"), out var __jsonNameAvailable) ? (bool?)__jsonNameAvailable : NameAvailable;} - {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)Reason;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_nameAvailable = If( json?.PropertyT("nameAvailable"), out var __jsonNameAvailable) ? (bool?)__jsonNameAvailable : _nameAvailable;} + {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)_reason;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new CheckNameAvailabilityResult(json) : null; } @@ -102,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ConnectionState.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ConnectionState.PowerShell.cs similarity index 77% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ConnectionState.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ConnectionState.PowerShell.cs index 0e96b8cb91ce..001c06a1a70c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ConnectionState.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ConnectionState.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ConnectionState partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal ConnectionState(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionStateInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionStateInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionStateInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionStateInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionStateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionStateInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionStateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionStateInternal)this).Description, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -103,37 +103,37 @@ internal ConnectionState(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionStateInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionStateInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionStateInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionStateInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionStateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionStateInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionStateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionStateInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ConnectionState(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ConnectionState(content); } @@ -143,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ConnectionState.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ConnectionState.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ConnectionState.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ConnectionState.TypeConverter.cs index bb99a8eabee3..809bfaeb39e7 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ConnectionState.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ConnectionState.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ConnectionState.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ConnectionState.cs similarity index 73% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ConnectionState.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ConnectionState.cs index 3c8a904de274..ff849a0ac231 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ConnectionState.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ConnectionState.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// ConnectionState information. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class ConnectionState : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionStateInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionStateInternal { /// Backing field for property. @@ -22,11 +22,11 @@ public partial class ConnectionState : public string Description { get => this._description; set => this._description = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus? _status; + private string _status; /// Status of the connection. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus? Status { get => this._status; set => this._status = value; } + public string Status { get => this._status; set => this._status = value; } /// Creates an new instance. public ConnectionState() @@ -42,6 +42,9 @@ public partial interface IConnectionState : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Description of the connection state.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -50,10 +53,14 @@ public partial interface IConnectionState : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Status of the connection.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus? Status { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] + string Status { get; set; } } /// ConnectionState information. @@ -63,7 +70,8 @@ internal partial interface IConnectionStateInternal /// Description of the connection state. string Description { get; set; } /// Status of the connection. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus? Status { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] + string Status { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ConnectionState.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ConnectionState.json.cs similarity index 94% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ConnectionState.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ConnectionState.json.cs index f365539809dc..f15f1bd81d66 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ConnectionState.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ConnectionState.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ConnectionState(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.J { return; } - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new ConnectionState(json) : null; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilter.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilter.PowerShell.cs similarity index 59% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilter.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilter.PowerShell.cs index 867bf7689252..29aed8bd07bf 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilter.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilter.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CorrelationFilter partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,49 +78,49 @@ internal CorrelationFilter(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilterPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilterPropertiesTypeConverter.ConvertFrom); } if (content.Contains("CorrelationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).CorrelationId = (string) content.GetValueForProperty("CorrelationId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).CorrelationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).CorrelationId = (string) content.GetValueForProperty("CorrelationId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).CorrelationId, global::System.Convert.ToString); } if (content.Contains("MessageId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).MessageId = (string) content.GetValueForProperty("MessageId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).MessageId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).MessageId = (string) content.GetValueForProperty("MessageId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).MessageId, global::System.Convert.ToString); } if (content.Contains("To")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).To = (string) content.GetValueForProperty("To",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).To, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).To = (string) content.GetValueForProperty("To",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).To, global::System.Convert.ToString); } if (content.Contains("ReplyTo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).ReplyTo = (string) content.GetValueForProperty("ReplyTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).ReplyTo, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).ReplyTo = (string) content.GetValueForProperty("ReplyTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).ReplyTo, global::System.Convert.ToString); } if (content.Contains("Label")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).Label = (string) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).Label, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).Label = (string) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).Label, global::System.Convert.ToString); } if (content.Contains("SessionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).SessionId = (string) content.GetValueForProperty("SessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).SessionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).SessionId = (string) content.GetValueForProperty("SessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).SessionId, global::System.Convert.ToString); } if (content.Contains("ReplyToSessionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).ReplyToSessionId = (string) content.GetValueForProperty("ReplyToSessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).ReplyToSessionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).ReplyToSessionId = (string) content.GetValueForProperty("ReplyToSessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).ReplyToSessionId, global::System.Convert.ToString); } if (content.Contains("ContentType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).ContentType = (string) content.GetValueForProperty("ContentType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).ContentType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).ContentType = (string) content.GetValueForProperty("ContentType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).ContentType, global::System.Convert.ToString); } if (content.Contains("RequiresPreprocessing")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).RequiresPreprocessing = (bool?) content.GetValueForProperty("RequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).RequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).RequiresPreprocessing = (bool?) content.GetValueForProperty("RequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).RequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -135,71 +135,69 @@ internal CorrelationFilter(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilterPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilterPropertiesTypeConverter.ConvertFrom); } if (content.Contains("CorrelationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).CorrelationId = (string) content.GetValueForProperty("CorrelationId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).CorrelationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).CorrelationId = (string) content.GetValueForProperty("CorrelationId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).CorrelationId, global::System.Convert.ToString); } if (content.Contains("MessageId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).MessageId = (string) content.GetValueForProperty("MessageId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).MessageId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).MessageId = (string) content.GetValueForProperty("MessageId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).MessageId, global::System.Convert.ToString); } if (content.Contains("To")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).To = (string) content.GetValueForProperty("To",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).To, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).To = (string) content.GetValueForProperty("To",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).To, global::System.Convert.ToString); } if (content.Contains("ReplyTo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).ReplyTo = (string) content.GetValueForProperty("ReplyTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).ReplyTo, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).ReplyTo = (string) content.GetValueForProperty("ReplyTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).ReplyTo, global::System.Convert.ToString); } if (content.Contains("Label")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).Label = (string) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).Label, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).Label = (string) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).Label, global::System.Convert.ToString); } if (content.Contains("SessionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).SessionId = (string) content.GetValueForProperty("SessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).SessionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).SessionId = (string) content.GetValueForProperty("SessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).SessionId, global::System.Convert.ToString); } if (content.Contains("ReplyToSessionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).ReplyToSessionId = (string) content.GetValueForProperty("ReplyToSessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).ReplyToSessionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).ReplyToSessionId = (string) content.GetValueForProperty("ReplyToSessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).ReplyToSessionId, global::System.Convert.ToString); } if (content.Contains("ContentType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).ContentType = (string) content.GetValueForProperty("ContentType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).ContentType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).ContentType = (string) content.GetValueForProperty("ContentType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).ContentType, global::System.Convert.ToString); } if (content.Contains("RequiresPreprocessing")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).RequiresPreprocessing = (bool?) content.GetValueForProperty("RequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)this).RequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).RequiresPreprocessing = (bool?) content.GetValueForProperty("RequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)this).RequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CorrelationFilter(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CorrelationFilter(content); } @@ -209,7 +207,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilter.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilter.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilter.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilter.TypeConverter.cs index c9a0def3a7dd..a469ff010159 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilter.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilter.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilter.cs similarity index 87% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilter.cs index f920910f2926..18dbf2048ede 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilter.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Represents the correlation filter expression. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class CorrelationFilter : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal { /// Backing field for property. @@ -43,11 +43,11 @@ public partial class CorrelationFilter : public string MessageId { get => this._messageId; set => this._messageId = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties _property; /// dictionary object for custom filters [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilterProperties()); set => this._property = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilterProperties()); set => this._property = value; } /// Backing field for property. private string _replyTo; @@ -98,6 +98,9 @@ public partial interface ICorrelationFilter : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Content type of the message.", SerializedName = @"contentType", PossibleTypes = new [] { typeof(string) })] @@ -106,6 +109,9 @@ public partial interface ICorrelationFilter : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Identifier of the correlation.", SerializedName = @"correlationId", PossibleTypes = new [] { typeof(string) })] @@ -114,6 +120,9 @@ public partial interface ICorrelationFilter : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Application specific label.", SerializedName = @"label", PossibleTypes = new [] { typeof(string) })] @@ -122,6 +131,9 @@ public partial interface ICorrelationFilter : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Identifier of the message.", SerializedName = @"messageId", PossibleTypes = new [] { typeof(string) })] @@ -130,14 +142,20 @@ public partial interface ICorrelationFilter : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"dictionary object for custom filters", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties Property { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties Property { get; set; } /// Address of the queue to reply to. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Address of the queue to reply to.", SerializedName = @"replyTo", PossibleTypes = new [] { typeof(string) })] @@ -146,6 +164,9 @@ public partial interface ICorrelationFilter : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Session identifier to reply to.", SerializedName = @"replyToSessionId", PossibleTypes = new [] { typeof(string) })] @@ -154,6 +175,9 @@ public partial interface ICorrelationFilter : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether the rule action requires preprocessing.", SerializedName = @"requiresPreprocessing", PossibleTypes = new [] { typeof(bool) })] @@ -162,6 +186,9 @@ public partial interface ICorrelationFilter : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Session identifier.", SerializedName = @"sessionId", PossibleTypes = new [] { typeof(string) })] @@ -170,6 +197,9 @@ public partial interface ICorrelationFilter : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Address to send to.", SerializedName = @"to", PossibleTypes = new [] { typeof(string) })] @@ -189,7 +219,7 @@ internal partial interface ICorrelationFilterInternal /// Identifier of the message. string MessageId { get; set; } /// dictionary object for custom filters - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties Property { get; set; } /// Address of the queue to reply to. string ReplyTo { get; set; } /// Session identifier to reply to. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilter.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilter.json.cs similarity index 92% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilter.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilter.json.cs index 56272de615d6..ed194d49d350 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilter.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilter.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -65,27 +65,27 @@ internal CorrelationFilter(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilterProperties.FromJson(__jsonProperties) : Property;} - {_correlationId = If( json?.PropertyT("correlationId"), out var __jsonCorrelationId) ? (string)__jsonCorrelationId : (string)CorrelationId;} - {_messageId = If( json?.PropertyT("messageId"), out var __jsonMessageId) ? (string)__jsonMessageId : (string)MessageId;} - {_to = If( json?.PropertyT("to"), out var __jsonTo) ? (string)__jsonTo : (string)To;} - {_replyTo = If( json?.PropertyT("replyTo"), out var __jsonReplyTo) ? (string)__jsonReplyTo : (string)ReplyTo;} - {_label = If( json?.PropertyT("label"), out var __jsonLabel) ? (string)__jsonLabel : (string)Label;} - {_sessionId = If( json?.PropertyT("sessionId"), out var __jsonSessionId) ? (string)__jsonSessionId : (string)SessionId;} - {_replyToSessionId = If( json?.PropertyT("replyToSessionId"), out var __jsonReplyToSessionId) ? (string)__jsonReplyToSessionId : (string)ReplyToSessionId;} - {_contentType = If( json?.PropertyT("contentType"), out var __jsonContentType) ? (string)__jsonContentType : (string)ContentType;} - {_requiresPreprocessing = If( json?.PropertyT("requiresPreprocessing"), out var __jsonRequiresPreprocessing) ? (bool?)__jsonRequiresPreprocessing : RequiresPreprocessing;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilterProperties.FromJson(__jsonProperties) : _property;} + {_correlationId = If( json?.PropertyT("correlationId"), out var __jsonCorrelationId) ? (string)__jsonCorrelationId : (string)_correlationId;} + {_messageId = If( json?.PropertyT("messageId"), out var __jsonMessageId) ? (string)__jsonMessageId : (string)_messageId;} + {_to = If( json?.PropertyT("to"), out var __jsonTo) ? (string)__jsonTo : (string)_to;} + {_replyTo = If( json?.PropertyT("replyTo"), out var __jsonReplyTo) ? (string)__jsonReplyTo : (string)_replyTo;} + {_label = If( json?.PropertyT("label"), out var __jsonLabel) ? (string)__jsonLabel : (string)_label;} + {_sessionId = If( json?.PropertyT("sessionId"), out var __jsonSessionId) ? (string)__jsonSessionId : (string)_sessionId;} + {_replyToSessionId = If( json?.PropertyT("replyToSessionId"), out var __jsonReplyToSessionId) ? (string)__jsonReplyToSessionId : (string)_replyToSessionId;} + {_contentType = If( json?.PropertyT("contentType"), out var __jsonContentType) ? (string)__jsonContentType : (string)_contentType;} + {_requiresPreprocessing = If( json?.PropertyT("requiresPreprocessing"), out var __jsonRequiresPreprocessing) ? (bool?)__jsonRequiresPreprocessing : _requiresPreprocessing;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new CorrelationFilter(json) : null; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilterProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilterProperties.PowerShell.cs similarity index 88% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilterProperties.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilterProperties.PowerShell.cs index a9dc711d9342..6f605e3c8c1a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilterProperties.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilterProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CorrelationFilterProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -82,7 +82,7 @@ internal CorrelationFilterProperties(global::System.Collections.IDictionary cont } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -101,29 +101,27 @@ internal CorrelationFilterProperties(global::System.Management.Automation.PSObje } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CorrelationFilterProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CorrelationFilterProperties(content); } @@ -133,7 +131,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilterProperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilterProperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilterProperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilterProperties.TypeConverter.cs index 9e499c9afe38..2e9c23cd2d66 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilterProperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilterProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilterProperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilterProperties.cs similarity index 78% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilterProperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilterProperties.cs index 49167e2ac708..3f3c8ffa3f2d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilterProperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilterProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// dictionary object for custom filters public partial class CorrelationFilterProperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterPropertiesInternal { /// Creates an new instance. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilterProperties.dictionary.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilterProperties.dictionary.cs similarity index 95% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilterProperties.dictionary.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilterProperties.dictionary.cs index 6ed3a97b75eb..31db6682e962 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilterProperties.dictionary.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilterProperties.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilterProperties source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilterProperties source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilterProperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilterProperties.json.cs similarity index 94% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilterProperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilterProperties.json.cs index 4085321a0cc7..e799c741bbeb 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/CorrelationFilterProperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/CorrelationFilterProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -71,13 +71,13 @@ internal CorrelationFilterProperties(Microsoft.Azure.PowerShell.Cmdlets.ServiceB } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new CorrelationFilterProperties(json) : null; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Encryption.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Encryption.PowerShell.cs similarity index 70% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Encryption.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Encryption.PowerShell.cs index 9d8817c27252..450c3796f9aa 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Encryption.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Encryption.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class Encryption partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Encryption(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Encryption(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,21 +104,21 @@ internal Encryption(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("KeyVaultProperty")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)this).KeyVaultProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]) content.GetValueForProperty("KeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)this).KeyVaultProperty, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)this).KeyVaultProperty = (System.Collections.Generic.List) content.GetValueForProperty("KeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)this).KeyVaultProperty, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultPropertiesTypeConverter.ConvertFrom)); } if (content.Contains("KeySource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)this).KeySource = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource?) content.GetValueForProperty("KeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)this).KeySource, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)this).KeySource = (string) content.GetValueForProperty("KeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)this).KeySource, global::System.Convert.ToString); } if (content.Contains("RequireInfrastructureEncryption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)this).RequireInfrastructureEncryption = (bool?) content.GetValueForProperty("RequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)this).RequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)this).RequireInfrastructureEncryption = (bool?) content.GetValueForProperty("RequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)this).RequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -133,15 +133,15 @@ internal Encryption(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("KeyVaultProperty")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)this).KeyVaultProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]) content.GetValueForProperty("KeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)this).KeyVaultProperty, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)this).KeyVaultProperty = (System.Collections.Generic.List) content.GetValueForProperty("KeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)this).KeyVaultProperty, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultPropertiesTypeConverter.ConvertFrom)); } if (content.Contains("KeySource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)this).KeySource = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource?) content.GetValueForProperty("KeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)this).KeySource, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)this).KeySource = (string) content.GetValueForProperty("KeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)this).KeySource, global::System.Convert.ToString); } if (content.Contains("RequireInfrastructureEncryption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)this).RequireInfrastructureEncryption = (bool?) content.GetValueForProperty("RequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)this).RequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)this).RequireInfrastructureEncryption = (bool?) content.GetValueForProperty("RequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)this).RequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } @@ -151,7 +151,7 @@ internal Encryption(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Encryption.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Encryption.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Encryption.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Encryption.TypeConverter.cs index 8c5dfaf0f817..f5da0916a294 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Encryption.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Encryption.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Encryption.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Encryption.cs similarity index 68% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Encryption.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Encryption.cs index 8fc2693563b9..f76c410f20be 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Encryption.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Encryption.cs @@ -3,30 +3,30 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Properties to configure Encryption [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class Encryption : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource? _keySource; + private string _keySource; /// Enumerates the possible value of keySource for Encryption [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource? KeySource { get => this._keySource; set => this._keySource = value; } + public string KeySource { get => this._keySource; set => this._keySource = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] _keyVaultProperty; + private System.Collections.Generic.List _keyVaultProperty; /// Properties of KeyVault [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] KeyVaultProperty { get => this._keyVaultProperty; set => this._keyVaultProperty = value; } + public System.Collections.Generic.List KeyVaultProperty { get => this._keyVaultProperty; set => this._keyVaultProperty = value; } /// Backing field for property. private bool? _requireInfrastructureEncryption; @@ -49,22 +49,32 @@ public partial interface IEncryption : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible value of keySource for Encryption", SerializedName = @"keySource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource? KeySource { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + string KeySource { get; set; } /// Properties of KeyVault [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Properties of KeyVault", SerializedName = @"keyVaultProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] KeyVaultProperty { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties) })] + System.Collections.Generic.List KeyVaultProperty { get; set; } /// Enable Infrastructure Encryption (Double Encryption) [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enable Infrastructure Encryption (Double Encryption)", SerializedName = @"requireInfrastructureEncryption", PossibleTypes = new [] { typeof(bool) })] @@ -76,9 +86,10 @@ internal partial interface IEncryptionInternal { /// Enumerates the possible value of keySource for Encryption - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource? KeySource { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + string KeySource { get; set; } /// Properties of KeyVault - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] KeyVaultProperty { get; set; } + System.Collections.Generic.List KeyVaultProperty { get; set; } /// Enable Infrastructure Encryption (Double Encryption) bool? RequireInfrastructureEncryption { get; set; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Encryption.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Encryption.json.cs similarity index 90% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Encryption.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Encryption.json.cs index a04423ccbab1..a15064e167ef 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Encryption.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Encryption.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -65,20 +65,20 @@ internal Encryption(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.J { return; } - {_keyVaultProperty = If( json?.PropertyT("keyVaultProperties"), out var __jsonKeyVaultProperties) ? If( __jsonKeyVaultProperties as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultProperties.FromJson(__u) )) ))() : null : KeyVaultProperty;} - {_keySource = If( json?.PropertyT("keySource"), out var __jsonKeySource) ? (string)__jsonKeySource : (string)KeySource;} - {_requireInfrastructureEncryption = If( json?.PropertyT("requireInfrastructureEncryption"), out var __jsonRequireInfrastructureEncryption) ? (bool?)__jsonRequireInfrastructureEncryption : RequireInfrastructureEncryption;} + {_keyVaultProperty = If( json?.PropertyT("keyVaultProperties"), out var __jsonKeyVaultProperties) ? If( __jsonKeyVaultProperties as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultProperties.FromJson(__u) )) ))() : null : _keyVaultProperty;} + {_keySource = If( json?.PropertyT("keySource"), out var __jsonKeySource) ? (string)__jsonKeySource : (string)_keySource;} + {_requireInfrastructureEncryption = If( json?.PropertyT("requireInfrastructureEncryption"), out var __jsonRequireInfrastructureEncryption) ? (bool?)__jsonRequireInfrastructureEncryption : _requireInfrastructureEncryption;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new Encryption(json) : null; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorAdditionalInfo.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs similarity index 80% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorAdditionalInfo.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs index 6d1f34f385e0..5ec5c61f5427 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorAdditionalInfo.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class ErrorAdditionalInfo partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ErrorAdditionalInfo(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ErrorAdditionalInfo(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,17 +104,17 @@ internal ErrorAdditionalInfo(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Info")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AnyTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -129,11 +129,11 @@ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Info")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AnyTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } @@ -143,7 +143,7 @@ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject conte /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorAdditionalInfo.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs similarity index 97% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorAdditionalInfo.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs index 888e3cec0230..23b15c2e3f7c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorAdditionalInfo.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfo).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorAdditionalInfo.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorAdditionalInfo.cs similarity index 82% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorAdditionalInfo.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorAdditionalInfo.cs index 66ed6e7314c9..b8aced97ef8f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorAdditionalInfo.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorAdditionalInfo.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The resource management error additional info. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class ErrorAdditionalInfo : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfoInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfoInternal { /// Backing field for property. @@ -22,10 +22,10 @@ public partial class ErrorAdditionalInfo : public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Any()); } /// Internal Acessors for Info - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Any()); set { {_info = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Any()); set { {_info = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _type; @@ -48,6 +48,9 @@ public partial interface IErrorAdditionalInfo : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The additional info.", SerializedName = @"info", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAny) })] @@ -56,6 +59,9 @@ public partial interface IErrorAdditionalInfo : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The additional info type.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorAdditionalInfo.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs similarity index 92% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorAdditionalInfo.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs index 9b90fa596b93..eecbf80bed7b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorAdditionalInfo.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runti { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Any.FromJson(__jsonInfo) : Info;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Any.FromJson(__jsonInfo) : _info;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfo. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfo. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null; } @@ -101,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponse.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs similarity index 65% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponse.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs index 5eb502de24db..d9012aa61531 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponse.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class ErrorResponse partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ErrorResponse(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ErrorResponse(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,33 +104,33 @@ internal ErrorResponse(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponseErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponseErrorTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponseTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponseTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -145,27 +145,27 @@ internal ErrorResponse(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponseErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponseErrorTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponseTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponseTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -175,7 +175,7 @@ internal ErrorResponse(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponse.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs similarity index 97% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponse.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs index b2f3009a0c95..7d0d78f1e61a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponse.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponse.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponse.cs similarity index 55% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponse.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponse.cs index 292ab6c465f2..c123a1b27ab0 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponse.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponse.cs @@ -3,61 +3,61 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The resource management error response. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class ErrorResponse : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal { /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)Error).AdditionalInfo; } + public System.Collections.Generic.List AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)Error).AdditionalInfo; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)Error).Code; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)Error).Code; } /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)Error).Detail; } + public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)Error).Detail; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseError _error; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseError _error; /// The error object. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponseError()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponseError()); set => this._error = value; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)Error).Message; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)Error).Message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)Error).AdditionalInfo = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)Error).AdditionalInfo = value; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)Error).Code = value; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse[] Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)Error).Detail = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)Error).Detail = value; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseError Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponseError()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseError Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponseError()); set { {_error = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)Error).Message = value; } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)Error).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)Error).Target = value; } /// The error target. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)Error).Target; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)Error).Target; } /// Creates an new instance. public ErrorResponse() @@ -73,14 +73,20 @@ public partial interface IErrorResponse : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error additional info.", SerializedName = @"additionalInfo", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -89,14 +95,20 @@ public partial interface IErrorResponse : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error details.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse) })] + System.Collections.Generic.List Detail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error message.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -105,6 +117,9 @@ public partial interface IErrorResponse : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error target.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] @@ -116,13 +131,13 @@ internal partial interface IErrorResponseInternal { /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + System.Collections.Generic.List AdditionalInfo { get; set; } /// The error code. string Code { get; set; } /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse[] Detail { get; set; } + System.Collections.Generic.List Detail { get; set; } /// The error object. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseError Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseError Error { get; set; } /// The error message. string Message { get; set; } /// The error target. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponse.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponse.json.cs similarity index 94% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponse.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponse.json.cs index 5e8306e0ca55..9cf94234f588 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponse.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponse.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -65,18 +65,18 @@ internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Jso { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponseError.FromJson(__jsonError) : Error;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponseError.FromJson(__jsonError) : _error;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponseError.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponseError.PowerShell.cs similarity index 67% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponseError.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponseError.PowerShell.cs index af3330e8b181..695e3326e7ff 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponseError.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponseError.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class ErrorResponseError partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseError DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseError DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ErrorResponseError(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ErrorResponseError(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,29 +104,29 @@ internal ErrorResponseError(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponseTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponseTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -141,23 +141,23 @@ internal ErrorResponseError(global::System.Management.Automation.PSObject conten // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponseTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponseTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -167,7 +167,7 @@ internal ErrorResponseError(global::System.Management.Automation.PSObject conten /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponseError.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponseError.TypeConverter.cs similarity index 97% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponseError.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponseError.TypeConverter.cs index 8863bd37125f..8d81114e90cb 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponseError.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponseError.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseError ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseError).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponseError.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponseError.cs similarity index 66% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponseError.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponseError.cs index 13b29473a9e2..5885f50f806f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponseError.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponseError.cs @@ -3,23 +3,23 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The error object. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class ErrorResponseError : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseError, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseError, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo[] _additionalInfo; + private System.Collections.Generic.List _additionalInfo; /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; } + public System.Collections.Generic.List AdditionalInfo { get => this._additionalInfo; } /// Backing field for property. private string _code; @@ -29,11 +29,11 @@ public partial class ErrorResponseError : public string Code { get => this._code; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse[] _detail; + private System.Collections.Generic.List _detail; /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse[] Detail { get => this._detail; } + public System.Collections.Generic.List Detail { get => this._detail; } /// Backing field for property. private string _message; @@ -43,19 +43,19 @@ public partial class ErrorResponseError : public string Message { get => this._message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal.Code { get => this._code; set { {_code = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal.Code { get => this._code; set { {_code = value;} } } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse[] Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal.Detail { get => this._detail; set { {_detail = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal.Detail { get => this._detail; set { {_detail = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal.Message { get => this._message; set { {_message = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal.Message { get => this._message; set { {_message = value;} } } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseErrorInternal.Target { get => this._target; set { {_target = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseErrorInternal.Target { get => this._target; set { {_target = value;} } } /// Backing field for property. private string _target; @@ -78,14 +78,20 @@ public partial interface IErrorResponseError : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error additional info.", SerializedName = @"additionalInfo", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -94,14 +100,20 @@ public partial interface IErrorResponseError : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error details.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse) })] + System.Collections.Generic.List Detail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error message.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -110,6 +122,9 @@ public partial interface IErrorResponseError : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error target.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] @@ -121,11 +136,11 @@ internal partial interface IErrorResponseErrorInternal { /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + System.Collections.Generic.List AdditionalInfo { get; set; } /// The error code. string Code { get; set; } /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse[] Detail { get; set; } + System.Collections.Generic.List Detail { get; set; } /// The error message. string Message { get; set; } /// The error target. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponseError.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponseError.json.cs similarity index 84% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponseError.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponseError.json.cs index 1f4c01e95a23..c7a19967ac33 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ErrorResponseError.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ErrorResponseError.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -65,22 +65,22 @@ internal ErrorResponseError(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtim { return; } - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} - {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(__u) )) ))() : null : Detail;} - {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;} + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)_target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(__u) )) ))() : null : _detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : _additionalInfo;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseError. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseError. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseError. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseError. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponseError FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponseError FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new ErrorResponseError(json) : null; } @@ -104,19 +104,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { if (null != this._detail) { @@ -128,7 +128,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso container.Add("details",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { if (null != this._additionalInfo) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties.PowerShell.cs similarity index 76% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverProperties.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties.PowerShell.cs index da6cedc3ac2c..4639ecb9e3e8 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverProperties.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -65,35 +65,33 @@ public partial class FailoverProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new FailoverProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new FailoverProperties(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -108,17 +106,17 @@ internal FailoverProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGenerated) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.FailoverPropertiesAutoGeneratedTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.FailoverProperties1TypeConverter.ConvertFrom); } if (content.Contains("IsSafeFailover")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesInternal)this).IsSafeFailover = (bool?) content.GetValueForProperty("IsSafeFailover",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesInternal)this).IsSafeFailover, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverPropertiesInternal)this).IsSafeFailover = (bool?) content.GetValueForProperty("IsSafeFailover",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverPropertiesInternal)this).IsSafeFailover, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -133,11 +131,11 @@ internal FailoverProperties(global::System.Management.Automation.PSObject conten // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGenerated) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.FailoverPropertiesAutoGeneratedTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.FailoverProperties1TypeConverter.ConvertFrom); } if (content.Contains("IsSafeFailover")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesInternal)this).IsSafeFailover = (bool?) content.GetValueForProperty("IsSafeFailover",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesInternal)this).IsSafeFailover, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverPropertiesInternal)this).IsSafeFailover = (bool?) content.GetValueForProperty("IsSafeFailover",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverPropertiesInternal)this).IsSafeFailover, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } @@ -147,7 +145,7 @@ internal FailoverProperties(global::System.Management.Automation.PSObject conten /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverProperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverProperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties.TypeConverter.cs index 554118db5a9e..007188b54538 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverProperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverProperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties.cs similarity index 69% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverProperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties.cs index a7438f84c852..d36353e5a845 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverProperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -12,27 +12,27 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Previe /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class FailoverProperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverPropertiesInternal { /// /// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? IsSafeFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGeneratedInternal)Property).IsSafeFailover; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGeneratedInternal)Property).IsSafeFailover = value ?? default(bool); } + public bool? IsSafeFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1Internal)Property).IsSafeFailover; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1Internal)Property).IsSafeFailover = value ?? default(bool); } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGenerated Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.FailoverPropertiesAutoGenerated()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1 Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverPropertiesInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.FailoverProperties1()); set { {_property = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGenerated _property; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1 _property; /// /// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGenerated Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.FailoverPropertiesAutoGenerated()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1 Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.FailoverProperties1()); set => this._property = value; } /// Creates an new instance. public FailoverProperties() @@ -50,6 +50,9 @@ public partial interface IFailoverProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary.", SerializedName = @"IsSafeFailover", PossibleTypes = new [] { typeof(bool) })] @@ -67,7 +70,7 @@ internal partial interface IFailoverPropertiesInternal /// /// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. /// - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGenerated Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1 Property { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverProperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties.json.cs similarity index 93% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverProperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties.json.cs index d37dbbaeaf82..15e5086649d6 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverProperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -67,18 +67,18 @@ internal FailoverProperties(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtim { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.FailoverPropertiesAutoGenerated.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.FailoverProperties1.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new FailoverProperties(json) : null; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverPropertiesAutoGenerated.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties1.PowerShell.cs similarity index 75% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverPropertiesAutoGenerated.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties1.PowerShell.cs index 8ae79ebf62b5..70fca66fcca1 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverPropertiesAutoGenerated.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties1.PowerShell.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; /// /// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. /// - [System.ComponentModel.TypeConverter(typeof(FailoverPropertiesAutoGeneratedTypeConverter))] - public partial class FailoverPropertiesAutoGenerated + [System.ComponentModel.TypeConverter(typeof(FailoverProperties1TypeConverter))] + public partial class FailoverProperties1 { /// @@ -65,39 +65,37 @@ public partial class FailoverPropertiesAutoGenerated partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1 DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new FailoverPropertiesAutoGenerated(content); + return new FailoverProperties1(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1 DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new FailoverPropertiesAutoGenerated(content); + return new FailoverProperties1(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal FailoverPropertiesAutoGenerated(global::System.Collections.IDictionary content) + internal FailoverProperties1(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -108,17 +106,17 @@ internal FailoverPropertiesAutoGenerated(global::System.Collections.IDictionary // actually deserialize if (content.Contains("IsSafeFailover")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGeneratedInternal)this).IsSafeFailover = (bool?) content.GetValueForProperty("IsSafeFailover",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGeneratedInternal)this).IsSafeFailover, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1Internal)this).IsSafeFailover = (bool?) content.GetValueForProperty("IsSafeFailover",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1Internal)this).IsSafeFailover, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal FailoverPropertiesAutoGenerated(global::System.Management.Automation.PSObject content) + internal FailoverProperties1(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -129,17 +127,17 @@ internal FailoverPropertiesAutoGenerated(global::System.Management.Automation.PS // actually deserialize if (content.Contains("IsSafeFailover")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGeneratedInternal)this).IsSafeFailover = (bool?) content.GetValueForProperty("IsSafeFailover",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGeneratedInternal)this).IsSafeFailover, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1Internal)this).IsSafeFailover = (bool?) content.GetValueForProperty("IsSafeFailover",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1Internal)this).IsSafeFailover, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1 FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -159,8 +157,8 @@ public override string ToString() } } /// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. - [System.ComponentModel.TypeConverter(typeof(FailoverPropertiesAutoGeneratedTypeConverter))] - public partial interface IFailoverPropertiesAutoGenerated + [System.ComponentModel.TypeConverter(typeof(FailoverProperties1TypeConverter))] + public partial interface IFailoverProperties1 { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverPropertiesAutoGenerated.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties1.TypeConverter.cs similarity index 82% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverPropertiesAutoGenerated.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties1.TypeConverter.cs index 7a1e3ddf30f0..7b6296e190c7 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverPropertiesAutoGenerated.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties1.TypeConverter.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class FailoverPropertiesAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class FailoverProperties1TypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class FailoverPropertiesAutoGeneratedTypeConverter : global::Syst public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,32 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// not used by this TypeConverter. /// when set to true, will ignore the case when converting. /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter into an instance of + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGenerated ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1 ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGenerated).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1).IsAssignableFrom(type)) { return sourceValue; } try { - return FailoverPropertiesAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return FailoverProperties1.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -128,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return FailoverPropertiesAutoGenerated.DeserializeFromPSObject(sourceValue); + return FailoverProperties1.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return FailoverPropertiesAutoGenerated.DeserializeFromDictionary(sourceValue); + return FailoverProperties1.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverPropertiesAutoGenerated.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties1.cs similarity index 80% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverPropertiesAutoGenerated.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties1.cs index 4da922ace6a3..080430fa4372 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverPropertiesAutoGenerated.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties1.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -11,9 +11,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Previe /// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] - public partial class FailoverPropertiesAutoGenerated : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGenerated, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGeneratedInternal + public partial class FailoverProperties1 : + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1Internal { /// Backing field for property. @@ -25,14 +25,14 @@ public partial class FailoverPropertiesAutoGenerated : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] public bool? IsSafeFailover { get => this._isSafeFailover; set => this._isSafeFailover = value; } - /// Creates an new instance. - public FailoverPropertiesAutoGenerated() + /// Creates an new instance. + public FailoverProperties1() { } } /// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. - public partial interface IFailoverPropertiesAutoGenerated : + public partial interface IFailoverProperties1 : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable { /// @@ -41,6 +41,9 @@ public partial interface IFailoverPropertiesAutoGenerated : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary.", SerializedName = @"IsSafeFailover", PossibleTypes = new [] { typeof(bool) })] @@ -48,7 +51,7 @@ public partial interface IFailoverPropertiesAutoGenerated : } /// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. - internal partial interface IFailoverPropertiesAutoGeneratedInternal + internal partial interface IFailoverProperties1Internal { /// diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverPropertiesAutoGenerated.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties1.json.cs similarity index 86% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverPropertiesAutoGenerated.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties1.json.cs index a8c9612df347..de8c97fd2811 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/FailoverPropertiesAutoGenerated.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/FailoverProperties1.json.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// /// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. /// - public partial class FailoverPropertiesAutoGenerated + public partial class FailoverProperties1 { /// @@ -56,10 +56,10 @@ public partial class FailoverPropertiesAutoGenerated partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject instance to deserialize from. - internal FailoverPropertiesAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json) + internal FailoverProperties1(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -67,30 +67,30 @@ internal FailoverPropertiesAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.Serv { return; } - {_isSafeFailover = If( json?.PropertyT("IsSafeFailover"), out var __jsonIsSafeFailover) ? (bool?)__jsonIsSafeFailover : IsSafeFailover;} + {_isSafeFailover = If( json?.PropertyT("IsSafeFailover"), out var __jsonIsSafeFailover) ? (bool?)__jsonIsSafeFailover : _isSafeFailover;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGenerated. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGenerated. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverPropertiesAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties1 FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new FailoverPropertiesAutoGenerated(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new FailoverProperties1(json) : null; } /// - /// Serializes this instance of into a . + /// Serializes this instance of into a . /// /// The container to serialize this object into. If the caller /// passes in null, a new instance will be created and returned to the caller. /// Allows the caller to choose the depth of the serialization. See . /// - /// a serialized instance of as a . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Identity.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Identity.PowerShell.cs similarity index 70% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Identity.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Identity.PowerShell.cs index d9d31ad0073b..76aca3d5b7cf 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Identity.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Identity.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Identity partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Identity(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Identity(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,25 +111,25 @@ internal Identity(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("UserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -144,19 +144,19 @@ internal Identity(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("UserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Identity.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Identity.TypeConverter.cs similarity index 97% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Identity.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Identity.TypeConverter.cs index f26bec0e0b0d..d57f8cc29c9b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Identity.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Identity.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Identity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Identity.cs similarity index 70% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Identity.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Identity.cs index 090cc24aa485..d7c80368efc6 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Identity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Identity.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Properties to configure User Assigned Identities for Bring your Own Keys [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class Identity : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal { /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } /// Internal Acessors for TenantId - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } /// Backing field for property. private string _principalId; @@ -35,18 +35,18 @@ public partial class Identity : public string TenantId { get => this._tenantId; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType? _type; + private string _type; /// Type of managed service identity. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType? Type { get => this._type; set => this._type = value; } + public string Type { get => this._type; set => this._type = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities _userAssignedIdentity; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities _userAssignedIdentity; /// Properties for User Assigned Identities [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities UserAssignedIdentity { get => (this._userAssignedIdentity = this._userAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IdentityUserAssignedIdentities()); set => this._userAssignedIdentity = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities UserAssignedIdentity { get => (this._userAssignedIdentity = this._userAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IdentityUserAssignedIdentities()); set => this._userAssignedIdentity = value; } /// Creates an new instance. public Identity() @@ -62,6 +62,9 @@ public partial interface IIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"ObjectId from the KeyVault", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] @@ -70,6 +73,9 @@ public partial interface IIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"TenantId from the KeyVault", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -78,18 +84,25 @@ public partial interface IIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of managed service identity.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType? Type { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None")] + string Type { get; set; } /// Properties for User Assigned Identities [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Properties for User Assigned Identities", SerializedName = @"userAssignedIdentities", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } } /// Properties to configure User Assigned Identities for Bring your Own Keys @@ -101,9 +114,10 @@ internal partial interface IIdentityInternal /// TenantId from the KeyVault string TenantId { get; set; } /// Type of managed service identity. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType? Type { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None")] + string Type { get; set; } /// Properties for User Assigned Identities - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Identity.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Identity.json.cs similarity index 89% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Identity.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Identity.json.cs index 0f809a1cdfa0..65fcb9d8e72f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Identity.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Identity.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class Identity partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new Identity(json) : null; } @@ -77,10 +75,10 @@ internal Identity(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.Jso { return; } - {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)PrincipalId;} - {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)TenantId;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentities"), out var __jsonUserAssignedIdentities) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IdentityUserAssignedIdentities.FromJson(__jsonUserAssignedIdentities) : UserAssignedIdentity;} + {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)_principalId;} + {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)_tenantId;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentities"), out var __jsonUserAssignedIdentities) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IdentityUserAssignedIdentities.FromJson(__jsonUserAssignedIdentities) : _userAssignedIdentity;} AfterFromJson(json); } @@ -103,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/IdentityUserAssignedIdentities.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/IdentityUserAssignedIdentities.PowerShell.cs similarity index 87% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/IdentityUserAssignedIdentities.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/IdentityUserAssignedIdentities.PowerShell.cs index ab5737c3ba70..f4a8ddbc7769 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/IdentityUserAssignedIdentities.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/IdentityUserAssignedIdentities.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class IdentityUserAssignedIdentities partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new IdentityUserAssignedIdentities(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new IdentityUserAssignedIdentities(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -117,7 +115,7 @@ internal IdentityUserAssignedIdentities(global::System.Collections.IDictionary c } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/IdentityUserAssignedIdentities.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/IdentityUserAssignedIdentities.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/IdentityUserAssignedIdentities.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/IdentityUserAssignedIdentities.TypeConverter.cs index a76ed616fc2a..f321085dba35 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/IdentityUserAssignedIdentities.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/IdentityUserAssignedIdentities.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/IdentityUserAssignedIdentities.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/IdentityUserAssignedIdentities.cs similarity index 76% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/IdentityUserAssignedIdentities.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/IdentityUserAssignedIdentities.cs index dced66cde0f6..153f462bdd9a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/IdentityUserAssignedIdentities.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/IdentityUserAssignedIdentities.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Properties for User Assigned Identities public partial class IdentityUserAssignedIdentities : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentitiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentitiesInternal { /// Creates an new instance. @@ -22,7 +22,7 @@ public IdentityUserAssignedIdentities() /// Properties for User Assigned Identities public partial interface IIdentityUserAssignedIdentities : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IAssociativeArray { } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/IdentityUserAssignedIdentities.dictionary.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/IdentityUserAssignedIdentities.dictionary.cs similarity index 65% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/IdentityUserAssignedIdentities.dictionary.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/IdentityUserAssignedIdentities.dictionary.cs index 66431d5240c8..43e6e51d57f7 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/IdentityUserAssignedIdentities.dictionary.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/IdentityUserAssignedIdentities.dictionary.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; public partial class IdentityUserAssignedIdentities : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IAssociativeArray { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); - global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } - int Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + int Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentity this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentity this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } /// /// - public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentity value) => __additionalProperties.Add( key, value); + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentity value) => __additionalProperties.Add( key, value); public void Clear() => __additionalProperties.Clear(); @@ -40,7 +40,7 @@ public void CopyFrom(global::System.Collections.IDictionary source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -55,7 +55,7 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -66,10 +66,10 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// /// - public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentity value) => __additionalProperties.TryGetValue( key, out value); + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentity value) => __additionalProperties.TryGetValue( key, out value); /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IdentityUserAssignedIdentities source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IdentityUserAssignedIdentities source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/IdentityUserAssignedIdentities.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/IdentityUserAssignedIdentities.json.cs similarity index 90% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/IdentityUserAssignedIdentities.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/IdentityUserAssignedIdentities.json.cs index 54e1882bca71..8c926a1eb6c2 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/IdentityUserAssignedIdentities.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/IdentityUserAssignedIdentities.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class IdentityUserAssignedIdentities partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new IdentityUserAssignedIdentities(json) : null; } @@ -78,7 +78,7 @@ internal IdentityUserAssignedIdentities(Microsoft.Azure.PowerShell.Cmdlets.Servi { return; } - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.UserAssignedIdentity.FromJson(j) ,exclusions ); + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.UserAssignedIdentity.FromJson(j) ,exclusions ); AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IAssociativeArray)this).AdditionalProperties, container); + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IAssociativeArray)this).AdditionalProperties, container); AfterToJson(ref container); return container; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/KeyVaultProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/KeyVaultProperties.PowerShell.cs similarity index 68% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/KeyVaultProperties.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/KeyVaultProperties.PowerShell.cs index a2b1ffdc98d4..efd916f963fe 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/KeyVaultProperties.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/KeyVaultProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class KeyVaultProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new KeyVaultProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new KeyVaultProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,29 +111,29 @@ internal KeyVaultProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Identity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityProperties) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityProperties) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); } if (content.Contains("KeyName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).KeyName = (string) content.GetValueForProperty("KeyName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).KeyName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).KeyName = (string) content.GetValueForProperty("KeyName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).KeyName, global::System.Convert.ToString); } if (content.Contains("KeyVaultUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).KeyVaultUri = (string) content.GetValueForProperty("KeyVaultUri",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).KeyVaultUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).KeyVaultUri = (string) content.GetValueForProperty("KeyVaultUri",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).KeyVaultUri, global::System.Convert.ToString); } if (content.Contains("KeyVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).KeyVersion = (string) content.GetValueForProperty("KeyVersion",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).KeyVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).KeyVersion = (string) content.GetValueForProperty("KeyVersion",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).KeyVersion, global::System.Convert.ToString); } if (content.Contains("UserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).UserAssignedIdentity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).UserAssignedIdentity, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -150,23 +148,23 @@ internal KeyVaultProperties(global::System.Management.Automation.PSObject conten // actually deserialize if (content.Contains("Identity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityProperties) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityProperties) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); } if (content.Contains("KeyName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).KeyName = (string) content.GetValueForProperty("KeyName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).KeyName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).KeyName = (string) content.GetValueForProperty("KeyName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).KeyName, global::System.Convert.ToString); } if (content.Contains("KeyVaultUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).KeyVaultUri = (string) content.GetValueForProperty("KeyVaultUri",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).KeyVaultUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).KeyVaultUri = (string) content.GetValueForProperty("KeyVaultUri",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).KeyVaultUri, global::System.Convert.ToString); } if (content.Contains("KeyVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).KeyVersion = (string) content.GetValueForProperty("KeyVersion",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).KeyVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).KeyVersion = (string) content.GetValueForProperty("KeyVersion",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).KeyVersion, global::System.Convert.ToString); } if (content.Contains("UserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal)this).UserAssignedIdentity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal)this).UserAssignedIdentity, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/KeyVaultProperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/KeyVaultProperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/KeyVaultProperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/KeyVaultProperties.TypeConverter.cs index 0cec573e0923..248811645f05 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/KeyVaultProperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/KeyVaultProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/KeyVaultProperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/KeyVaultProperties.cs similarity index 76% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/KeyVaultProperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/KeyVaultProperties.cs index 06cb99a2e673..4cb349d0e480 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/KeyVaultProperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/KeyVaultProperties.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Properties to configure keyVault Properties [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class KeyVaultProperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityProperties _identity; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityProperties _identity; [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityProperties Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.UserAssignedIdentityProperties()); set => this._identity = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityProperties Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.UserAssignedIdentityProperties()); set => this._identity = value; } /// Backing field for property. private string _keyName; @@ -42,11 +42,11 @@ public partial class KeyVaultProperties : public string KeyVersion { get => this._keyVersion; set => this._keyVersion = value; } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultPropertiesInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.UserAssignedIdentityProperties()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultPropertiesInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.UserAssignedIdentityProperties()); set { {_identity = value;} } } /// ARM ID of user Identity selected for encryption [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string UserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityPropertiesInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityPropertiesInternal)Identity).UserAssignedIdentity = value ?? null; } + public string UserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityPropertiesInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityPropertiesInternal)Identity).UserAssignedIdentity = value ?? null; } /// Creates an new instance. public KeyVaultProperties() @@ -62,6 +62,9 @@ public partial interface IKeyVaultProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the Key from KeyVault", SerializedName = @"keyName", PossibleTypes = new [] { typeof(string) })] @@ -70,6 +73,9 @@ public partial interface IKeyVaultProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Uri of KeyVault", SerializedName = @"keyVaultUri", PossibleTypes = new [] { typeof(string) })] @@ -78,6 +84,9 @@ public partial interface IKeyVaultProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Version of KeyVault", SerializedName = @"keyVersion", PossibleTypes = new [] { typeof(string) })] @@ -86,6 +95,9 @@ public partial interface IKeyVaultProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ARM ID of user Identity selected for encryption", SerializedName = @"userAssignedIdentity", PossibleTypes = new [] { typeof(string) })] @@ -96,7 +108,7 @@ public partial interface IKeyVaultProperties : internal partial interface IKeyVaultPropertiesInternal { - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityProperties Identity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityProperties Identity { get; set; } /// Name of the Key from KeyVault string KeyName { get; set; } /// Uri of KeyVault diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/KeyVaultProperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/KeyVaultProperties.json.cs similarity index 93% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/KeyVaultProperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/KeyVaultProperties.json.cs index 15de929e82d1..75f49818efb7 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/KeyVaultProperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/KeyVaultProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class KeyVaultProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new KeyVaultProperties(json) : null; } @@ -77,10 +77,10 @@ internal KeyVaultProperties(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtim { return; } - {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.UserAssignedIdentityProperties.FromJson(__jsonIdentity) : Identity;} - {_keyName = If( json?.PropertyT("keyName"), out var __jsonKeyName) ? (string)__jsonKeyName : (string)KeyName;} - {_keyVaultUri = If( json?.PropertyT("keyVaultUri"), out var __jsonKeyVaultUri) ? (string)__jsonKeyVaultUri : (string)KeyVaultUri;} - {_keyVersion = If( json?.PropertyT("keyVersion"), out var __jsonKeyVersion) ? (string)__jsonKeyVersion : (string)KeyVersion;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.UserAssignedIdentityProperties.FromJson(__jsonIdentity) : _identity;} + {_keyName = If( json?.PropertyT("keyName"), out var __jsonKeyName) ? (string)__jsonKeyName : (string)_keyName;} + {_keyVaultUri = If( json?.PropertyT("keyVaultUri"), out var __jsonKeyVaultUri) ? (string)__jsonKeyVaultUri : (string)_keyVaultUri;} + {_keyVersion = If( json?.PropertyT("keyVersion"), out var __jsonKeyVersion) ? (string)__jsonKeyVersion : (string)_keyVersion;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/MessageCountDetails.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MessageCountDetails.PowerShell.cs similarity index 69% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/MessageCountDetails.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MessageCountDetails.PowerShell.cs index 95ea42e2c170..e6fc7eafefdc 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/MessageCountDetails.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MessageCountDetails.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class MessageCountDetails partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new MessageCountDetails(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new MessageCountDetails(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessag /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,29 +111,29 @@ internal MessageCountDetails(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ActiveMessageCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).ActiveMessageCount = (long?) content.GetValueForProperty("ActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).ActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).ActiveMessageCount = (long?) content.GetValueForProperty("ActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).ActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("DeadLetterMessageCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).DeadLetterMessageCount = (long?) content.GetValueForProperty("DeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).DeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).DeadLetterMessageCount = (long?) content.GetValueForProperty("DeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).DeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("ScheduledMessageCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).ScheduledMessageCount = (long?) content.GetValueForProperty("ScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).ScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).ScheduledMessageCount = (long?) content.GetValueForProperty("ScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).ScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("TransferMessageCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).TransferMessageCount = (long?) content.GetValueForProperty("TransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).TransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).TransferMessageCount = (long?) content.GetValueForProperty("TransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).TransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("TransferDeadLetterMessageCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).TransferDeadLetterMessageCount = (long?) content.GetValueForProperty("TransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).TransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).TransferDeadLetterMessageCount = (long?) content.GetValueForProperty("TransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).TransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -148,23 +148,23 @@ internal MessageCountDetails(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("ActiveMessageCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).ActiveMessageCount = (long?) content.GetValueForProperty("ActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).ActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).ActiveMessageCount = (long?) content.GetValueForProperty("ActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).ActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("DeadLetterMessageCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).DeadLetterMessageCount = (long?) content.GetValueForProperty("DeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).DeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).DeadLetterMessageCount = (long?) content.GetValueForProperty("DeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).DeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("ScheduledMessageCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).ScheduledMessageCount = (long?) content.GetValueForProperty("ScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).ScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).ScheduledMessageCount = (long?) content.GetValueForProperty("ScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).ScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("TransferMessageCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).TransferMessageCount = (long?) content.GetValueForProperty("TransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).TransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).TransferMessageCount = (long?) content.GetValueForProperty("TransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).TransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("TransferDeadLetterMessageCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).TransferDeadLetterMessageCount = (long?) content.GetValueForProperty("TransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)this).TransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).TransferDeadLetterMessageCount = (long?) content.GetValueForProperty("TransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)this).TransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/MessageCountDetails.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MessageCountDetails.TypeConverter.cs similarity index 97% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/MessageCountDetails.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MessageCountDetails.TypeConverter.cs index 0a35b75cd075..a27536ffa3e5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/MessageCountDetails.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MessageCountDetails.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/MessageCountDetails.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MessageCountDetails.cs similarity index 84% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/MessageCountDetails.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MessageCountDetails.cs index 9307a8142af8..14d320dc9eba 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/MessageCountDetails.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MessageCountDetails.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Message Count Details. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class MessageCountDetails : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal { /// Backing field for property. @@ -29,19 +29,19 @@ public partial class MessageCountDetails : public long? DeadLetterMessageCount { get => this._deadLetterMessageCount; } /// Internal Acessors for ActiveMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal.ActiveMessageCount { get => this._activeMessageCount; set { {_activeMessageCount = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal.ActiveMessageCount { get => this._activeMessageCount; set { {_activeMessageCount = value;} } } /// Internal Acessors for DeadLetterMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal.DeadLetterMessageCount { get => this._deadLetterMessageCount; set { {_deadLetterMessageCount = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal.DeadLetterMessageCount { get => this._deadLetterMessageCount; set { {_deadLetterMessageCount = value;} } } /// Internal Acessors for ScheduledMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal.ScheduledMessageCount { get => this._scheduledMessageCount; set { {_scheduledMessageCount = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal.ScheduledMessageCount { get => this._scheduledMessageCount; set { {_scheduledMessageCount = value;} } } /// Internal Acessors for TransferDeadLetterMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal.TransferDeadLetterMessageCount { get => this._transferDeadLetterMessageCount; set { {_transferDeadLetterMessageCount = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal.TransferDeadLetterMessageCount { get => this._transferDeadLetterMessageCount; set { {_transferDeadLetterMessageCount = value;} } } /// Internal Acessors for TransferMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal.TransferMessageCount { get => this._transferMessageCount; set { {_transferMessageCount = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal.TransferMessageCount { get => this._transferMessageCount; set { {_transferMessageCount = value;} } } /// Backing field for property. private long? _scheduledMessageCount; @@ -78,6 +78,9 @@ public partial interface IMessageCountDetails : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of active messages in the queue, topic, or subscription.", SerializedName = @"activeMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -86,6 +89,9 @@ public partial interface IMessageCountDetails : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages that are dead lettered.", SerializedName = @"deadLetterMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -94,6 +100,9 @@ public partial interface IMessageCountDetails : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of scheduled messages.", SerializedName = @"scheduledMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -102,6 +111,9 @@ public partial interface IMessageCountDetails : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages transferred into dead letters.", SerializedName = @"transferDeadLetterMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -110,6 +122,9 @@ public partial interface IMessageCountDetails : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages transferred to another queue, topic, or subscription.", SerializedName = @"transferMessageCount", PossibleTypes = new [] { typeof(long) })] diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/MessageCountDetails.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MessageCountDetails.json.cs similarity index 90% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/MessageCountDetails.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MessageCountDetails.json.cs index 95dd20542760..a1b2693790dd 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/MessageCountDetails.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MessageCountDetails.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class MessageCountDetails partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new MessageCountDetails(json) : null; } @@ -77,11 +77,11 @@ internal MessageCountDetails(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runti { return; } - {_activeMessageCount = If( json?.PropertyT("activeMessageCount"), out var __jsonActiveMessageCount) ? (long?)__jsonActiveMessageCount : ActiveMessageCount;} - {_deadLetterMessageCount = If( json?.PropertyT("deadLetterMessageCount"), out var __jsonDeadLetterMessageCount) ? (long?)__jsonDeadLetterMessageCount : DeadLetterMessageCount;} - {_scheduledMessageCount = If( json?.PropertyT("scheduledMessageCount"), out var __jsonScheduledMessageCount) ? (long?)__jsonScheduledMessageCount : ScheduledMessageCount;} - {_transferMessageCount = If( json?.PropertyT("transferMessageCount"), out var __jsonTransferMessageCount) ? (long?)__jsonTransferMessageCount : TransferMessageCount;} - {_transferDeadLetterMessageCount = If( json?.PropertyT("transferDeadLetterMessageCount"), out var __jsonTransferDeadLetterMessageCount) ? (long?)__jsonTransferDeadLetterMessageCount : TransferDeadLetterMessageCount;} + {_activeMessageCount = If( json?.PropertyT("activeMessageCount"), out var __jsonActiveMessageCount) ? (long?)__jsonActiveMessageCount : _activeMessageCount;} + {_deadLetterMessageCount = If( json?.PropertyT("deadLetterMessageCount"), out var __jsonDeadLetterMessageCount) ? (long?)__jsonDeadLetterMessageCount : _deadLetterMessageCount;} + {_scheduledMessageCount = If( json?.PropertyT("scheduledMessageCount"), out var __jsonScheduledMessageCount) ? (long?)__jsonScheduledMessageCount : _scheduledMessageCount;} + {_transferMessageCount = If( json?.PropertyT("transferMessageCount"), out var __jsonTransferMessageCount) ? (long?)__jsonTransferMessageCount : _transferMessageCount;} + {_transferDeadLetterMessageCount = If( json?.PropertyT("transferDeadLetterMessageCount"), out var __jsonTransferDeadLetterMessageCount) ? (long?)__jsonTransferDeadLetterMessageCount : _transferDeadLetterMessageCount;} AfterFromJson(json); } @@ -104,23 +104,23 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._activeMessageCount ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNumber((long)this._activeMessageCount) : null, "activeMessageCount" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._deadLetterMessageCount ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNumber((long)this._deadLetterMessageCount) : null, "deadLetterMessageCount" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._scheduledMessageCount ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNumber((long)this._scheduledMessageCount) : null, "scheduledMessageCount" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._transferMessageCount ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNumber((long)this._transferMessageCount) : null, "transferMessageCount" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._transferDeadLetterMessageCount ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNumber((long)this._transferDeadLetterMessageCount) : null, "transferDeadLetterMessageCount" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigListResult.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigListResult.PowerShell.cs similarity index 74% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigListResult.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigListResult.PowerShell.cs index 947c0c375299..45c13aa90078 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigListResult.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class MigrationConfigListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new MigrationConfigListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new MigrationConfigListResult(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal MigrationConfigListResult(global::System.Collections.IDictionary conten // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.MigrationConfigPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MigrationConfigPropertiesTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal MigrationConfigListResult(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.MigrationConfigPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MigrationConfigPropertiesTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigListResult.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigListResult.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigListResult.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigListResult.TypeConverter.cs index e7775c73aa94..13cef6c30e05 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigListResult.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigListResult.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigListResult.cs similarity index 72% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigListResult.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigListResult.cs index 35a24cd4846b..52c7e81622f9 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigListResult.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigListResult.cs @@ -3,19 +3,19 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The result of the List migrationConfigurations operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class MigrationConfigListResult : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResult, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResult, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class MigrationConfigListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties[] _value; + private System.Collections.Generic.List _value; /// List of Migration Configs [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public MigrationConfigListResult() @@ -49,6 +49,9 @@ public partial interface IMigrationConfigListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Link to the next set of results. Not empty if Value contains incomplete list of migrationConfigurations", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -57,10 +60,13 @@ public partial interface IMigrationConfigListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of Migration Configs", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties) })] + System.Collections.Generic.List Value { get; set; } } /// The result of the List migrationConfigurations operation. @@ -72,7 +78,7 @@ internal partial interface IMigrationConfigListResultInternal /// string NextLink { get; set; } /// List of Migration Configs - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigListResult.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigListResult.json.cs similarity index 88% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigListResult.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigListResult.json.cs index cfcee298fe9f..ac9ee4a5157f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigListResult.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class MigrationConfigListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new MigrationConfigListResult(json) : null; } @@ -77,8 +77,8 @@ internal MigrationConfigListResult(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.MigrationConfigProperties.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MigrationConfigProperties.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } @@ -110,7 +110,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso } container.Add("value",__w); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties.PowerShell.cs new file mode 100644 index 000000000000..7cd4d63d7b20 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties.PowerShell.cs @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + + /// Single item in List or Get Migration Config operation + [System.ComponentModel.TypeConverter(typeof(MigrationConfigPropertiesTypeConverter))] + public partial class MigrationConfigProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MigrationConfigProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MigrationConfigProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MigrationConfigProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MigrationConfigProperties1TypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PendingReplicationOperationsCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("TargetNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).TargetNamespace = (string) content.GetValueForProperty("TargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).TargetNamespace, global::System.Convert.ToString); + } + if (content.Contains("PostMigrationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).PostMigrationName = (string) content.GetValueForProperty("PostMigrationName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).PostMigrationName, global::System.Convert.ToString); + } + if (content.Contains("MigrationState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).MigrationState = (string) content.GetValueForProperty("MigrationState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).MigrationState, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MigrationConfigProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MigrationConfigProperties1TypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PendingReplicationOperationsCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("TargetNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).TargetNamespace = (string) content.GetValueForProperty("TargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).TargetNamespace, global::System.Convert.ToString); + } + if (content.Contains("PostMigrationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).PostMigrationName = (string) content.GetValueForProperty("PostMigrationName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).PostMigrationName, global::System.Convert.ToString); + } + if (content.Contains("MigrationState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).MigrationState = (string) content.GetValueForProperty("MigrationState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).MigrationState, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Single item in List or Get Migration Config operation + [System.ComponentModel.TypeConverter(typeof(MigrationConfigPropertiesTypeConverter))] + public partial interface IMigrationConfigProperties + + { + + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigProperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigProperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties.TypeConverter.cs index 1bee264e4f25..fc533b2537a7 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigProperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigProperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties.cs similarity index 63% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigProperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties.cs index 4681977353b0..626ef17bf874 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigProperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties.cs @@ -3,136 +3,135 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Single item in List or Get Migration Config operation [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class MigrationConfigProperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(); /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id = value; } - - /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; } /// Internal Acessors for MigrationState - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal.MigrationState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)Property).MigrationState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)Property).MigrationState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal.MigrationState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)Property).MigrationState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)Property).MigrationState = value; } /// Internal Acessors for PendingReplicationOperationsCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal.PendingReplicationOperationsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)Property).PendingReplicationOperationsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)Property).PendingReplicationOperationsCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal.PendingReplicationOperationsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)Property).PendingReplicationOperationsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)Property).PendingReplicationOperationsCount = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGenerated Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.MigrationConfigPropertiesAutoGenerated()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1 Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MigrationConfigProperties1()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)Property).ProvisioningState = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigPropertiesInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Location + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// /// State in which Standard to Premium Migration is, possible values : Unknown, Reverting, Completing, Initiating, Syncing, /// Active /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string MigrationState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)Property).MigrationState; } + public string MigrationState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)Property).MigrationState; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; } /// Number of entities pending to be replicated. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? PendingReplicationOperationsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)Property).PendingReplicationOperationsCount; } + public long? PendingReplicationOperationsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)Property).PendingReplicationOperationsCount; } /// Name to access Standard Namespace after migration [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string PostMigrationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)Property).PostMigrationName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)Property).PostMigrationName = value ?? null; } + public string PostMigrationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)Property).PostMigrationName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)Property).PostMigrationName = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGenerated _property; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1 _property; /// Properties required to the Create Migration Configuration [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGenerated Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.MigrationConfigPropertiesAutoGenerated()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1 Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MigrationConfigProperties1()); set => this._property = value; } /// Provisioning state of Migration Configuration [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)Property).ProvisioningState; } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)Property).ProvisioningState; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// /// Existing premium Namespace ARM Id name which has no entities, will be used for migration /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string TargetNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)Property).TargetNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)Property).TargetNamespace = value ?? null; } + public string TargetNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)Property).TargetNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)Property).TargetNamespace = value ?? null; } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; } /// Creates an new instance. public MigrationConfigProperties() @@ -155,7 +154,7 @@ public MigrationConfigProperties() /// Single item in List or Get Migration Config operation public partial interface IMigrationConfigProperties : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource { /// /// State in which Standard to Premium Migration is, possible values : Unknown, Reverting, Completing, Initiating, Syncing, @@ -164,6 +163,9 @@ public partial interface IMigrationConfigProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"State in which Standard to Premium Migration is, possible values : Unknown, Reverting, Completing, Initiating, Syncing, Active", SerializedName = @"migrationState", PossibleTypes = new [] { typeof(string) })] @@ -172,6 +174,9 @@ public partial interface IMigrationConfigProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of entities pending to be replicated.", SerializedName = @"pendingReplicationOperationsCount", PossibleTypes = new [] { typeof(long) })] @@ -180,6 +185,9 @@ public partial interface IMigrationConfigProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name to access Standard Namespace after migration", SerializedName = @"postMigrationName", PossibleTypes = new [] { typeof(string) })] @@ -188,6 +196,9 @@ public partial interface IMigrationConfigProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Provisioning state of Migration Configuration ", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] @@ -195,57 +206,80 @@ public partial interface IMigrationConfigProperties : /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// /// Existing premium Namespace ARM Id name which has no entities, will be used for migration /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Existing premium Namespace ARM Id name which has no entities, will be used for migration", SerializedName = @"targetNamespace", PossibleTypes = new [] { typeof(string) })] @@ -254,7 +288,7 @@ public partial interface IMigrationConfigProperties : } /// Single item in List or Get Migration Config operation internal partial interface IMigrationConfigPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal { /// /// State in which Standard to Premium Migration is, possible values : Unknown, Reverting, Completing, Initiating, Syncing, @@ -266,23 +300,25 @@ internal partial interface IMigrationConfigPropertiesInternal : /// Name to access Standard Namespace after migration string PostMigrationName { get; set; } /// Properties required to the Create Migration Configuration - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGenerated Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1 Property { get; set; } /// Provisioning state of Migration Configuration string ProvisioningState { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// /// Existing premium Namespace ARM Id name which has no entities, will be used for migration /// diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigProperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties.json.cs similarity index 91% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigProperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties.json.cs index 9183c29ca66c..4c3f9359fea2 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigProperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class MigrationConfigProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new MigrationConfigProperties(json) : null; } @@ -77,9 +77,9 @@ internal MigrationConfigProperties(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.MigrationConfigPropertiesAutoGenerated.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MigrationConfigProperties1.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigPropertiesAutoGenerated.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties1.PowerShell.cs similarity index 60% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigPropertiesAutoGenerated.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties1.PowerShell.cs index 98cc2d8f4911..50505ae7608f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigPropertiesAutoGenerated.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties1.PowerShell.cs @@ -3,13 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; /// Properties required to the Create Migration Configuration - [System.ComponentModel.TypeConverter(typeof(MigrationConfigPropertiesAutoGeneratedTypeConverter))] - public partial class MigrationConfigPropertiesAutoGenerated + [System.ComponentModel.TypeConverter(typeof(MigrationConfigProperties1TypeConverter))] + public partial class MigrationConfigProperties1 { /// @@ -63,49 +63,44 @@ public partial class MigrationConfigPropertiesAutoGenerated partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1 DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new MigrationConfigPropertiesAutoGenerated(content); + return new MigrationConfigProperties1(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1 DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new MigrationConfigPropertiesAutoGenerated(content); + return new MigrationConfigProperties1(content); } /// - /// Creates a new instance of , deserializing the content from a json - /// string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1 FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal MigrationConfigPropertiesAutoGenerated(global::System.Collections.IDictionary content) + internal MigrationConfigProperties1(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -116,33 +111,33 @@ internal MigrationConfigPropertiesAutoGenerated(global::System.Collections.IDict // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).ProvisioningState, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PendingReplicationOperationsCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("TargetNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).TargetNamespace = (string) content.GetValueForProperty("TargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).TargetNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).TargetNamespace = (string) content.GetValueForProperty("TargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).TargetNamespace, global::System.Convert.ToString); } if (content.Contains("PostMigrationName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).PostMigrationName = (string) content.GetValueForProperty("PostMigrationName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).PostMigrationName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).PostMigrationName = (string) content.GetValueForProperty("PostMigrationName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).PostMigrationName, global::System.Convert.ToString); } if (content.Contains("MigrationState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).MigrationState = (string) content.GetValueForProperty("MigrationState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).MigrationState, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).MigrationState = (string) content.GetValueForProperty("MigrationState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).MigrationState, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal MigrationConfigPropertiesAutoGenerated(global::System.Management.Automation.PSObject content) + internal MigrationConfigProperties1(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -153,23 +148,23 @@ internal MigrationConfigPropertiesAutoGenerated(global::System.Management.Automa // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).ProvisioningState, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PendingReplicationOperationsCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("TargetNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).TargetNamespace = (string) content.GetValueForProperty("TargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).TargetNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).TargetNamespace = (string) content.GetValueForProperty("TargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).TargetNamespace, global::System.Convert.ToString); } if (content.Contains("PostMigrationName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).PostMigrationName = (string) content.GetValueForProperty("PostMigrationName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).PostMigrationName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).PostMigrationName = (string) content.GetValueForProperty("PostMigrationName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).PostMigrationName, global::System.Convert.ToString); } if (content.Contains("MigrationState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).MigrationState = (string) content.GetValueForProperty("MigrationState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal)this).MigrationState, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).MigrationState = (string) content.GetValueForProperty("MigrationState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal)this).MigrationState, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -192,8 +187,8 @@ public override string ToString() } } /// Properties required to the Create Migration Configuration - [System.ComponentModel.TypeConverter(typeof(MigrationConfigPropertiesAutoGeneratedTypeConverter))] - public partial interface IMigrationConfigPropertiesAutoGenerated + [System.ComponentModel.TypeConverter(typeof(MigrationConfigProperties1TypeConverter))] + public partial interface IMigrationConfigProperties1 { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigPropertiesAutoGenerated.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties1.TypeConverter.cs similarity index 81% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigPropertiesAutoGenerated.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties1.TypeConverter.cs index 28038175de46..11cc0f800767 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigPropertiesAutoGenerated.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties1.TypeConverter.cs @@ -3,15 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class MigrationConfigPropertiesAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class MigrationConfigProperties1TypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -27,14 +26,13 @@ public partial class MigrationConfigPropertiesAutoGeneratedTypeConverter : globa public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise - /// false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -97,33 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// not used by this TypeConverter. /// when set to true, will ignore the case when converting. /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter into an instance of + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGenerated ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1 ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGenerated).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1).IsAssignableFrom(type)) { return sourceValue; } try { - return MigrationConfigPropertiesAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return MigrationConfigProperties1.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -131,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return MigrationConfigPropertiesAutoGenerated.DeserializeFromPSObject(sourceValue); + return MigrationConfigProperties1.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return MigrationConfigPropertiesAutoGenerated.DeserializeFromDictionary(sourceValue); + return MigrationConfigProperties1.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigPropertiesAutoGenerated.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties1.cs similarity index 84% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigPropertiesAutoGenerated.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties1.cs index 1cdd9a47290e..33e0bb233bc5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigPropertiesAutoGenerated.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties1.cs @@ -3,25 +3,25 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Properties required to the Create Migration Configuration [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] - public partial class MigrationConfigPropertiesAutoGenerated : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGenerated, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal + public partial class MigrationConfigProperties1 : + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal { /// Internal Acessors for MigrationState - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal.MigrationState { get => this._migrationState; set { {_migrationState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal.MigrationState { get => this._migrationState; set { {_migrationState = value;} } } /// Internal Acessors for PendingReplicationOperationsCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal.PendingReplicationOperationsCount { get => this._pendingReplicationOperationsCount; set { {_pendingReplicationOperationsCount = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal.PendingReplicationOperationsCount { get => this._pendingReplicationOperationsCount; set { {_pendingReplicationOperationsCount = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGeneratedInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1Internal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Backing field for property. private string _migrationState; @@ -63,14 +63,14 @@ public partial class MigrationConfigPropertiesAutoGenerated : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] public string TargetNamespace { get => this._targetNamespace; set => this._targetNamespace = value; } - /// Creates an new instance. - public MigrationConfigPropertiesAutoGenerated() + /// Creates an new instance. + public MigrationConfigProperties1() { } } /// Properties required to the Create Migration Configuration - public partial interface IMigrationConfigPropertiesAutoGenerated : + public partial interface IMigrationConfigProperties1 : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable { /// @@ -80,6 +80,9 @@ public partial interface IMigrationConfigPropertiesAutoGenerated : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"State in which Standard to Premium Migration is, possible values : Unknown, Reverting, Completing, Initiating, Syncing, Active", SerializedName = @"migrationState", PossibleTypes = new [] { typeof(string) })] @@ -88,6 +91,9 @@ public partial interface IMigrationConfigPropertiesAutoGenerated : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of entities pending to be replicated.", SerializedName = @"pendingReplicationOperationsCount", PossibleTypes = new [] { typeof(long) })] @@ -96,6 +102,9 @@ public partial interface IMigrationConfigPropertiesAutoGenerated : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name to access Standard Namespace after migration", SerializedName = @"postMigrationName", PossibleTypes = new [] { typeof(string) })] @@ -104,6 +113,9 @@ public partial interface IMigrationConfigPropertiesAutoGenerated : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Provisioning state of Migration Configuration ", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] @@ -114,6 +126,9 @@ public partial interface IMigrationConfigPropertiesAutoGenerated : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Existing premium Namespace ARM Id name which has no entities, will be used for migration", SerializedName = @"targetNamespace", PossibleTypes = new [] { typeof(string) })] @@ -121,7 +136,7 @@ public partial interface IMigrationConfigPropertiesAutoGenerated : } /// Properties required to the Create Migration Configuration - internal partial interface IMigrationConfigPropertiesAutoGeneratedInternal + internal partial interface IMigrationConfigProperties1Internal { /// diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigPropertiesAutoGenerated.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties1.json.cs similarity index 86% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigPropertiesAutoGenerated.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties1.json.cs index c6c46c400534..1062dc3121f2 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/MigrationConfigPropertiesAutoGenerated.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/MigrationConfigProperties1.json.cs @@ -3,12 +3,12 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Properties required to the Create Migration Configuration - public partial class MigrationConfigPropertiesAutoGenerated + public partial class MigrationConfigProperties1 { /// @@ -54,22 +54,22 @@ public partial class MigrationConfigPropertiesAutoGenerated partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGenerated. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGenerated. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigPropertiesAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties1 FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new MigrationConfigPropertiesAutoGenerated(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new MigrationConfigProperties1(json) : null; } /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject instance to deserialize from. - internal MigrationConfigPropertiesAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json) + internal MigrationConfigProperties1(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -77,23 +77,22 @@ internal MigrationConfigPropertiesAutoGenerated(Microsoft.Azure.PowerShell.Cmdle { return; } - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_pendingReplicationOperationsCount = If( json?.PropertyT("pendingReplicationOperationsCount"), out var __jsonPendingReplicationOperationsCount) ? (long?)__jsonPendingReplicationOperationsCount : PendingReplicationOperationsCount;} - {_targetNamespace = If( json?.PropertyT("targetNamespace"), out var __jsonTargetNamespace) ? (string)__jsonTargetNamespace : (string)TargetNamespace;} - {_postMigrationName = If( json?.PropertyT("postMigrationName"), out var __jsonPostMigrationName) ? (string)__jsonPostMigrationName : (string)PostMigrationName;} - {_migrationState = If( json?.PropertyT("migrationState"), out var __jsonMigrationState) ? (string)__jsonMigrationState : (string)MigrationState;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_pendingReplicationOperationsCount = If( json?.PropertyT("pendingReplicationOperationsCount"), out var __jsonPendingReplicationOperationsCount) ? (long?)__jsonPendingReplicationOperationsCount : _pendingReplicationOperationsCount;} + {_targetNamespace = If( json?.PropertyT("targetNamespace"), out var __jsonTargetNamespace) ? (string)__jsonTargetNamespace : (string)_targetNamespace;} + {_postMigrationName = If( json?.PropertyT("postMigrationName"), out var __jsonPostMigrationName) ? (string)__jsonPostMigrationName : (string)_postMigrationName;} + {_migrationState = If( json?.PropertyT("migrationState"), out var __jsonMigrationState) ? (string)__jsonMigrationState : (string)_migrationState;} AfterFromJson(json); } /// - /// Serializes this instance of into a . + /// Serializes this instance of into a . /// /// The container to serialize this object into. If the caller /// passes in null, a new instance will be created and returned to the caller. /// Allows the caller to choose the depth of the serialization. See . /// - /// a serialized instance of as a . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode) { @@ -105,17 +104,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._pendingReplicationOperationsCount ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNumber((long)this._pendingReplicationOperationsCount) : null, "pendingReplicationOperationsCount" ,container.Add ); } AddIf( null != (((object)this._targetNamespace)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._targetNamespace.ToString()) : null, "targetNamespace" ,container.Add ); AddIf( null != (((object)this._postMigrationName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._postMigrationName.ToString()) : null, "postMigrationName" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._migrationState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._migrationState.ToString()) : null, "migrationState" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSet.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSet.PowerShell.cs new file mode 100644 index 000000000000..8efcaf6c74f3 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSet.PowerShell.cs @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + + /// Description of NetworkRuleSet resource. + [System.ComponentModel.TypeConverter(typeof(NetworkRuleSetTypeConverter))] + public partial class NetworkRuleSet + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new NetworkRuleSet(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new NetworkRuleSet(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal NetworkRuleSet(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NetworkRuleSetPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("DefaultAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).DefaultAction = (string) content.GetValueForProperty("DefaultAction",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).DefaultAction, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TrustedServiceAccessEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).TrustedServiceAccessEnabled = (bool?) content.GetValueForProperty("TrustedServiceAccessEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).TrustedServiceAccessEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("VirtualNetworkRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).VirtualNetworkRule = (System.Collections.Generic.List) content.GetValueForProperty("VirtualNetworkRule",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).VirtualNetworkRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NwRuleSetVirtualNetworkRulesTypeConverter.ConvertFrom)); + } + if (content.Contains("IPRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).IPRule = (System.Collections.Generic.List) content.GetValueForProperty("IPRule",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).IPRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NwRuleSetIPRulesTypeConverter.ConvertFrom)); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).PublicNetworkAccess, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal NetworkRuleSet(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NetworkRuleSetPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("DefaultAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).DefaultAction = (string) content.GetValueForProperty("DefaultAction",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).DefaultAction, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TrustedServiceAccessEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).TrustedServiceAccessEnabled = (bool?) content.GetValueForProperty("TrustedServiceAccessEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).TrustedServiceAccessEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("VirtualNetworkRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).VirtualNetworkRule = (System.Collections.Generic.List) content.GetValueForProperty("VirtualNetworkRule",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).VirtualNetworkRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NwRuleSetVirtualNetworkRulesTypeConverter.ConvertFrom)); + } + if (content.Contains("IPRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).IPRule = (System.Collections.Generic.List) content.GetValueForProperty("IPRule",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).IPRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NwRuleSetIPRulesTypeConverter.ConvertFrom)); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).PublicNetworkAccess, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Description of NetworkRuleSet resource. + [System.ComponentModel.TypeConverter(typeof(NetworkRuleSetTypeConverter))] + public partial interface INetworkRuleSet + + { + + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSet.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSet.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSet.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSet.TypeConverter.cs index 8a61dc0a5ded..8ccad14f5f7f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSet.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSet.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSet.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSet.cs similarity index 57% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSet.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSet.cs index d1f17ab001fb..74a3671e7a1d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSet.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSet.cs @@ -3,124 +3,123 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Description of NetworkRuleSet resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class NetworkRuleSet : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(); /// Default Action for Network Rule Set [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction? DefaultAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)Property).DefaultAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)Property).DefaultAction = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction)""); } + public string DefaultAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)Property).DefaultAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)Property).DefaultAction = value ?? null; } /// List of IpRules [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[] IPRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)Property).IPRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)Property).IPRule = value ?? null /* arrayOf */; } + public System.Collections.Generic.List IPRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)Property).IPRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)Property).IPRule = value ?? null /* arrayOf */; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NetworkRuleSetProperties()); set { {_property = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); set { {_systemData = value;} } } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id = value; } /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NetworkRuleSetProperties()); set { {_property = value;} } } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); set { {_systemData = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetProperties _property; /// NetworkRuleSet properties [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NetworkRuleSetProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NetworkRuleSetProperties()); set => this._property = value; } /// /// This determines if traffic is allowed over public network. By default it is enabled. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag? PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)Property).PublicNetworkAccess = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag)""); } + public string PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)Property).PublicNetworkAccess = value ?? null; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// Value that indicates whether Trusted Service Access is Enabled or not. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? TrustedServiceAccessEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)Property).TrustedServiceAccessEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)Property).TrustedServiceAccessEnabled = value ?? default(bool); } + public bool? TrustedServiceAccessEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)Property).TrustedServiceAccessEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)Property).TrustedServiceAccessEnabled = value ?? default(bool); } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; } /// List VirtualNetwork Rules [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[] VirtualNetworkRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)Property).VirtualNetworkRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)Property).VirtualNetworkRule = value ?? null /* arrayOf */; } + public System.Collections.Generic.List VirtualNetworkRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)Property).VirtualNetworkRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)Property).VirtualNetworkRule = value ?? null /* arrayOf */; } /// Creates an new instance. public NetworkRuleSet() @@ -143,86 +142,120 @@ public NetworkRuleSet() /// Description of NetworkRuleSet resource. public partial interface INetworkRuleSet : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource { /// Default Action for Network Rule Set [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Default Action for Network Rule Set", SerializedName = @"defaultAction", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction? DefaultAction { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Allow", "Deny")] + string DefaultAction { get; set; } /// List of IpRules [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of IpRules", SerializedName = @"ipRules", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[] IPRule { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules) })] + System.Collections.Generic.List IPRule { get; set; } /// /// This determines if traffic is allowed over public network. By default it is enabled. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This determines if traffic is allowed over public network. By default it is enabled.", SerializedName = @"publicNetworkAccess", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag? PublicNetworkAccess { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string PublicNetworkAccess { get; set; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// Value that indicates whether Trusted Service Access is Enabled or not. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether Trusted Service Access is Enabled or not.", SerializedName = @"trustedServiceAccessEnabled", PossibleTypes = new [] { typeof(bool) })] @@ -231,44 +264,51 @@ public partial interface INetworkRuleSet : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List VirtualNetwork Rules", SerializedName = @"virtualNetworkRules", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[] VirtualNetworkRule { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules) })] + System.Collections.Generic.List VirtualNetworkRule { get; set; } } /// Description of NetworkRuleSet resource. internal partial interface INetworkRuleSetInternal : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal { /// Default Action for Network Rule Set - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction? DefaultAction { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Allow", "Deny")] + string DefaultAction { get; set; } /// List of IpRules - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[] IPRule { get; set; } + System.Collections.Generic.List IPRule { get; set; } /// NetworkRuleSet properties - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetProperties Property { get; set; } /// /// This determines if traffic is allowed over public network. By default it is enabled. /// - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag? PublicNetworkAccess { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string PublicNetworkAccess { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// Value that indicates whether Trusted Service Access is Enabled or not. bool? TrustedServiceAccessEnabled { get; set; } /// List VirtualNetwork Rules - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[] VirtualNetworkRule { get; set; } + System.Collections.Generic.List VirtualNetworkRule { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSet.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSet.json.cs similarity index 91% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSet.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSet.json.cs index 730c92171715..a7384090c607 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSet.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSet.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NetworkRuleSet partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new NetworkRuleSet(json) : null; } @@ -77,9 +77,9 @@ internal NetworkRuleSet(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Js { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NetworkRuleSetProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NetworkRuleSetProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetListResult.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetListResult.PowerShell.cs similarity index 74% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetListResult.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetListResult.PowerShell.cs index 331fad86431c..60555b827731 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetListResult.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class NetworkRuleSetListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NetworkRuleSetListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NetworkRuleSetListResult(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal NetworkRuleSetListResult(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NetworkRuleSetTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NetworkRuleSetTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal NetworkRuleSetListResult(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NetworkRuleSetTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NetworkRuleSetTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetListResult.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetListResult.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetListResult.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetListResult.TypeConverter.cs index 052562768094..2cd8f27d6855 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetListResult.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetListResult.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetListResult.cs similarity index 75% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetListResult.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetListResult.cs index ab1068f4c16c..837ea0bb59aa 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetListResult.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The response of the List NetworkRuleSet operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class NetworkRuleSetListResult : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResult, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResult, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResultInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class NetworkRuleSetListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet[] _value; + private System.Collections.Generic.List _value; /// Result of the List NetworkRuleSet operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public NetworkRuleSetListResult() @@ -46,6 +46,9 @@ public partial interface INetworkRuleSetListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Link to the next set of results. Not empty if Value contains incomplete list of NetworkRuleSet.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -54,10 +57,13 @@ public partial interface INetworkRuleSetListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result of the List NetworkRuleSet operation.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet) })] + System.Collections.Generic.List Value { get; set; } } /// The response of the List NetworkRuleSet operation. @@ -69,7 +75,7 @@ internal partial interface INetworkRuleSetListResultInternal /// string NextLink { get; set; } /// Result of the List NetworkRuleSet operation. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetListResult.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetListResult.json.cs similarity index 89% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetListResult.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetListResult.json.cs index 0aaa00d561ec..cf362608e727 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetListResult.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NetworkRuleSetListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new NetworkRuleSetListResult(json) : null; } @@ -77,8 +77,8 @@ internal NetworkRuleSetListResult(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus. { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NetworkRuleSet.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NetworkRuleSet.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetProperties.PowerShell.cs similarity index 60% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetProperties.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetProperties.PowerShell.cs index 225b542e86e3..ff00b16c6978 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetProperties.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class NetworkRuleSetProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NetworkRuleSetProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NetworkRuleSetProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,29 +111,29 @@ internal NetworkRuleSetProperties(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("TrustedServiceAccessEnabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).TrustedServiceAccessEnabled = (bool?) content.GetValueForProperty("TrustedServiceAccessEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).TrustedServiceAccessEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).TrustedServiceAccessEnabled = (bool?) content.GetValueForProperty("TrustedServiceAccessEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).TrustedServiceAccessEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("DefaultAction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).DefaultAction = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction?) content.GetValueForProperty("DefaultAction",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).DefaultAction, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).DefaultAction = (string) content.GetValueForProperty("DefaultAction",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).DefaultAction, global::System.Convert.ToString); } if (content.Contains("VirtualNetworkRule")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).VirtualNetworkRule = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[]) content.GetValueForProperty("VirtualNetworkRule",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).VirtualNetworkRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NwRuleSetVirtualNetworkRulesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).VirtualNetworkRule = (System.Collections.Generic.List) content.GetValueForProperty("VirtualNetworkRule",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).VirtualNetworkRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NwRuleSetVirtualNetworkRulesTypeConverter.ConvertFrom)); } if (content.Contains("IPRule")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).IPRule = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[]) content.GetValueForProperty("IPRule",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).IPRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NwRuleSetIPRulesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).IPRule = (System.Collections.Generic.List) content.GetValueForProperty("IPRule",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).IPRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NwRuleSetIPRulesTypeConverter.ConvertFrom)); } if (content.Contains("PublicNetworkAccess")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).PublicNetworkAccess, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -150,23 +148,23 @@ internal NetworkRuleSetProperties(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("TrustedServiceAccessEnabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).TrustedServiceAccessEnabled = (bool?) content.GetValueForProperty("TrustedServiceAccessEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).TrustedServiceAccessEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).TrustedServiceAccessEnabled = (bool?) content.GetValueForProperty("TrustedServiceAccessEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).TrustedServiceAccessEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("DefaultAction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).DefaultAction = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction?) content.GetValueForProperty("DefaultAction",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).DefaultAction, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).DefaultAction = (string) content.GetValueForProperty("DefaultAction",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).DefaultAction, global::System.Convert.ToString); } if (content.Contains("VirtualNetworkRule")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).VirtualNetworkRule = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[]) content.GetValueForProperty("VirtualNetworkRule",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).VirtualNetworkRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NwRuleSetVirtualNetworkRulesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).VirtualNetworkRule = (System.Collections.Generic.List) content.GetValueForProperty("VirtualNetworkRule",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).VirtualNetworkRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NwRuleSetVirtualNetworkRulesTypeConverter.ConvertFrom)); } if (content.Contains("IPRule")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).IPRule = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[]) content.GetValueForProperty("IPRule",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).IPRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NwRuleSetIPRulesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).IPRule = (System.Collections.Generic.List) content.GetValueForProperty("IPRule",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).IPRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NwRuleSetIPRulesTypeConverter.ConvertFrom)); } if (content.Contains("PublicNetworkAccess")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal)this).PublicNetworkAccess, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetProperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetProperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetProperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetProperties.TypeConverter.cs index 677d86c1b59a..41b479cf85b4 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetProperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetProperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetProperties.cs similarity index 62% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetProperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetProperties.cs index 625baef5b434..ca2d831c165c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetProperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetProperties.cs @@ -3,39 +3,39 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// NetworkRuleSet properties [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class NetworkRuleSetProperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetProperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetProperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction? _defaultAction; + private string _defaultAction; /// Default Action for Network Rule Set [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction? DefaultAction { get => this._defaultAction; set => this._defaultAction = value; } + public string DefaultAction { get => this._defaultAction; set => this._defaultAction = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[] _iPRule; + private System.Collections.Generic.List _iPRule; /// List of IpRules [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[] IPRule { get => this._iPRule; set => this._iPRule = value; } + public System.Collections.Generic.List IPRule { get => this._iPRule; set => this._iPRule = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag? _publicNetworkAccess; + private string _publicNetworkAccess; /// /// This determines if traffic is allowed over public network. By default it is enabled. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag? PublicNetworkAccess { get => this._publicNetworkAccess; set => this._publicNetworkAccess = value; } + public string PublicNetworkAccess { get => this._publicNetworkAccess; set => this._publicNetworkAccess = value; } /// Backing field for property. private bool? _trustedServiceAccessEnabled; @@ -45,11 +45,11 @@ public partial class NetworkRuleSetProperties : public bool? TrustedServiceAccessEnabled { get => this._trustedServiceAccessEnabled; set => this._trustedServiceAccessEnabled = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[] _virtualNetworkRule; + private System.Collections.Generic.List _virtualNetworkRule; /// List VirtualNetwork Rules [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[] VirtualNetworkRule { get => this._virtualNetworkRule; set => this._virtualNetworkRule = value; } + public System.Collections.Generic.List VirtualNetworkRule { get => this._virtualNetworkRule; set => this._virtualNetworkRule = value; } /// Creates an new instance. public NetworkRuleSetProperties() @@ -65,32 +65,46 @@ public partial interface INetworkRuleSetProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Default Action for Network Rule Set", SerializedName = @"defaultAction", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction? DefaultAction { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Allow", "Deny")] + string DefaultAction { get; set; } /// List of IpRules [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of IpRules", SerializedName = @"ipRules", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[] IPRule { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules) })] + System.Collections.Generic.List IPRule { get; set; } /// /// This determines if traffic is allowed over public network. By default it is enabled. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This determines if traffic is allowed over public network. By default it is enabled.", SerializedName = @"publicNetworkAccess", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag? PublicNetworkAccess { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string PublicNetworkAccess { get; set; } /// Value that indicates whether Trusted Service Access is Enabled or not. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether Trusted Service Access is Enabled or not.", SerializedName = @"trustedServiceAccessEnabled", PossibleTypes = new [] { typeof(bool) })] @@ -99,10 +113,13 @@ public partial interface INetworkRuleSetProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List VirtualNetwork Rules", SerializedName = @"virtualNetworkRules", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[] VirtualNetworkRule { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules) })] + System.Collections.Generic.List VirtualNetworkRule { get; set; } } /// NetworkRuleSet properties @@ -110,17 +127,19 @@ internal partial interface INetworkRuleSetPropertiesInternal { /// Default Action for Network Rule Set - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction? DefaultAction { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Allow", "Deny")] + string DefaultAction { get; set; } /// List of IpRules - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[] IPRule { get; set; } + System.Collections.Generic.List IPRule { get; set; } /// /// This determines if traffic is allowed over public network. By default it is enabled. /// - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag? PublicNetworkAccess { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string PublicNetworkAccess { get; set; } /// Value that indicates whether Trusted Service Access is Enabled or not. bool? TrustedServiceAccessEnabled { get; set; } /// List VirtualNetwork Rules - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[] VirtualNetworkRule { get; set; } + System.Collections.Generic.List VirtualNetworkRule { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetProperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetProperties.json.cs similarity index 86% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetProperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetProperties.json.cs index 1636c02e1577..59b2b80ad095 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NetworkRuleSetProperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NetworkRuleSetProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NetworkRuleSetProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new NetworkRuleSetProperties(json) : null; } @@ -77,11 +77,11 @@ internal NetworkRuleSetProperties(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus. { return; } - {_trustedServiceAccessEnabled = If( json?.PropertyT("trustedServiceAccessEnabled"), out var __jsonTrustedServiceAccessEnabled) ? (bool?)__jsonTrustedServiceAccessEnabled : TrustedServiceAccessEnabled;} - {_defaultAction = If( json?.PropertyT("defaultAction"), out var __jsonDefaultAction) ? (string)__jsonDefaultAction : (string)DefaultAction;} - {_virtualNetworkRule = If( json?.PropertyT("virtualNetworkRules"), out var __jsonVirtualNetworkRules) ? If( __jsonVirtualNetworkRules as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NwRuleSetVirtualNetworkRules.FromJson(__u) )) ))() : null : VirtualNetworkRule;} - {_iPRule = If( json?.PropertyT("ipRules"), out var __jsonIPRules) ? If( __jsonIPRules as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NwRuleSetIPRules.FromJson(__p) )) ))() : null : IPRule;} - {_publicNetworkAccess = If( json?.PropertyT("publicNetworkAccess"), out var __jsonPublicNetworkAccess) ? (string)__jsonPublicNetworkAccess : (string)PublicNetworkAccess;} + {_trustedServiceAccessEnabled = If( json?.PropertyT("trustedServiceAccessEnabled"), out var __jsonTrustedServiceAccessEnabled) ? (bool?)__jsonTrustedServiceAccessEnabled : _trustedServiceAccessEnabled;} + {_defaultAction = If( json?.PropertyT("defaultAction"), out var __jsonDefaultAction) ? (string)__jsonDefaultAction : (string)_defaultAction;} + {_virtualNetworkRule = If( json?.PropertyT("virtualNetworkRules"), out var __jsonVirtualNetworkRules) ? If( __jsonVirtualNetworkRules as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NwRuleSetVirtualNetworkRules.FromJson(__u) )) ))() : null : _virtualNetworkRule;} + {_iPRule = If( json?.PropertyT("ipRules"), out var __jsonIPRules) ? If( __jsonIPRules as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NwRuleSetIPRules.FromJson(__p) )) ))() : null : _iPRule;} + {_publicNetworkAccess = If( json?.PropertyT("publicNetworkAccess"), out var __jsonPublicNetworkAccess) ? (string)__jsonPublicNetworkAccess : (string)_publicNetworkAccess;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetIPRules.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetIPRules.PowerShell.cs similarity index 78% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetIPRules.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetIPRules.PowerShell.cs index bfbb581e7ac7..e7f53bb710cd 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetIPRules.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetIPRules.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class NwRuleSetIPRules partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NwRuleSetIPRules(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NwRuleSetIPRules(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,17 +111,17 @@ internal NwRuleSetIPRules(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("IPMask")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRulesInternal)this).IPMask = (string) content.GetValueForProperty("IPMask",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRulesInternal)this).IPMask, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRulesInternal)this).IPMask = (string) content.GetValueForProperty("IPMask",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRulesInternal)this).IPMask, global::System.Convert.ToString); } if (content.Contains("Action")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRulesInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction?) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRulesInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRulesInternal)this).Action = (string) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRulesInternal)this).Action, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -136,11 +136,11 @@ internal NwRuleSetIPRules(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("IPMask")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRulesInternal)this).IPMask = (string) content.GetValueForProperty("IPMask",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRulesInternal)this).IPMask, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRulesInternal)this).IPMask = (string) content.GetValueForProperty("IPMask",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRulesInternal)this).IPMask, global::System.Convert.ToString); } if (content.Contains("Action")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRulesInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction?) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRulesInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRulesInternal)this).Action = (string) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRulesInternal)this).Action, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetIPRules.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetIPRules.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetIPRules.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetIPRules.TypeConverter.cs index 1034c9077a5e..fb9032fc9de3 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetIPRules.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetIPRules.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetIPRules.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetIPRules.cs similarity index 73% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetIPRules.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetIPRules.cs index 80520d3797eb..5369a42189e1 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetIPRules.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetIPRules.cs @@ -3,23 +3,23 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Description of NetWorkRuleSet - IpRules resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class NwRuleSetIPRules : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRulesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRulesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction? _action; + private string _action; /// The IP Filter Action [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction? Action { get => this._action; set => this._action = value; } + public string Action { get => this._action; set => this._action = value; } /// Backing field for property. private string _iPMask; @@ -42,14 +42,21 @@ public partial interface INwRuleSetIPRules : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The IP Filter Action", SerializedName = @"action", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction? Action { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Allow")] + string Action { get; set; } /// IP Mask [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"IP Mask", SerializedName = @"ipMask", PossibleTypes = new [] { typeof(string) })] @@ -61,7 +68,8 @@ internal partial interface INwRuleSetIPRulesInternal { /// The IP Filter Action - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction? Action { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Allow")] + string Action { get; set; } /// IP Mask string IPMask { get; set; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetIPRules.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetIPRules.json.cs similarity index 93% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetIPRules.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetIPRules.json.cs index 856575433ef8..5e6be0ff1af3 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetIPRules.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetIPRules.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NwRuleSetIPRules partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new NwRuleSetIPRules(json) : null; } @@ -77,8 +77,8 @@ internal NwRuleSetIPRules(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime. { return; } - {_iPMask = If( json?.PropertyT("ipMask"), out var __jsonIPMask) ? (string)__jsonIPMask : (string)IPMask;} - {_action = If( json?.PropertyT("action"), out var __jsonAction) ? (string)__jsonAction : (string)Action;} + {_iPMask = If( json?.PropertyT("ipMask"), out var __jsonIPMask) ? (string)__jsonIPMask : (string)_iPMask;} + {_action = If( json?.PropertyT("action"), out var __jsonAction) ? (string)__jsonAction : (string)_action;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetVirtualNetworkRules.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.PowerShell.cs similarity index 72% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetVirtualNetworkRules.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.PowerShell.cs index 6cd351e327d2..8bc417423c51 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetVirtualNetworkRules.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class NwRuleSetVirtualNetworkRules partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NwRuleSetVirtualNetworkRules(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NwRuleSetVirtualNetworkRules(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +111,21 @@ internal NwRuleSetVirtualNetworkRules(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("Subnet")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRulesInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnet) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRulesInternal)this).Subnet, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SubnetTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRulesInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnet) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRulesInternal)this).Subnet, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SubnetTypeConverter.ConvertFrom); } if (content.Contains("IgnoreMissingVnetServiceEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRulesInternal)this).IgnoreMissingVnetServiceEndpoint = (bool?) content.GetValueForProperty("IgnoreMissingVnetServiceEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRulesInternal)this).IgnoreMissingVnetServiceEndpoint, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRulesInternal)this).IgnoreMissingVnetServiceEndpoint = (bool?) content.GetValueForProperty("IgnoreMissingVnetServiceEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRulesInternal)this).IgnoreMissingVnetServiceEndpoint, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("SubnetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRulesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRulesInternal)this).SubnetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRulesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRulesInternal)this).SubnetId, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -142,15 +140,15 @@ internal NwRuleSetVirtualNetworkRules(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("Subnet")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRulesInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnet) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRulesInternal)this).Subnet, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SubnetTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRulesInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnet) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRulesInternal)this).Subnet, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SubnetTypeConverter.ConvertFrom); } if (content.Contains("IgnoreMissingVnetServiceEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRulesInternal)this).IgnoreMissingVnetServiceEndpoint = (bool?) content.GetValueForProperty("IgnoreMissingVnetServiceEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRulesInternal)this).IgnoreMissingVnetServiceEndpoint, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRulesInternal)this).IgnoreMissingVnetServiceEndpoint = (bool?) content.GetValueForProperty("IgnoreMissingVnetServiceEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRulesInternal)this).IgnoreMissingVnetServiceEndpoint, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("SubnetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRulesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRulesInternal)this).SubnetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRulesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRulesInternal)this).SubnetId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetVirtualNetworkRules.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetVirtualNetworkRules.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.TypeConverter.cs index 9d48a69db6ed..200d712571cc 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetVirtualNetworkRules.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetVirtualNetworkRules.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.cs similarity index 74% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetVirtualNetworkRules.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.cs index 6b85859ebbfa..98ccfdc3c05f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetVirtualNetworkRules.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Description of VirtualNetworkRules - NetworkRules resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class NwRuleSetVirtualNetworkRules : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRulesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRulesInternal { /// Backing field for property. @@ -22,18 +22,18 @@ public partial class NwRuleSetVirtualNetworkRules : public bool? IgnoreMissingVnetServiceEndpoint { get => this._ignoreMissingVnetServiceEndpoint; set => this._ignoreMissingVnetServiceEndpoint = value; } /// Internal Acessors for Subnet - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnet Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRulesInternal.Subnet { get => (this._subnet = this._subnet ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Subnet()); set { {_subnet = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnet Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRulesInternal.Subnet { get => (this._subnet = this._subnet ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Subnet()); set { {_subnet = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnet _subnet; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnet _subnet; /// Subnet properties [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnet Subnet { get => (this._subnet = this._subnet ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Subnet()); set => this._subnet = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnet Subnet { get => (this._subnet = this._subnet ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Subnet()); set => this._subnet = value; } /// Resource ID of Virtual Network Subnet [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnetInternal)Subnet).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnetInternal)Subnet).Id = value ?? null; } + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnetInternal)Subnet).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnetInternal)Subnet).Id = value ?? null; } /// Creates an new instance. public NwRuleSetVirtualNetworkRules() @@ -49,6 +49,9 @@ public partial interface INwRuleSetVirtualNetworkRules : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether to ignore missing VNet Service Endpoint", SerializedName = @"ignoreMissingVnetServiceEndpoint", PossibleTypes = new [] { typeof(bool) })] @@ -57,6 +60,9 @@ public partial interface INwRuleSetVirtualNetworkRules : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource ID of Virtual Network Subnet", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -70,7 +76,7 @@ internal partial interface INwRuleSetVirtualNetworkRulesInternal /// Value that indicates whether to ignore missing VNet Service Endpoint bool? IgnoreMissingVnetServiceEndpoint { get; set; } /// Subnet properties - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnet Subnet { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnet Subnet { get; set; } /// Resource ID of Virtual Network Subnet string SubnetId { get; set; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetVirtualNetworkRules.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.json.cs similarity index 93% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetVirtualNetworkRules.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.json.cs index 2840a9f100be..1b19802a8e27 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/NwRuleSetVirtualNetworkRules.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NwRuleSetVirtualNetworkRules partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new NwRuleSetVirtualNetworkRules(json) : null; } @@ -77,8 +77,8 @@ internal NwRuleSetVirtualNetworkRules(Microsoft.Azure.PowerShell.Cmdlets.Service { return; } - {_subnet = If( json?.PropertyT("subnet"), out var __jsonSubnet) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Subnet.FromJson(__jsonSubnet) : Subnet;} - {_ignoreMissingVnetServiceEndpoint = If( json?.PropertyT("ignoreMissingVnetServiceEndpoint"), out var __jsonIgnoreMissingVnetServiceEndpoint) ? (bool?)__jsonIgnoreMissingVnetServiceEndpoint : IgnoreMissingVnetServiceEndpoint;} + {_subnet = If( json?.PropertyT("subnet"), out var __jsonSubnet) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Subnet.FromJson(__jsonSubnet) : _subnet;} + {_ignoreMissingVnetServiceEndpoint = If( json?.PropertyT("ignoreMissingVnetServiceEndpoint"), out var __jsonIgnoreMissingVnetServiceEndpoint) ? (bool?)__jsonIgnoreMissingVnetServiceEndpoint : _ignoreMissingVnetServiceEndpoint;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Operation.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Operation.PowerShell.cs similarity index 62% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Operation.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Operation.PowerShell.cs index 7aa19ca99df3..82329d6b694d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Operation.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Operation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Operation partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Operation(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Operation(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,45 +111,45 @@ internal Operation(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Display")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.OperationDisplayTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.OperationDisplayTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("IsDataAction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Origin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).Origin, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).Origin, global::System.Convert.ToString); } if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AnyTypeConverter.ConvertFrom); } if (content.Contains("DisplayProvider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); } if (content.Contains("DisplayResource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); } if (content.Contains("DisplayOperation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); } if (content.Contains("DisplayDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -164,39 +164,39 @@ internal Operation(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Display")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.OperationDisplayTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.OperationDisplayTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("IsDataAction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Origin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).Origin, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).Origin, global::System.Convert.ToString); } if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AnyTypeConverter.ConvertFrom); } if (content.Contains("DisplayProvider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); } if (content.Contains("DisplayResource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); } if (content.Contains("DisplayOperation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); } if (content.Contains("DisplayDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Operation.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Operation.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Operation.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Operation.TypeConverter.cs index 476134aba397..c4b184a7abac 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Operation.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Operation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Operation.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Operation.cs similarity index 75% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Operation.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Operation.cs index 3a70cbfe473f..38cde7fb7ae1 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Operation.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Operation.cs @@ -3,39 +3,39 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// A Service Bus REST API operation [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class Operation : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperation, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplay _display; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplay _display; /// Display of the operation [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.OperationDisplay()); set => this._display = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.OperationDisplay()); set => this._display = value; } /// Localized friendly description for the operation [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)Display).Description; } + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)Display).Description; } /// Localized friendly name for the operation [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)Display).Operation; } + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)Display).Operation; } /// Resource provider of the operation [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)Display).Provider; } + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)Display).Provider; } /// Resource of the operation [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)Display).Resource; } + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)Display).Resource; } /// Backing field for property. private bool? _isDataAction; @@ -45,22 +45,22 @@ public partial class Operation : public bool? IsDataAction { get => this._isDataAction; set => this._isDataAction = value; } /// Internal Acessors for Display - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.OperationDisplay()); set { {_display = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.OperationDisplay()); set { {_display = value;} } } /// Internal Acessors for DisplayDescription - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)Display).Description = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)Display).Description = value; } /// Internal Acessors for DisplayOperation - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)Display).Operation = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)Display).Operation = value; } /// Internal Acessors for DisplayProvider - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)Display).Provider = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)Display).Provider = value; } /// Internal Acessors for DisplayResource - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)Display).Resource = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)Display).Resource = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationInternal.Name { get => this._name; set { {_name = value;} } } /// Backing field for property. private string _name; @@ -97,6 +97,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Localized friendly description for the operation", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -105,6 +108,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Localized friendly name for the operation", SerializedName = @"operation", PossibleTypes = new [] { typeof(string) })] @@ -113,6 +119,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Resource provider of the operation", SerializedName = @"provider", PossibleTypes = new [] { typeof(string) })] @@ -121,6 +130,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Resource of the operation", SerializedName = @"resource", PossibleTypes = new [] { typeof(string) })] @@ -129,6 +141,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates whether the operation is a data action", SerializedName = @"isDataAction", PossibleTypes = new [] { typeof(bool) })] @@ -137,6 +152,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Operation name: {provider}/{resource}/{operation}", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -145,6 +163,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Origin of the operation", SerializedName = @"origin", PossibleTypes = new [] { typeof(string) })] @@ -153,6 +174,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Properties of the operation", SerializedName = @"properties", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAny) })] @@ -164,7 +188,7 @@ internal partial interface IOperationInternal { /// Display of the operation - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplay Display { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplay Display { get; set; } /// Localized friendly description for the operation string DisplayDescription { get; set; } /// Localized friendly name for the operation diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Operation.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Operation.json.cs similarity index 91% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Operation.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Operation.json.cs index a97ba9b37bb5..8b72cfb2b1e6 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Operation.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Operation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class Operation partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperation. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperation. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new Operation(json) : null; } @@ -77,11 +75,11 @@ internal Operation(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.Js { return; } - {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.OperationDisplay.FromJson(__jsonDisplay) : Display;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction;} - {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Any.FromJson(__jsonProperties) : Property;} + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.OperationDisplay.FromJson(__jsonDisplay) : _display;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : _isDataAction;} + {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)_origin;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Any.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -105,7 +103,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso return container; } AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationDisplay.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs similarity index 73% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationDisplay.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs index 61c31ebfe2dc..aaee946379ed 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationDisplay.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class OperationDisplay partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationDisplay(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationDisplay(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,25 +111,25 @@ internal OperationDisplay(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Provider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); } if (content.Contains("Resource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); } if (content.Contains("Operation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -144,19 +144,19 @@ internal OperationDisplay(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Provider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); } if (content.Contains("Resource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); } if (content.Contains("Operation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationDisplay.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationDisplay.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs index a545f183bc5f..9f46b4c31705 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationDisplay.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplay ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplay ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplay).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplay).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationDisplay.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationDisplay.cs similarity index 84% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationDisplay.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationDisplay.cs index 2ca5a8bfa9d6..32cafd63e018 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationDisplay.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationDisplay.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Operation display payload [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class OperationDisplay : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplay, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplay, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal { /// Backing field for property. @@ -22,16 +22,16 @@ public partial class OperationDisplay : public string Description { get => this._description; } /// Internal Acessors for Description - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } /// Internal Acessors for Operation - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } /// Internal Acessors for Provider - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } /// Internal Acessors for Resource - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } /// Backing field for property. private string _operation; @@ -68,6 +68,9 @@ public partial interface IOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Localized friendly description for the operation", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -76,6 +79,9 @@ public partial interface IOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Localized friendly name for the operation", SerializedName = @"operation", PossibleTypes = new [] { typeof(string) })] @@ -84,6 +90,9 @@ public partial interface IOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Resource provider of the operation", SerializedName = @"provider", PossibleTypes = new [] { typeof(string) })] @@ -92,6 +101,9 @@ public partial interface IOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Resource of the operation", SerializedName = @"resource", PossibleTypes = new [] { typeof(string) })] diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationDisplay.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationDisplay.json.cs similarity index 91% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationDisplay.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationDisplay.json.cs index 8262cbcd621b..677a0933a58e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationDisplay.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationDisplay.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class OperationDisplay partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplay. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplay. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplay. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplay. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null; } @@ -77,10 +77,10 @@ internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime. { return; } - {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider;} - {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource;} - {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)_provider;} + {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)_resource;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)_operation;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} AfterFromJson(json); } @@ -103,19 +103,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationListResult.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationListResult.PowerShell.cs similarity index 75% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationListResult.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationListResult.PowerShell.cs index 7033d8972e7f..b22abdcd28d4 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationListResult.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -66,29 +66,27 @@ public partial class OperationListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationListResult(content); } @@ -98,10 +96,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -116,17 +114,17 @@ internal OperationListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.OperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.OperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -141,11 +139,11 @@ internal OperationListResult(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.OperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.OperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationListResult.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationListResult.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs index e0539e9ac044..002d60e92f90 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationListResult.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationListResult.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationListResult.cs similarity index 73% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationListResult.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationListResult.cs index 73433a855cda..985fa2b75d09 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationListResult.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationListResult.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -13,15 +13,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Previe /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class OperationListResult : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResult, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResult, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation[] Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -31,13 +31,13 @@ public partial class OperationListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation[] _value; + private System.Collections.Generic.List _value; /// /// List of ServiceBus operations supported by the Microsoft.ServiceBus resource provider. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation[] Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; } /// Creates an new instance. public OperationListResult() @@ -54,6 +54,9 @@ public partial interface IOperationListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"URL to get the next set of operation list results if there are any.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -64,10 +67,13 @@ public partial interface IOperationListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"List of ServiceBus operations supported by the Microsoft.ServiceBus resource provider.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperation) })] + System.Collections.Generic.List Value { get; } } /// Result of the request to list ServiceBus operations. It contains a list of operations and a URL link to get the next set @@ -80,7 +86,7 @@ internal partial interface IOperationListResultInternal /// /// List of ServiceBus operations supported by the Microsoft.ServiceBus resource provider. /// - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationListResult.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationListResult.json.cs similarity index 88% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationListResult.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationListResult.json.cs index 93abb86ed35a..69863b7b862c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/OperationListResult.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/OperationListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -57,13 +57,13 @@ public partial class OperationListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new OperationListResult(json) : null; } @@ -80,8 +80,8 @@ internal OperationListResult(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runti { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Operation.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Operation.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { @@ -116,7 +116,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso container.Add("value",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpoint.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpoint.PowerShell.cs similarity index 84% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpoint.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpoint.PowerShell.cs index c7401bc3e5fc..770871b72ad2 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpoint.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpoint.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class PrivateEndpoint partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateEndpoint(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateEndpoint(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,13 +111,13 @@ internal PrivateEndpoint(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointInternal)this).Id, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -132,7 +132,7 @@ internal PrivateEndpoint(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointInternal)this).Id, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpoint.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpoint.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpoint.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpoint.TypeConverter.cs index c49e0b27090b..b4f8a60bc204 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpoint.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpoint.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpoint.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpoint.cs similarity index 86% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpoint.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpoint.cs index e7767cfcebaf..eed03b0f76e7 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpoint.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpoint.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// PrivateEndpoint information. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class PrivateEndpoint : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointInternal { /// Backing field for property. @@ -35,6 +35,9 @@ public partial interface IPrivateEndpoint : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The ARM identifier for Private Endpoint.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpoint.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpoint.json.cs similarity index 94% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpoint.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpoint.json.cs index ac79970f266a..49e20811d40e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpoint.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpoint.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateEndpoint partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new PrivateEndpoint(json) : null; } @@ -77,7 +77,7 @@ internal PrivateEndpoint(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.J { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnection.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnection.PowerShell.cs new file mode 100644 index 000000000000..abe4f8fb9425 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnection.PowerShell.cs @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + + /// Properties of the PrivateEndpointConnection. + [System.ComponentModel.TypeConverter(typeof(PrivateEndpointConnectionTypeConverter))] + public partial class PrivateEndpointConnection + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PrivateEndpointConnection(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PrivateEndpointConnection(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PrivateEndpointConnection(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PrivateLinkServiceConnectionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ConnectionStateTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpointId, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ConnectionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).ConnectionState = (string) content.GetValueForProperty("ConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).ConnectionState, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PrivateEndpointConnection(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PrivateLinkServiceConnectionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ConnectionStateTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpointId, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ConnectionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).ConnectionState = (string) content.GetValueForProperty("ConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).ConnectionState, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties of the PrivateEndpointConnection. + [System.ComponentModel.TypeConverter(typeof(PrivateEndpointConnectionTypeConverter))] + public partial interface IPrivateEndpointConnection + + { + + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnection.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnection.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnection.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnection.TypeConverter.cs index 6cd7db333d6d..8d5fba31aaaa 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnection.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnection.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnection.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnection.cs similarity index 55% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnection.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnection.cs index 5e604f261c38..9db0e7e38fad 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnection.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnection.cs @@ -3,124 +3,123 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Properties of the PrivateEndpointConnection. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class PrivateEndpointConnection : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(); /// Status of the connection. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus? ConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus)""); } + public string ConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus = value ?? null; } /// Description of the connection state. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription = value ?? null; } + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription = value ?? null; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id = value; } - - /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; } /// Internal Acessors for PrivateEndpoint - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint = value; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint = value; } /// Internal Acessors for PrivateLinkServiceConnectionState - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal.PrivateLinkServiceConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState = value; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal.PrivateLinkServiceConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnectionProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionProperties()); set { {_property = value;} } } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Location + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; } /// The ARM identifier for Private Endpoint. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId = value ?? null; } + public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionProperties _property; /// Properties of the PrivateEndpointConnection. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnectionProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionProperties()); set => this._property = value; } /// Provisioning state of the Private Endpoint Connection. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState)""); } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState = value ?? null; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; } /// Creates an new instance. public PrivateEndpointConnection() @@ -143,20 +142,27 @@ public PrivateEndpointConnection() /// Properties of the PrivateEndpointConnection. public partial interface IPrivateEndpointConnection : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource { /// Status of the connection. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Status of the connection.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus? ConnectionState { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] + string ConnectionState { get; set; } /// Description of the connection state. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Description of the connection state.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -165,6 +171,9 @@ public partial interface IPrivateEndpointConnection : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The ARM identifier for Private Endpoint.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -173,92 +182,120 @@ public partial interface IPrivateEndpointConnection : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Provisioning state of the Private Endpoint Connection.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState? ProvisioningState { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed")] + string ProvisioningState { get; set; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } } /// Properties of the PrivateEndpointConnection. internal partial interface IPrivateEndpointConnectionInternal : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal { /// Status of the connection. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus? ConnectionState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] + string ConnectionState { get; set; } /// Description of the connection state. string Description { get; set; } /// The Private Endpoint resource for this Connection. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint PrivateEndpoint { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint PrivateEndpoint { get; set; } /// The ARM identifier for Private Endpoint. string PrivateEndpointId { get; set; } /// Details about the state of the connection. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState PrivateLinkServiceConnectionState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState PrivateLinkServiceConnectionState { get; set; } /// Properties of the PrivateEndpointConnection. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionProperties Property { get; set; } /// Provisioning state of the Private Endpoint Connection. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed")] + string ProvisioningState { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnection.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnection.json.cs similarity index 91% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnection.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnection.json.cs index b4f81d4c62ef..52a880542066 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnection.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnection.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateEndpointConnection partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new PrivateEndpointConnection(json) : null; } @@ -77,9 +77,9 @@ internal PrivateEndpointConnection(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnectionProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionListResult.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.PowerShell.cs similarity index 73% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionListResult.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.PowerShell.cs index fe03ab68dffb..170fb20600e3 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionListResult.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class PrivateEndpointConnectionListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateEndpointConnectionListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateEndpointConnectionListResult(content); } @@ -97,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -115,17 +113,17 @@ internal PrivateEndpointConnectionListResult(global::System.Collections.IDiction // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -140,11 +138,11 @@ internal PrivateEndpointConnectionListResult(global::System.Management.Automatio // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionListResult.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionListResult.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.TypeConverter.cs index b1408c636d18..3140b853e412 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionListResult.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionListResult.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.cs similarity index 73% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionListResult.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.cs index a6d72745c2cd..b6ea8058fb6e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionListResult.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Result of the list of all private endpoint connections operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class PrivateEndpointConnectionListResult : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResult, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResult, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResultInternal { /// Backing field for property. @@ -22,11 +22,11 @@ public partial class PrivateEndpointConnectionListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] _value; + private System.Collections.Generic.List _value; /// A collection of private endpoint connection resources. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PrivateEndpointConnectionListResult() @@ -42,6 +42,9 @@ public partial interface IPrivateEndpointConnectionListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A link for the next page of private endpoint connection resources.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -50,10 +53,13 @@ public partial interface IPrivateEndpointConnectionListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A collection of private endpoint connection resources.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection) })] + System.Collections.Generic.List Value { get; set; } } /// Result of the list of all private endpoint connections operation. @@ -63,7 +69,7 @@ internal partial interface IPrivateEndpointConnectionListResultInternal /// A link for the next page of private endpoint connection resources. string NextLink { get; set; } /// A collection of private endpoint connection resources. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionListResult.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.json.cs similarity index 88% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionListResult.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.json.cs index 1b548059ffd6..2c86faa167db 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionListResult.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateEndpointConnectionListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new PrivateEndpointConnectionListResult(json) : null; } @@ -77,8 +77,8 @@ internal PrivateEndpointConnectionListResult(Microsoft.Azure.PowerShell.Cmdlets. { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnection.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnection.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.PowerShell.cs similarity index 59% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionProperties.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.PowerShell.cs index 36be47815fb3..b09a117f6b93 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionProperties.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class PrivateEndpointConnectionProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateEndpointConnectionProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateEndpointConnectionProperties(content); } @@ -97,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -115,33 +113,33 @@ internal PrivateEndpointConnectionProperties(global::System.Collections.IDiction // actually deserialize if (content.Contains("PrivateEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointTypeConverter.ConvertFrom); } if (content.Contains("PrivateLinkServiceConnectionState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ConnectionStateTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ConnectionStateTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PrivateEndpointId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus?) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -156,27 +154,27 @@ internal PrivateEndpointConnectionProperties(global::System.Management.Automatio // actually deserialize if (content.Contains("PrivateEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointTypeConverter.ConvertFrom); } if (content.Contains("PrivateLinkServiceConnectionState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ConnectionStateTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ConnectionStateTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PrivateEndpointId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus?) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionProperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionProperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.TypeConverter.cs index 06b7cfc7d795..045572b57514 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionProperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionProperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.cs similarity index 54% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionProperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.cs index 7be948398111..cc07bd596d2d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionProperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.cs @@ -3,55 +3,55 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Properties of the private endpoint connection resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class PrivateEndpointConnectionProperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionProperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionProperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal { /// Internal Acessors for PrivateEndpoint - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal.PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpoint()); set { {_privateEndpoint = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal.PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpoint()); set { {_privateEndpoint = value;} } } /// Internal Acessors for PrivateLinkServiceConnectionState - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionPropertiesInternal.PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ConnectionState()); set { {_privateLinkServiceConnectionState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionPropertiesInternal.PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ConnectionState()); set { {_privateLinkServiceConnectionState = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint _privateEndpoint; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint _privateEndpoint; /// The Private Endpoint resource for this Connection. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpoint()); set => this._privateEndpoint = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpoint()); set => this._privateEndpoint = value; } /// The ARM identifier for Private Endpoint. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointInternal)PrivateEndpoint).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointInternal)PrivateEndpoint).Id = value ?? null; } + public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointInternal)PrivateEndpoint).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointInternal)PrivateEndpoint).Id = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState _privateLinkServiceConnectionState; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState _privateLinkServiceConnectionState; /// Details about the state of the connection. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ConnectionState()); set => this._privateLinkServiceConnectionState = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ConnectionState()); set => this._privateLinkServiceConnectionState = value; } /// Description of the connection state. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionStateInternal)PrivateLinkServiceConnectionState).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionStateInternal)PrivateLinkServiceConnectionState).Description = value ?? null; } + public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionStateInternal)PrivateLinkServiceConnectionState).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionStateInternal)PrivateLinkServiceConnectionState).Description = value ?? null; } /// Status of the connection. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus? PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionStateInternal)PrivateLinkServiceConnectionState).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionStateInternal)PrivateLinkServiceConnectionState).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus)""); } + public string PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionStateInternal)PrivateLinkServiceConnectionState).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionStateInternal)PrivateLinkServiceConnectionState).Status = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState? _provisioningState; + private string _provisioningState; /// Provisioning state of the Private Endpoint Connection. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState? ProvisioningState { get => this._provisioningState; set => this._provisioningState = value; } + public string ProvisioningState { get => this._provisioningState; set => this._provisioningState = value; } /// Creates an new instance. public PrivateEndpointConnectionProperties() @@ -67,6 +67,9 @@ public partial interface IPrivateEndpointConnectionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The ARM identifier for Private Endpoint.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -75,6 +78,9 @@ public partial interface IPrivateEndpointConnectionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Description of the connection state.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -83,18 +89,26 @@ public partial interface IPrivateEndpointConnectionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Status of the connection.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] + string PrivateLinkServiceConnectionStateStatus { get; set; } /// Provisioning state of the Private Endpoint Connection. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Provisioning state of the Private Endpoint Connection.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState? ProvisioningState { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed")] + string ProvisioningState { get; set; } } /// Properties of the private endpoint connection resource. @@ -102,17 +116,19 @@ internal partial interface IPrivateEndpointConnectionPropertiesInternal { /// The Private Endpoint resource for this Connection. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpoint PrivateEndpoint { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpoint PrivateEndpoint { get; set; } /// The ARM identifier for Private Endpoint. string PrivateEndpointId { get; set; } /// Details about the state of the connection. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IConnectionState PrivateLinkServiceConnectionState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IConnectionState PrivateLinkServiceConnectionState { get; set; } /// Description of the connection state. string PrivateLinkServiceConnectionStateDescription { get; set; } /// Status of the connection. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] + string PrivateLinkServiceConnectionStateStatus { get; set; } /// Provisioning state of the Private Endpoint Connection. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed")] + string ProvisioningState { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionProperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.json.cs similarity index 91% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionProperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.json.cs index cf88d6ae6e66..99f7ff028707 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateEndpointConnectionProperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateEndpointConnectionProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new PrivateEndpointConnectionProperties(json) : null; } @@ -77,9 +77,9 @@ internal PrivateEndpointConnectionProperties(Microsoft.Azure.PowerShell.Cmdlets. { return; } - {_privateEndpoint = If( json?.PropertyT("privateEndpoint"), out var __jsonPrivateEndpoint) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpoint.FromJson(__jsonPrivateEndpoint) : PrivateEndpoint;} - {_privateLinkServiceConnectionState = If( json?.PropertyT("privateLinkServiceConnectionState"), out var __jsonPrivateLinkServiceConnectionState) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ConnectionState.FromJson(__jsonPrivateLinkServiceConnectionState) : PrivateLinkServiceConnectionState;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_privateEndpoint = If( json?.PropertyT("privateEndpoint"), out var __jsonPrivateEndpoint) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpoint.FromJson(__jsonPrivateEndpoint) : _privateEndpoint;} + {_privateLinkServiceConnectionState = If( json?.PropertyT("privateLinkServiceConnectionState"), out var __jsonPrivateLinkServiceConnectionState) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ConnectionState.FromJson(__jsonPrivateLinkServiceConnectionState) : _privateLinkServiceConnectionState;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResource.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResource.PowerShell.cs similarity index 63% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResource.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResource.PowerShell.cs index 6c57785ee057..54effa191822 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResource.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class PrivateLinkResource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateLinkResource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateLinkResource(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,37 +111,37 @@ internal PrivateLinkResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateLinkResourcePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateLinkResourcePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("GroupId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).GroupId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).GroupId, global::System.Convert.ToString); } if (content.Contains("RequiredMember")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).RequiredMember = (string[]) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).RequiredMember = (System.Collections.Generic.List) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("RequiredZoneName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).RequiredZoneName = (string[]) content.GetValueForProperty("RequiredZoneName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).RequiredZoneName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).RequiredZoneName = (System.Collections.Generic.List) content.GetValueForProperty("RequiredZoneName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).RequiredZoneName, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -158,31 +156,31 @@ internal PrivateLinkResource(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateLinkResourcePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateLinkResourcePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("GroupId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).GroupId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).GroupId, global::System.Convert.ToString); } if (content.Contains("RequiredMember")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).RequiredMember = (string[]) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).RequiredMember = (System.Collections.Generic.List) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("RequiredZoneName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).RequiredZoneName = (string[]) content.GetValueForProperty("RequiredZoneName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal)this).RequiredZoneName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).RequiredZoneName = (System.Collections.Generic.List) content.GetValueForProperty("RequiredZoneName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal)this).RequiredZoneName, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResource.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResource.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResource.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResource.TypeConverter.cs index 8ca63215de07..be9148883cbf 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResource.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResource.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResource.cs similarity index 68% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResource.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResource.cs index 7d6b3f213d3e..878a74442102 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResource.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResource.cs @@ -3,19 +3,19 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Information of the private link resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class PrivateLinkResource : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResource, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal { [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string GroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)Property).GroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)Property).GroupId = value ?? null; } + public string GroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)Property).GroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)Property).GroupId = value ?? null; } /// Backing field for property. private string _id; @@ -25,7 +25,7 @@ public partial class PrivateLinkResource : public string Id { get => this._id; set => this._id = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateLinkResourceProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateLinkResourceProperties()); set { {_property = value;} } } /// Backing field for property. private string _name; @@ -35,19 +35,19 @@ public partial class PrivateLinkResource : public string Name { get => this._name; set => this._name = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceProperties _property; /// Properties of the private link resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateLinkResourceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateLinkResourceProperties()); set => this._property = value; } /// Required Members [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string[] RequiredMember { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)Property).RequiredMember; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)Property).RequiredMember = value ?? null /* arrayOf */; } + public System.Collections.Generic.List RequiredMember { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)Property).RequiredMember; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)Property).RequiredMember = value ?? null /* arrayOf */; } /// Required Zone Names [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string[] RequiredZoneName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)Property).RequiredZoneName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)Property).RequiredZoneName = value ?? null /* arrayOf */; } + public System.Collections.Generic.List RequiredZoneName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)Property).RequiredZoneName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)Property).RequiredZoneName = value ?? null /* arrayOf */; } /// Backing field for property. private string _type; @@ -69,6 +69,9 @@ public partial interface IPrivateLinkResource : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"groupId", PossibleTypes = new [] { typeof(string) })] @@ -77,6 +80,9 @@ public partial interface IPrivateLinkResource : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Fully qualified identifier of the resource.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -85,6 +91,9 @@ public partial interface IPrivateLinkResource : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the resource", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -93,22 +102,31 @@ public partial interface IPrivateLinkResource : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Required Members", SerializedName = @"requiredMembers", PossibleTypes = new [] { typeof(string) })] - string[] RequiredMember { get; set; } + System.Collections.Generic.List RequiredMember { get; set; } /// Required Zone Names [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Required Zone Names", SerializedName = @"requiredZoneNames", PossibleTypes = new [] { typeof(string) })] - string[] RequiredZoneName { get; set; } + System.Collections.Generic.List RequiredZoneName { get; set; } /// Type of the resource [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of the resource", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] @@ -125,11 +143,11 @@ internal partial interface IPrivateLinkResourceInternal /// Name of the resource string Name { get; set; } /// Properties of the private link resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceProperties Property { get; set; } /// Required Members - string[] RequiredMember { get; set; } + System.Collections.Generic.List RequiredMember { get; set; } /// Required Zone Names - string[] RequiredZoneName { get; set; } + System.Collections.Generic.List RequiredZoneName { get; set; } /// Type of the resource string Type { get; set; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResource.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResource.json.cs similarity index 92% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResource.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResource.json.cs index 0d1a6af3e9a7..ad27d1512b72 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResource.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateLinkResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new PrivateLinkResource(json) : null; } @@ -77,10 +77,10 @@ internal PrivateLinkResource(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runti { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateLinkResourceProperties.FromJson(__jsonProperties) : Property;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateLinkResourceProperties.FromJson(__jsonProperties) : _property;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourceProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourceProperties.PowerShell.cs similarity index 72% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourceProperties.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourceProperties.PowerShell.cs index 6cc775acf53c..f84245603b99 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourceProperties.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourceProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class PrivateLinkResourceProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateLinkResourceProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateLinkResourceProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +111,21 @@ internal PrivateLinkResourceProperties(global::System.Collections.IDictionary co // actually deserialize if (content.Contains("GroupId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)this).GroupId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)this).GroupId, global::System.Convert.ToString); } if (content.Contains("RequiredMember")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)this).RequiredMember = (string[]) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)this).RequiredMember = (System.Collections.Generic.List) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("RequiredZoneName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)this).RequiredZoneName = (string[]) content.GetValueForProperty("RequiredZoneName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)this).RequiredZoneName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)this).RequiredZoneName = (System.Collections.Generic.List) content.GetValueForProperty("RequiredZoneName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)this).RequiredZoneName, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -142,15 +140,15 @@ internal PrivateLinkResourceProperties(global::System.Management.Automation.PSOb // actually deserialize if (content.Contains("GroupId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)this).GroupId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)this).GroupId, global::System.Convert.ToString); } if (content.Contains("RequiredMember")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)this).RequiredMember = (string[]) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)this).RequiredMember = (System.Collections.Generic.List) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("RequiredZoneName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)this).RequiredZoneName = (string[]) content.GetValueForProperty("RequiredZoneName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal)this).RequiredZoneName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)this).RequiredZoneName = (System.Collections.Generic.List) content.GetValueForProperty("RequiredZoneName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal)this).RequiredZoneName, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourceProperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourceProperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourceProperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourceProperties.TypeConverter.cs index 90ad6c107cc3..c12fa1bd9c40 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourceProperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourceProperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourceProperties.cs similarity index 71% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourceProperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourceProperties.cs index 9bd0b6c05cee..c45605b70b5a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourceProperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourceProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Properties of PrivateLinkResource [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class PrivateLinkResourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcePropertiesInternal { /// Backing field for property. @@ -21,18 +21,18 @@ public partial class PrivateLinkResourceProperties : public string GroupId { get => this._groupId; set => this._groupId = value; } /// Backing field for property. - private string[] _requiredMember; + private System.Collections.Generic.List _requiredMember; /// Required Members [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public string[] RequiredMember { get => this._requiredMember; set => this._requiredMember = value; } + public System.Collections.Generic.List RequiredMember { get => this._requiredMember; set => this._requiredMember = value; } /// Backing field for property. - private string[] _requiredZoneName; + private System.Collections.Generic.List _requiredZoneName; /// Required Zone Names [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public string[] RequiredZoneName { get => this._requiredZoneName; set => this._requiredZoneName = value; } + public System.Collections.Generic.List RequiredZoneName { get => this._requiredZoneName; set => this._requiredZoneName = value; } /// Creates an new instance. public PrivateLinkResourceProperties() @@ -47,6 +47,9 @@ public partial interface IPrivateLinkResourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"groupId", PossibleTypes = new [] { typeof(string) })] @@ -55,18 +58,24 @@ public partial interface IPrivateLinkResourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Required Members", SerializedName = @"requiredMembers", PossibleTypes = new [] { typeof(string) })] - string[] RequiredMember { get; set; } + System.Collections.Generic.List RequiredMember { get; set; } /// Required Zone Names [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Required Zone Names", SerializedName = @"requiredZoneNames", PossibleTypes = new [] { typeof(string) })] - string[] RequiredZoneName { get; set; } + System.Collections.Generic.List RequiredZoneName { get; set; } } /// Properties of PrivateLinkResource @@ -75,9 +84,9 @@ internal partial interface IPrivateLinkResourcePropertiesInternal { string GroupId { get; set; } /// Required Members - string[] RequiredMember { get; set; } + System.Collections.Generic.List RequiredMember { get; set; } /// Required Zone Names - string[] RequiredZoneName { get; set; } + System.Collections.Generic.List RequiredZoneName { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourceProperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourceProperties.json.cs similarity index 88% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourceProperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourceProperties.json.cs index 01ea92c88ca7..ffadabc6e25e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourceProperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateLinkResourceProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new PrivateLinkResourceProperties(json) : null; } @@ -77,9 +77,9 @@ internal PrivateLinkResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.Servic { return; } - {_groupId = If( json?.PropertyT("groupId"), out var __jsonGroupId) ? (string)__jsonGroupId : (string)GroupId;} - {_requiredMember = If( json?.PropertyT("requiredMembers"), out var __jsonRequiredMembers) ? If( __jsonRequiredMembers as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : RequiredMember;} - {_requiredZoneName = If( json?.PropertyT("requiredZoneNames"), out var __jsonRequiredZoneNames) ? If( __jsonRequiredZoneNames as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : RequiredZoneName;} + {_groupId = If( json?.PropertyT("groupId"), out var __jsonGroupId) ? (string)__jsonGroupId : (string)_groupId;} + {_requiredMember = If( json?.PropertyT("requiredMembers"), out var __jsonRequiredMembers) ? If( __jsonRequiredMembers as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _requiredMember;} + {_requiredZoneName = If( json?.PropertyT("requiredZoneNames"), out var __jsonRequiredZoneNames) ? If( __jsonRequiredZoneNames as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : _requiredZoneName;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourcesListResult.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourcesListResult.PowerShell.cs similarity index 74% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourcesListResult.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourcesListResult.PowerShell.cs index c91876f9e526..a50e9f21008d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourcesListResult.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourcesListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class PrivateLinkResourcesListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateLinkResourcesListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateLinkResourcesListResult(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal PrivateLinkResourcesListResult(global::System.Collections.IDictionary c // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateLinkResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateLinkResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal PrivateLinkResourcesListResult(global::System.Management.Automation.PSO // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateLinkResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateLinkResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourcesListResult.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourcesListResult.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourcesListResult.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourcesListResult.TypeConverter.cs index 2ad30c284477..7c263a2dbd1a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourcesListResult.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourcesListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourcesListResult.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourcesListResult.cs similarity index 73% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourcesListResult.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourcesListResult.cs index dbb903844024..4df0ea749b28 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourcesListResult.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourcesListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Result of the List private link resources operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class PrivateLinkResourcesListResult : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResultInternal { /// Backing field for property. @@ -22,11 +22,11 @@ public partial class PrivateLinkResourcesListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource[] _value; + private System.Collections.Generic.List _value; /// A collection of private link resources [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PrivateLinkResourcesListResult() @@ -42,6 +42,9 @@ public partial interface IPrivateLinkResourcesListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A link for the next page of private link resources.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -50,10 +53,13 @@ public partial interface IPrivateLinkResourcesListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A collection of private link resources", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResource) })] + System.Collections.Generic.List Value { get; set; } } /// Result of the List private link resources operation. @@ -63,7 +69,7 @@ internal partial interface IPrivateLinkResourcesListResultInternal /// A link for the next page of private link resources. string NextLink { get; set; } /// A collection of private link resources - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourcesListResult.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourcesListResult.json.cs similarity index 88% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourcesListResult.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourcesListResult.json.cs index c342da42f399..4b683691d4c0 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/PrivateLinkResourcesListResult.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/PrivateLinkResourcesListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateLinkResourcesListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new PrivateLinkResourcesListResult(json) : null; } @@ -77,8 +77,8 @@ internal PrivateLinkResourcesListResult(Microsoft.Azure.PowerShell.Cmdlets.Servi { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResource) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateLinkResource.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResource) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateLinkResource.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ProxyResource.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ProxyResource.PowerShell.cs similarity index 77% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ProxyResource.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ProxyResource.PowerShell.cs index d86189c96629..9f22f3f7895c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ProxyResource.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ProxyResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -65,27 +65,27 @@ public partial class ProxyResource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProxyResource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProxyResource(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyR /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,25 +113,25 @@ internal ProxyResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -146,19 +146,19 @@ internal ProxyResource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ProxyResource.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs similarity index 97% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ProxyResource.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs index b67731fa036d..0f354d6a070b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ProxyResource.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ProxyResource.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ProxyResource.cs similarity index 87% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ProxyResource.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ProxyResource.cs index 3a8408b1fdd1..0224de86c839 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ProxyResource.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ProxyResource.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -12,8 +12,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class ProxyResource : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal { /// Backing field for property. @@ -33,16 +33,16 @@ public partial class ProxyResource : public string Location { get => this._location; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Location { get => this._location; set { {_location = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Location { get => this._location; set { {_location = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; @@ -76,6 +76,9 @@ public partial interface IProxyResource : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -84,6 +87,9 @@ public partial interface IProxyResource : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The geo-location where the resource lives", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] @@ -92,6 +98,9 @@ public partial interface IProxyResource : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The name of the resource", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -102,6 +111,9 @@ public partial interface IProxyResource : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of the resource. E.g. ""Microsoft.EventHub/Namespaces"" or ""Microsoft.EventHub/Namespaces/EventHubs""", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ProxyResource.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ProxyResource.json.cs similarity index 91% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ProxyResource.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ProxyResource.json.cs index ec1ec815073f..72b25059903a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/ProxyResource.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ProxyResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class ProxyResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; } @@ -79,10 +79,10 @@ internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Jso { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} AfterFromJson(json); } @@ -105,19 +105,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RegenerateAccessKeyParameters.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RegenerateAccessKeyParameters.PowerShell.cs similarity index 77% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RegenerateAccessKeyParameters.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RegenerateAccessKeyParameters.PowerShell.cs index dfb28b3ebfc4..5666df55427c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RegenerateAccessKeyParameters.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RegenerateAccessKeyParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -65,29 +65,27 @@ public partial class RegenerateAccessKeyParameters partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new RegenerateAccessKeyParameters(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new RegenerateAccessKeyParameters(content); } @@ -97,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -115,17 +113,17 @@ internal RegenerateAccessKeyParameters(global::System.Collections.IDictionary co // actually deserialize if (content.Contains("KeyType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParametersInternal)this).KeyType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType) content.GetValueForProperty("KeyType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParametersInternal)this).KeyType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParametersInternal)this).KeyType = (string) content.GetValueForProperty("KeyType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParametersInternal)this).KeyType, global::System.Convert.ToString); } if (content.Contains("Key")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParametersInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParametersInternal)this).Key, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParametersInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParametersInternal)this).Key, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -140,11 +138,11 @@ internal RegenerateAccessKeyParameters(global::System.Management.Automation.PSOb // actually deserialize if (content.Contains("KeyType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParametersInternal)this).KeyType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType) content.GetValueForProperty("KeyType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParametersInternal)this).KeyType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParametersInternal)this).KeyType = (string) content.GetValueForProperty("KeyType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParametersInternal)this).KeyType, global::System.Convert.ToString); } if (content.Contains("Key")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParametersInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParametersInternal)this).Key, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParametersInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParametersInternal)this).Key, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RegenerateAccessKeyParameters.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RegenerateAccessKeyParameters.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RegenerateAccessKeyParameters.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RegenerateAccessKeyParameters.TypeConverter.cs index d06b161c8a67..5f3cca76b0f5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RegenerateAccessKeyParameters.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RegenerateAccessKeyParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RegenerateAccessKeyParameters.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RegenerateAccessKeyParameters.cs similarity index 78% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RegenerateAccessKeyParameters.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RegenerateAccessKeyParameters.cs index 364c67ab4fb6..ae927e83d487 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RegenerateAccessKeyParameters.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RegenerateAccessKeyParameters.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -12,8 +12,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Previe /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class RegenerateAccessKeyParameters : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParametersInternal { /// Backing field for property. @@ -26,11 +26,11 @@ public partial class RegenerateAccessKeyParameters : public string Key { get => this._key; set => this._key = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType _keyType; + private string _keyType; /// The access key to regenerate. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType KeyType { get => this._keyType; set => this._keyType = value; } + public string KeyType { get => this._keyType; set => this._keyType = value; } /// Creates an new instance. public RegenerateAccessKeyParameters() @@ -48,6 +48,9 @@ public partial interface IRegenerateAccessKeyParameters : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType", SerializedName = @"key", PossibleTypes = new [] { typeof(string) })] @@ -56,10 +59,14 @@ public partial interface IRegenerateAccessKeyParameters : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The access key to regenerate.", SerializedName = @"keyType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType KeyType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + string KeyType { get; set; } } /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. @@ -71,7 +78,8 @@ internal partial interface IRegenerateAccessKeyParametersInternal /// string Key { get; set; } /// The access key to regenerate. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType KeyType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + string KeyType { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RegenerateAccessKeyParameters.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RegenerateAccessKeyParameters.json.cs similarity index 93% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RegenerateAccessKeyParameters.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RegenerateAccessKeyParameters.json.cs index 27f1ae36a940..23af6d04abbb 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RegenerateAccessKeyParameters.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RegenerateAccessKeyParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class RegenerateAccessKeyParameters partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new RegenerateAccessKeyParameters(json) : null; } @@ -79,8 +79,8 @@ internal RegenerateAccessKeyParameters(Microsoft.Azure.PowerShell.Cmdlets.Servic { return; } - {_keyType = If( json?.PropertyT("keyType"), out var __jsonKeyType) ? (string)__jsonKeyType : (string)KeyType;} - {_key = If( json?.PropertyT("key"), out var __jsonKey) ? (string)__jsonKey : (string)Key;} + {_keyType = If( json?.PropertyT("keyType"), out var __jsonKeyType) ? (string)__jsonKeyType : (string)_keyType;} + {_key = If( json?.PropertyT("key"), out var __jsonKey) ? (string)__jsonKey : (string)_key;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/Resource.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Resource.PowerShell.cs similarity index 80% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/Resource.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Resource.PowerShell.cs index fadd5fb9895c..c3071fa87402 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/Resource.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Resource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Resource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Resource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Resource(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResour /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,21 +111,21 @@ internal Resource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -140,15 +140,15 @@ internal Resource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/Resource.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Resource.TypeConverter.cs similarity index 97% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/Resource.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Resource.TypeConverter.cs index f2743b904ba5..79a33493fee7 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/Resource.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Resource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/Resource.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Resource.cs similarity index 85% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/Resource.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Resource.cs index f1760c8a7052..ff6449a589f9 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/Resource.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Resource.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The Resource definition for other than namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class Resource : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResource, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResource, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal { /// Backing field for property. @@ -22,13 +22,13 @@ public partial class Resource : public string Id { get => this._id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; @@ -58,6 +58,9 @@ public partial interface IResource : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Resource Id", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -66,6 +69,9 @@ public partial interface IResource : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Resource name", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -74,6 +80,9 @@ public partial interface IResource : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Resource type", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/Resource.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Resource.json.cs similarity index 91% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/Resource.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Resource.json.cs index 7fb688d60153..b2d4b7bf0cf6 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/Resource.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Resource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class Resource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResource. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResource. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResource. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new Resource(json) : null; } @@ -77,9 +75,9 @@ internal Resource(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.Jso { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } @@ -102,15 +100,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatch.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatch.PowerShell.cs similarity index 70% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatch.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatch.PowerShell.cs index 5e04aa060bed..946dde45aac5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatch.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatch.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class ResourceNamespacePatch partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatch DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatch DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResourceNamespacePatch(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatch DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatch DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResourceNamespacePatch(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatch FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatch FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,29 +111,29 @@ internal ResourceNamespacePatch(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ResourceNamespacePatchTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ResourceNamespacePatchTagsTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -150,23 +148,23 @@ internal ResourceNamespacePatch(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ResourceNamespacePatchTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ResourceNamespacePatchTagsTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatch.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatch.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatch.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatch.TypeConverter.cs index 43665c33721b..38c4b06a22cf 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatch.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatch.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatch ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatch ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatch).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatch).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatch.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatch.cs similarity index 67% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatch.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatch.cs index 9b0831dc0575..652f9c49fd7e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatch.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatch.cs @@ -3,25 +3,25 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The Resource definition. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class ResourceNamespacePatch : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatch, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatch, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Resource(); /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Id; } /// Backing field for property. private string _location; @@ -31,28 +31,28 @@ public partial class ResourceNamespacePatch : public string Location { get => this._location; set => this._location = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Type = value; } /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags _tag; /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ResourceNamespacePatchTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ResourceNamespacePatchTags()); set => this._tag = value; } /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Type; } /// Creates an new instance. public ResourceNamespacePatch() @@ -75,12 +75,15 @@ public ResourceNamespacePatch() /// The Resource definition. public partial interface IResourceNamespacePatch : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResource + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResource { /// Resource location [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource location", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] @@ -89,20 +92,23 @@ public partial interface IResourceNamespacePatch : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource tags", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags) })] + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags Tag { get; set; } } /// The Resource definition. internal partial interface IResourceNamespacePatchInternal : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal { /// Resource location string Location { get; set; } /// Resource tags - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags Tag { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatch.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatch.json.cs similarity index 92% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatch.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatch.json.cs index c06d9e17173e..9500a1f6e94f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatch.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatch.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ResourceNamespacePatch partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatch. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatch. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatch. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatch. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatch FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatch FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new ResourceNamespacePatch(json) : null; } @@ -77,9 +77,9 @@ internal ResourceNamespacePatch(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Ru { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.Resource(json); - {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ResourceNamespacePatchTags.FromJson(__jsonTags) : Tag;} + __resource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Resource(json); + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ResourceNamespacePatchTags.FromJson(__jsonTags) : _tag;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatchTags.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatchTags.PowerShell.cs similarity index 88% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatchTags.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatchTags.PowerShell.cs index f0b270c3fe4d..48f0af32b4f5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatchTags.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatchTags.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class ResourceNamespacePatchTags partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResourceNamespacePatchTags(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResourceNamespacePatchTags(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -117,7 +115,7 @@ internal ResourceNamespacePatchTags(global::System.Collections.IDictionary conte } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatchTags.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatchTags.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatchTags.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatchTags.TypeConverter.cs index 2ade70124dc0..b6f1727979d4 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatchTags.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatchTags.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatchTags.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatchTags.cs similarity index 76% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatchTags.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatchTags.cs index d7a5d74397b0..d98e18158fe9 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatchTags.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatchTags.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Resource tags public partial class ResourceNamespacePatchTags : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTagsInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTagsInternal { /// Creates an new instance. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatchTags.dictionary.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatchTags.dictionary.cs similarity index 95% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatchTags.dictionary.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatchTags.dictionary.cs index d5992701dc9e..eba64385e35d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatchTags.dictionary.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatchTags.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ResourceNamespacePatchTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ResourceNamespacePatchTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatchTags.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatchTags.json.cs similarity index 94% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatchTags.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatchTags.json.cs index 56c1c2d0b569..a1d3aa8772c8 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/ResourceNamespacePatchTags.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ResourceNamespacePatchTags.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ResourceNamespacePatchTags partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new ResourceNamespacePatchTags(json) : null; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Rule.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Rule.PowerShell.cs new file mode 100644 index 000000000000..a546343ffe29 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Rule.PowerShell.cs @@ -0,0 +1,412 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + + /// Description of Rule Resource. + [System.ComponentModel.TypeConverter(typeof(RuleTypeConverter))] + public partial class Rule + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Rule(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Rule(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Rule(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleproperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.RulepropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ActionTypeConverter.ConvertFrom); + } + if (content.Contains("SqlFilter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SqlFilter = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter) content.GetValueForProperty("SqlFilter",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SqlFilter, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SqlFilterTypeConverter.ConvertFrom); + } + if (content.Contains("CorrelationFilter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).CorrelationFilter = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter) content.GetValueForProperty("CorrelationFilter",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).CorrelationFilter, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilterTypeConverter.ConvertFrom); + } + if (content.Contains("FilterType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).FilterType = (string) content.GetValueForProperty("FilterType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).FilterType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActionSqlExpression")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ActionSqlExpression = (string) content.GetValueForProperty("ActionSqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ActionSqlExpression, global::System.Convert.ToString); + } + if (content.Contains("ActionCompatibilityLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ActionCompatibilityLevel = (int?) content.GetValueForProperty("ActionCompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ActionCompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SqlExpression")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SqlExpression = (string) content.GetValueForProperty("SqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SqlExpression, global::System.Convert.ToString); + } + if (content.Contains("SqlFilterCompatibilityLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SqlFilterCompatibilityLevel = (int?) content.GetValueForProperty("SqlFilterCompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SqlFilterCompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CorrelationFilterProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).CorrelationFilterProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties) content.GetValueForProperty("CorrelationFilterProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).CorrelationFilterProperty, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("CorrelationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).CorrelationId = (string) content.GetValueForProperty("CorrelationId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).CorrelationId, global::System.Convert.ToString); + } + if (content.Contains("MessageId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).MessageId = (string) content.GetValueForProperty("MessageId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).MessageId, global::System.Convert.ToString); + } + if (content.Contains("To")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).To = (string) content.GetValueForProperty("To",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).To, global::System.Convert.ToString); + } + if (content.Contains("ReplyTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ReplyTo = (string) content.GetValueForProperty("ReplyTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ReplyTo, global::System.Convert.ToString); + } + if (content.Contains("Label")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).Label = (string) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).Label, global::System.Convert.ToString); + } + if (content.Contains("SessionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SessionId = (string) content.GetValueForProperty("SessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SessionId, global::System.Convert.ToString); + } + if (content.Contains("ContentType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ContentType = (string) content.GetValueForProperty("ContentType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ContentType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActionRequiresPreprocessing")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ActionRequiresPreprocessing = (bool?) content.GetValueForProperty("ActionRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ActionRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SqlFilterRequiresPreprocessing")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SqlFilterRequiresPreprocessing = (bool?) content.GetValueForProperty("SqlFilterRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SqlFilterRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReplyToSessionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ReplyToSessionId = (string) content.GetValueForProperty("ReplyToSessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ReplyToSessionId, global::System.Convert.ToString); + } + if (content.Contains("CorrelationFilterRequiresPreprocessing")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).CorrelationFilterRequiresPreprocessing = (bool?) content.GetValueForProperty("CorrelationFilterRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).CorrelationFilterRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Rule(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleproperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.RulepropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ActionTypeConverter.ConvertFrom); + } + if (content.Contains("SqlFilter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SqlFilter = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter) content.GetValueForProperty("SqlFilter",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SqlFilter, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SqlFilterTypeConverter.ConvertFrom); + } + if (content.Contains("CorrelationFilter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).CorrelationFilter = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter) content.GetValueForProperty("CorrelationFilter",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).CorrelationFilter, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilterTypeConverter.ConvertFrom); + } + if (content.Contains("FilterType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).FilterType = (string) content.GetValueForProperty("FilterType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).FilterType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActionSqlExpression")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ActionSqlExpression = (string) content.GetValueForProperty("ActionSqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ActionSqlExpression, global::System.Convert.ToString); + } + if (content.Contains("ActionCompatibilityLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ActionCompatibilityLevel = (int?) content.GetValueForProperty("ActionCompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ActionCompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SqlExpression")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SqlExpression = (string) content.GetValueForProperty("SqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SqlExpression, global::System.Convert.ToString); + } + if (content.Contains("SqlFilterCompatibilityLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SqlFilterCompatibilityLevel = (int?) content.GetValueForProperty("SqlFilterCompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SqlFilterCompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CorrelationFilterProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).CorrelationFilterProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties) content.GetValueForProperty("CorrelationFilterProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).CorrelationFilterProperty, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("CorrelationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).CorrelationId = (string) content.GetValueForProperty("CorrelationId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).CorrelationId, global::System.Convert.ToString); + } + if (content.Contains("MessageId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).MessageId = (string) content.GetValueForProperty("MessageId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).MessageId, global::System.Convert.ToString); + } + if (content.Contains("To")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).To = (string) content.GetValueForProperty("To",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).To, global::System.Convert.ToString); + } + if (content.Contains("ReplyTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ReplyTo = (string) content.GetValueForProperty("ReplyTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ReplyTo, global::System.Convert.ToString); + } + if (content.Contains("Label")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).Label = (string) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).Label, global::System.Convert.ToString); + } + if (content.Contains("SessionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SessionId = (string) content.GetValueForProperty("SessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SessionId, global::System.Convert.ToString); + } + if (content.Contains("ContentType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ContentType = (string) content.GetValueForProperty("ContentType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ContentType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActionRequiresPreprocessing")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ActionRequiresPreprocessing = (bool?) content.GetValueForProperty("ActionRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ActionRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SqlFilterRequiresPreprocessing")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SqlFilterRequiresPreprocessing = (bool?) content.GetValueForProperty("SqlFilterRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).SqlFilterRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReplyToSessionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ReplyToSessionId = (string) content.GetValueForProperty("ReplyToSessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).ReplyToSessionId, global::System.Convert.ToString); + } + if (content.Contains("CorrelationFilterRequiresPreprocessing")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).CorrelationFilterRequiresPreprocessing = (bool?) content.GetValueForProperty("CorrelationFilterRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal)this).CorrelationFilterRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Description of Rule Resource. + [System.ComponentModel.TypeConverter(typeof(RuleTypeConverter))] + public partial interface IRule + + { + + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Rule.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Rule.TypeConverter.cs similarity index 97% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Rule.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Rule.TypeConverter.cs index 6c9e4f84c946..562192bb7fb8 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Rule.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Rule.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Rule.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Rule.cs similarity index 63% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Rule.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Rule.cs index 85d538bd010e..b20a01fe95a5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Rule.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Rule.cs @@ -3,120 +3,119 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Description of Rule Resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class Rule : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(); /// /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public int? ActionCompatibilityLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).ActionCompatibilityLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).ActionCompatibilityLevel = value ?? default(int); } + public int? ActionCompatibilityLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).ActionCompatibilityLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).ActionCompatibilityLevel = value ?? default(int); } /// Value that indicates whether the rule action requires preprocessing. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? ActionRequiresPreprocessing { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).ActionRequiresPreprocessing; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).ActionRequiresPreprocessing = value ?? default(bool); } + public bool? ActionRequiresPreprocessing { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).ActionRequiresPreprocessing; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).ActionRequiresPreprocessing = value ?? default(bool); } /// SQL expression. e.g. MyProperty='ABC' [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string ActionSqlExpression { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).ActionSqlExpression; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).ActionSqlExpression = value ?? null; } + public string ActionSqlExpression { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).ActionSqlExpression; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).ActionSqlExpression = value ?? null; } /// Content type of the message. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string ContentType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterContentType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterContentType = value ?? null; } + public string ContentType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterContentType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterContentType = value ?? null; } /// dictionary object for custom filters [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties CorrelationFilterProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterProperty = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties CorrelationFilterProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterProperty = value ?? null /* model class */; } /// Value that indicates whether the rule action requires preprocessing. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? CorrelationFilterRequiresPreprocessing { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterRequiresPreprocessing; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterRequiresPreprocessing = value ?? default(bool); } + public bool? CorrelationFilterRequiresPreprocessing { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterRequiresPreprocessing; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterRequiresPreprocessing = value ?? default(bool); } /// Identifier of the correlation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string CorrelationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterCorrelationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterCorrelationId = value ?? null; } + public string CorrelationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterCorrelationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterCorrelationId = value ?? null; } /// Filter type that is evaluated against a BrokeredMessage. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType? FilterType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).FilterType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).FilterType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType)""); } + public string FilterType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).FilterType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).FilterType = value ?? null; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; } /// Application specific label. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterLabel = value ?? null; } + public string Label { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterLabel = value ?? null; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; } /// Identifier of the message. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string MessageId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterMessageId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterMessageId = value ?? null; } + public string MessageId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterMessageId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterMessageId = value ?? null; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id = value; } /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// Internal Acessors for Action - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal.Action { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).Action; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).Action = value; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal.Action { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).Action; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).Action = value; } /// Internal Acessors for CorrelationFilter - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal.CorrelationFilter { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilter; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilter = value; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal.CorrelationFilter { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilter; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilter = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleproperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Ruleproperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleproperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Ruleproperties()); set { {_property = value;} } } /// Internal Acessors for SqlFilter - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal.SqlFilter { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).SqlFilter; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).SqlFilter = value; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal.SqlFilter { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).SqlFilter; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).SqlFilter = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); set { {_systemData = value;} } } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleproperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleproperties _property; /// Properties of Rule resource [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleproperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Ruleproperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleproperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Ruleproperties()); set => this._property = value; } /// Address of the queue to reply to. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string ReplyTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterReplyTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterReplyTo = value ?? null; } + public string ReplyTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterReplyTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterReplyTo = value ?? null; } /// Session identifier to reply to. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string ReplyToSessionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterReplyToSessionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterReplyToSessionId = value ?? null; } + public string ReplyToSessionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterReplyToSessionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterReplyToSessionId = value ?? null; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] @@ -124,62 +123,62 @@ public partial class Rule : /// Session identifier. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SessionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterSessionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterSessionId = value ?? null; } + public string SessionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterSessionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterSessionId = value ?? null; } /// The SQL expression. e.g. MyProperty='ABC' [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SqlExpression { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).SqlFilterSqlExpression; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).SqlFilterSqlExpression = value ?? null; } + public string SqlExpression { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).SqlFilterSqlExpression; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).SqlFilterSqlExpression = value ?? null; } /// /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public int? SqlFilterCompatibilityLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).SqlFilterCompatibilityLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).SqlFilterCompatibilityLevel = value ?? default(int); } + public int? SqlFilterCompatibilityLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).SqlFilterCompatibilityLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).SqlFilterCompatibilityLevel = value ?? default(int); } /// Value that indicates whether the rule action requires preprocessing. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? SqlFilterRequiresPreprocessing { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).SqlFilterRequiresPreprocessing; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).SqlFilterRequiresPreprocessing = value ?? default(bool); } + public bool? SqlFilterRequiresPreprocessing { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).SqlFilterRequiresPreprocessing; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).SqlFilterRequiresPreprocessing = value ?? default(bool); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// Address to send to. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string To { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal)Property).CorrelationFilterTo = value ?? null; } + public string To { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)Property).CorrelationFilterTo = value ?? null; } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; } /// Creates an new instance. public Rule() @@ -202,7 +201,7 @@ public Rule() /// Description of Rule Resource. public partial interface IRule : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource { /// /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. @@ -210,6 +209,9 @@ public partial interface IRule : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.", SerializedName = @"compatibilityLevel", PossibleTypes = new [] { typeof(int) })] @@ -218,6 +220,9 @@ public partial interface IRule : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether the rule action requires preprocessing.", SerializedName = @"requiresPreprocessing", PossibleTypes = new [] { typeof(bool) })] @@ -226,6 +231,9 @@ public partial interface IRule : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"SQL expression. e.g. MyProperty='ABC'", SerializedName = @"sqlExpression", PossibleTypes = new [] { typeof(string) })] @@ -234,6 +242,9 @@ public partial interface IRule : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Content type of the message.", SerializedName = @"contentType", PossibleTypes = new [] { typeof(string) })] @@ -242,14 +253,20 @@ public partial interface IRule : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"dictionary object for custom filters", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties CorrelationFilterProperty { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties CorrelationFilterProperty { get; set; } /// Value that indicates whether the rule action requires preprocessing. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether the rule action requires preprocessing.", SerializedName = @"requiresPreprocessing", PossibleTypes = new [] { typeof(bool) })] @@ -258,6 +275,9 @@ public partial interface IRule : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Identifier of the correlation.", SerializedName = @"correlationId", PossibleTypes = new [] { typeof(string) })] @@ -266,14 +286,21 @@ public partial interface IRule : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Filter type that is evaluated against a BrokeredMessage.", SerializedName = @"filterType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType? FilterType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SqlFilter", "CorrelationFilter")] + string FilterType { get; set; } /// Application specific label. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Application specific label.", SerializedName = @"label", PossibleTypes = new [] { typeof(string) })] @@ -282,6 +309,9 @@ public partial interface IRule : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Identifier of the message.", SerializedName = @"messageId", PossibleTypes = new [] { typeof(string) })] @@ -290,6 +320,9 @@ public partial interface IRule : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Address of the queue to reply to.", SerializedName = @"replyTo", PossibleTypes = new [] { typeof(string) })] @@ -298,6 +331,9 @@ public partial interface IRule : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Session identifier to reply to.", SerializedName = @"replyToSessionId", PossibleTypes = new [] { typeof(string) })] @@ -306,6 +342,9 @@ public partial interface IRule : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Session identifier.", SerializedName = @"sessionId", PossibleTypes = new [] { typeof(string) })] @@ -314,6 +353,9 @@ public partial interface IRule : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The SQL expression. e.g. MyProperty='ABC'", SerializedName = @"sqlExpression", PossibleTypes = new [] { typeof(string) })] @@ -324,6 +366,9 @@ public partial interface IRule : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.", SerializedName = @"compatibilityLevel", PossibleTypes = new [] { typeof(int) })] @@ -332,6 +377,9 @@ public partial interface IRule : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether the rule action requires preprocessing.", SerializedName = @"requiresPreprocessing", PossibleTypes = new [] { typeof(bool) })] @@ -339,55 +387,78 @@ public partial interface IRule : /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// Address to send to. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Address to send to.", SerializedName = @"to", PossibleTypes = new [] { typeof(string) })] @@ -396,13 +467,13 @@ public partial interface IRule : } /// Description of Rule Resource. internal partial interface IRuleInternal : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal { /// /// Represents the filter actions which are allowed for the transformation of a message that have been matched by a filter /// expression. /// - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction Action { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction Action { get; set; } /// /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. /// @@ -414,21 +485,22 @@ internal partial interface IRuleInternal : /// Content type of the message. string ContentType { get; set; } /// Properties of correlationFilter - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter CorrelationFilter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter CorrelationFilter { get; set; } /// dictionary object for custom filters - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties CorrelationFilterProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties CorrelationFilterProperty { get; set; } /// Value that indicates whether the rule action requires preprocessing. bool? CorrelationFilterRequiresPreprocessing { get; set; } /// Identifier of the correlation. string CorrelationId { get; set; } /// Filter type that is evaluated against a BrokeredMessage. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType? FilterType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SqlFilter", "CorrelationFilter")] + string FilterType { get; set; } /// Application specific label. string Label { get; set; } /// Identifier of the message. string MessageId { get; set; } /// Properties of Rule resource - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleproperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleproperties Property { get; set; } /// Address of the queue to reply to. string ReplyTo { get; set; } /// Session identifier to reply to. @@ -438,7 +510,7 @@ internal partial interface IRuleInternal : /// The SQL expression. e.g. MyProperty='ABC' string SqlExpression { get; set; } /// Properties of sqlFilter - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter SqlFilter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter SqlFilter { get; set; } /// /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. /// @@ -446,19 +518,21 @@ internal partial interface IRuleInternal : /// Value that indicates whether the rule action requires preprocessing. bool? SqlFilterRequiresPreprocessing { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// Address to send to. string To { get; set; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Rule.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Rule.json.cs similarity index 90% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Rule.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Rule.json.cs index b1ad0da6e5ef..ac9b2ad284f2 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Rule.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Rule.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class Rule partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new Rule(json) : null; } @@ -77,9 +75,9 @@ internal Rule(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObj { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Ruleproperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Ruleproperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } @@ -104,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RuleListResult.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RuleListResult.PowerShell.cs similarity index 76% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RuleListResult.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RuleListResult.PowerShell.cs index 363d13e9db68..89497b0849ea 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RuleListResult.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RuleListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class RuleListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new RuleListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new RuleListResult(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,17 +111,17 @@ internal RuleListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.RuleTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.RuleTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -136,11 +136,11 @@ internal RuleListResult(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.RuleTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.RuleTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RuleListResult.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RuleListResult.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RuleListResult.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RuleListResult.TypeConverter.cs index 8a3db2a0e89a..13aa38244330 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RuleListResult.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RuleListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RuleListResult.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RuleListResult.cs similarity index 75% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RuleListResult.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RuleListResult.cs index f0a80c8c122d..be8d5052f560 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RuleListResult.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RuleListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The response of the List rule operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class RuleListResult : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResult, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResult, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResultInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class RuleListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule[] _value; + private System.Collections.Generic.List _value; /// Result of the List Rules operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public RuleListResult() @@ -46,6 +46,9 @@ public partial interface IRuleListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Link to the next set of results. Not empty if Value contains incomplete list of rules", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -54,10 +57,13 @@ public partial interface IRuleListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result of the List Rules operation.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule) })] + System.Collections.Generic.List Value { get; set; } } /// The response of the List rule operation. @@ -69,7 +75,7 @@ internal partial interface IRuleListResultInternal /// string NextLink { get; set; } /// Result of the List Rules operation. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RuleListResult.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RuleListResult.json.cs similarity index 89% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RuleListResult.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RuleListResult.json.cs index 377ac4c3471d..cb3a7543f937 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/RuleListResult.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/RuleListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class RuleListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new RuleListResult(json) : null; } @@ -77,8 +77,8 @@ internal RuleListResult(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Js { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Rule.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Rule.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Ruleproperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Ruleproperties.PowerShell.cs new file mode 100644 index 000000000000..c26d0286f022 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Ruleproperties.PowerShell.cs @@ -0,0 +1,316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + + /// Description of Rule Resource. + [System.ComponentModel.TypeConverter(typeof(RulepropertiesTypeConverter))] + public partial class Ruleproperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleproperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Ruleproperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleproperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Ruleproperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleproperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Ruleproperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ActionTypeConverter.ConvertFrom); + } + if (content.Contains("SqlFilter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).SqlFilter = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter) content.GetValueForProperty("SqlFilter",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).SqlFilter, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SqlFilterTypeConverter.ConvertFrom); + } + if (content.Contains("CorrelationFilter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilter = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter) content.GetValueForProperty("CorrelationFilter",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilter, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilterTypeConverter.ConvertFrom); + } + if (content.Contains("FilterType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).FilterType = (string) content.GetValueForProperty("FilterType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).FilterType, global::System.Convert.ToString); + } + if (content.Contains("ActionSqlExpression")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).ActionSqlExpression = (string) content.GetValueForProperty("ActionSqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).ActionSqlExpression, global::System.Convert.ToString); + } + if (content.Contains("ActionCompatibilityLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).ActionCompatibilityLevel = (int?) content.GetValueForProperty("ActionCompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).ActionCompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SqlFilterSqlExpression")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).SqlFilterSqlExpression = (string) content.GetValueForProperty("SqlFilterSqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).SqlFilterSqlExpression, global::System.Convert.ToString); + } + if (content.Contains("SqlFilterCompatibilityLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).SqlFilterCompatibilityLevel = (int?) content.GetValueForProperty("SqlFilterCompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).SqlFilterCompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CorrelationFilterProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties) content.GetValueForProperty("CorrelationFilterProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterProperty, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("CorrelationFilterCorrelationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterCorrelationId = (string) content.GetValueForProperty("CorrelationFilterCorrelationId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterCorrelationId, global::System.Convert.ToString); + } + if (content.Contains("CorrelationFilterMessageId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterMessageId = (string) content.GetValueForProperty("CorrelationFilterMessageId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterMessageId, global::System.Convert.ToString); + } + if (content.Contains("CorrelationFilterTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterTo = (string) content.GetValueForProperty("CorrelationFilterTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterTo, global::System.Convert.ToString); + } + if (content.Contains("CorrelationFilterReplyTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterReplyTo = (string) content.GetValueForProperty("CorrelationFilterReplyTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterReplyTo, global::System.Convert.ToString); + } + if (content.Contains("CorrelationFilterLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterLabel = (string) content.GetValueForProperty("CorrelationFilterLabel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterLabel, global::System.Convert.ToString); + } + if (content.Contains("CorrelationFilterSessionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterSessionId = (string) content.GetValueForProperty("CorrelationFilterSessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterSessionId, global::System.Convert.ToString); + } + if (content.Contains("CorrelationFilterContentType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterContentType = (string) content.GetValueForProperty("CorrelationFilterContentType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterContentType, global::System.Convert.ToString); + } + if (content.Contains("ActionRequiresPreprocessing")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).ActionRequiresPreprocessing = (bool?) content.GetValueForProperty("ActionRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).ActionRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SqlFilterRequiresPreprocessing")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).SqlFilterRequiresPreprocessing = (bool?) content.GetValueForProperty("SqlFilterRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).SqlFilterRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CorrelationFilterReplyToSessionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterReplyToSessionId = (string) content.GetValueForProperty("CorrelationFilterReplyToSessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterReplyToSessionId, global::System.Convert.ToString); + } + if (content.Contains("CorrelationFilterRequiresPreprocessing")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterRequiresPreprocessing = (bool?) content.GetValueForProperty("CorrelationFilterRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Ruleproperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ActionTypeConverter.ConvertFrom); + } + if (content.Contains("SqlFilter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).SqlFilter = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter) content.GetValueForProperty("SqlFilter",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).SqlFilter, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SqlFilterTypeConverter.ConvertFrom); + } + if (content.Contains("CorrelationFilter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilter = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter) content.GetValueForProperty("CorrelationFilter",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilter, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilterTypeConverter.ConvertFrom); + } + if (content.Contains("FilterType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).FilterType = (string) content.GetValueForProperty("FilterType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).FilterType, global::System.Convert.ToString); + } + if (content.Contains("ActionSqlExpression")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).ActionSqlExpression = (string) content.GetValueForProperty("ActionSqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).ActionSqlExpression, global::System.Convert.ToString); + } + if (content.Contains("ActionCompatibilityLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).ActionCompatibilityLevel = (int?) content.GetValueForProperty("ActionCompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).ActionCompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SqlFilterSqlExpression")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).SqlFilterSqlExpression = (string) content.GetValueForProperty("SqlFilterSqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).SqlFilterSqlExpression, global::System.Convert.ToString); + } + if (content.Contains("SqlFilterCompatibilityLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).SqlFilterCompatibilityLevel = (int?) content.GetValueForProperty("SqlFilterCompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).SqlFilterCompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CorrelationFilterProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties) content.GetValueForProperty("CorrelationFilterProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterProperty, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("CorrelationFilterCorrelationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterCorrelationId = (string) content.GetValueForProperty("CorrelationFilterCorrelationId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterCorrelationId, global::System.Convert.ToString); + } + if (content.Contains("CorrelationFilterMessageId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterMessageId = (string) content.GetValueForProperty("CorrelationFilterMessageId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterMessageId, global::System.Convert.ToString); + } + if (content.Contains("CorrelationFilterTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterTo = (string) content.GetValueForProperty("CorrelationFilterTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterTo, global::System.Convert.ToString); + } + if (content.Contains("CorrelationFilterReplyTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterReplyTo = (string) content.GetValueForProperty("CorrelationFilterReplyTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterReplyTo, global::System.Convert.ToString); + } + if (content.Contains("CorrelationFilterLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterLabel = (string) content.GetValueForProperty("CorrelationFilterLabel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterLabel, global::System.Convert.ToString); + } + if (content.Contains("CorrelationFilterSessionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterSessionId = (string) content.GetValueForProperty("CorrelationFilterSessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterSessionId, global::System.Convert.ToString); + } + if (content.Contains("CorrelationFilterContentType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterContentType = (string) content.GetValueForProperty("CorrelationFilterContentType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterContentType, global::System.Convert.ToString); + } + if (content.Contains("ActionRequiresPreprocessing")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).ActionRequiresPreprocessing = (bool?) content.GetValueForProperty("ActionRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).ActionRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SqlFilterRequiresPreprocessing")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).SqlFilterRequiresPreprocessing = (bool?) content.GetValueForProperty("SqlFilterRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).SqlFilterRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CorrelationFilterReplyToSessionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterReplyToSessionId = (string) content.GetValueForProperty("CorrelationFilterReplyToSessionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterReplyToSessionId, global::System.Convert.ToString); + } + if (content.Contains("CorrelationFilterRequiresPreprocessing")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterRequiresPreprocessing = (bool?) content.GetValueForProperty("CorrelationFilterRequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal)this).CorrelationFilterRequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Description of Rule Resource. + [System.ComponentModel.TypeConverter(typeof(RulepropertiesTypeConverter))] + public partial interface IRuleproperties + + { + + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Ruleproperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Ruleproperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Ruleproperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Ruleproperties.TypeConverter.cs index 1f577577956a..7cafeb6239a3 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Ruleproperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Ruleproperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleproperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleproperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleproperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleproperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Ruleproperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Ruleproperties.cs similarity index 67% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Ruleproperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Ruleproperties.cs index ee573da65f46..05326beba8cb 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Ruleproperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Ruleproperties.cs @@ -3,124 +3,124 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Description of Rule Resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class Ruleproperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleproperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleproperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction _action; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction _action; /// /// Represents the filter actions which are allowed for the transformation of a message that have been matched by a filter /// expression. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction Action { get => (this._action = this._action ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Action()); set => this._action = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction Action { get => (this._action = this._action ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Action()); set => this._action = value; } /// /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public int? ActionCompatibilityLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)Action).CompatibilityLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)Action).CompatibilityLevel = value ?? default(int); } + public int? ActionCompatibilityLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)Action).CompatibilityLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)Action).CompatibilityLevel = value ?? default(int); } /// Value that indicates whether the rule action requires preprocessing. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? ActionRequiresPreprocessing { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)Action).RequiresPreprocessing; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)Action).RequiresPreprocessing = value ?? default(bool); } + public bool? ActionRequiresPreprocessing { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)Action).RequiresPreprocessing; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)Action).RequiresPreprocessing = value ?? default(bool); } /// SQL expression. e.g. MyProperty='ABC' [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string ActionSqlExpression { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)Action).SqlExpression; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)Action).SqlExpression = value ?? null; } + public string ActionSqlExpression { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)Action).SqlExpression; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)Action).SqlExpression = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter _correlationFilter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter _correlationFilter; /// Properties of correlationFilter [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter CorrelationFilter { get => (this._correlationFilter = this._correlationFilter ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilter()); set => this._correlationFilter = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter CorrelationFilter { get => (this._correlationFilter = this._correlationFilter ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilter()); set => this._correlationFilter = value; } /// Content type of the message. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string CorrelationFilterContentType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).ContentType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).ContentType = value ?? null; } + public string CorrelationFilterContentType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).ContentType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).ContentType = value ?? null; } /// Identifier of the correlation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string CorrelationFilterCorrelationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).CorrelationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).CorrelationId = value ?? null; } + public string CorrelationFilterCorrelationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).CorrelationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).CorrelationId = value ?? null; } /// Application specific label. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string CorrelationFilterLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).Label = value ?? null; } + public string CorrelationFilterLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).Label; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).Label = value ?? null; } /// Identifier of the message. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string CorrelationFilterMessageId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).MessageId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).MessageId = value ?? null; } + public string CorrelationFilterMessageId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).MessageId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).MessageId = value ?? null; } /// dictionary object for custom filters [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties CorrelationFilterProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).Property = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties CorrelationFilterProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).Property = value ?? null /* model class */; } /// Address of the queue to reply to. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string CorrelationFilterReplyTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).ReplyTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).ReplyTo = value ?? null; } + public string CorrelationFilterReplyTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).ReplyTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).ReplyTo = value ?? null; } /// Session identifier to reply to. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string CorrelationFilterReplyToSessionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).ReplyToSessionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).ReplyToSessionId = value ?? null; } + public string CorrelationFilterReplyToSessionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).ReplyToSessionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).ReplyToSessionId = value ?? null; } /// Value that indicates whether the rule action requires preprocessing. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? CorrelationFilterRequiresPreprocessing { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).RequiresPreprocessing; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).RequiresPreprocessing = value ?? default(bool); } + public bool? CorrelationFilterRequiresPreprocessing { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).RequiresPreprocessing; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).RequiresPreprocessing = value ?? default(bool); } /// Session identifier. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string CorrelationFilterSessionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).SessionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).SessionId = value ?? null; } + public string CorrelationFilterSessionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).SessionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).SessionId = value ?? null; } /// Address to send to. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string CorrelationFilterTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).To; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterInternal)CorrelationFilter).To = value ?? null; } + public string CorrelationFilterTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).To; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterInternal)CorrelationFilter).To = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType? _filterType; + private string _filterType; /// Filter type that is evaluated against a BrokeredMessage. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType? FilterType { get => this._filterType; set => this._filterType = value; } + public string FilterType { get => this._filterType; set => this._filterType = value; } /// Internal Acessors for Action - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal.Action { get => (this._action = this._action ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Action()); set { {_action = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal.Action { get => (this._action = this._action ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Action()); set { {_action = value;} } } /// Internal Acessors for CorrelationFilter - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal.CorrelationFilter { get => (this._correlationFilter = this._correlationFilter ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilter()); set { {_correlationFilter = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal.CorrelationFilter { get => (this._correlationFilter = this._correlationFilter ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilter()); set { {_correlationFilter = value;} } } /// Internal Acessors for SqlFilter - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRulepropertiesInternal.SqlFilter { get => (this._sqlFilter = this._sqlFilter ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SqlFilter()); set { {_sqlFilter = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRulepropertiesInternal.SqlFilter { get => (this._sqlFilter = this._sqlFilter ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SqlFilter()); set { {_sqlFilter = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter _sqlFilter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter _sqlFilter; /// Properties of sqlFilter [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter SqlFilter { get => (this._sqlFilter = this._sqlFilter ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SqlFilter()); set => this._sqlFilter = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter SqlFilter { get => (this._sqlFilter = this._sqlFilter ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SqlFilter()); set => this._sqlFilter = value; } /// /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public int? SqlFilterCompatibilityLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)SqlFilter).CompatibilityLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)SqlFilter).CompatibilityLevel = value ?? default(int); } + public int? SqlFilterCompatibilityLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)SqlFilter).CompatibilityLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)SqlFilter).CompatibilityLevel = value ?? default(int); } /// Value that indicates whether the rule action requires preprocessing. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? SqlFilterRequiresPreprocessing { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)SqlFilter).RequiresPreprocessing; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)SqlFilter).RequiresPreprocessing = value ?? default(bool); } + public bool? SqlFilterRequiresPreprocessing { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)SqlFilter).RequiresPreprocessing; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)SqlFilter).RequiresPreprocessing = value ?? default(bool); } /// The SQL expression. e.g. MyProperty='ABC' [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SqlFilterSqlExpression { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)SqlFilter).SqlExpression; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)SqlFilter).SqlExpression = value ?? null; } + public string SqlFilterSqlExpression { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)SqlFilter).SqlExpression; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)SqlFilter).SqlExpression = value ?? null; } /// Creates an new instance. public Ruleproperties() @@ -138,6 +138,9 @@ public partial interface IRuleproperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.", SerializedName = @"compatibilityLevel", PossibleTypes = new [] { typeof(int) })] @@ -146,6 +149,9 @@ public partial interface IRuleproperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether the rule action requires preprocessing.", SerializedName = @"requiresPreprocessing", PossibleTypes = new [] { typeof(bool) })] @@ -154,6 +160,9 @@ public partial interface IRuleproperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"SQL expression. e.g. MyProperty='ABC'", SerializedName = @"sqlExpression", PossibleTypes = new [] { typeof(string) })] @@ -162,6 +171,9 @@ public partial interface IRuleproperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Content type of the message.", SerializedName = @"contentType", PossibleTypes = new [] { typeof(string) })] @@ -170,6 +182,9 @@ public partial interface IRuleproperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Identifier of the correlation.", SerializedName = @"correlationId", PossibleTypes = new [] { typeof(string) })] @@ -178,6 +193,9 @@ public partial interface IRuleproperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Application specific label.", SerializedName = @"label", PossibleTypes = new [] { typeof(string) })] @@ -186,6 +204,9 @@ public partial interface IRuleproperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Identifier of the message.", SerializedName = @"messageId", PossibleTypes = new [] { typeof(string) })] @@ -194,14 +215,20 @@ public partial interface IRuleproperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"dictionary object for custom filters", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties CorrelationFilterProperty { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties CorrelationFilterProperty { get; set; } /// Address of the queue to reply to. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Address of the queue to reply to.", SerializedName = @"replyTo", PossibleTypes = new [] { typeof(string) })] @@ -210,6 +237,9 @@ public partial interface IRuleproperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Session identifier to reply to.", SerializedName = @"replyToSessionId", PossibleTypes = new [] { typeof(string) })] @@ -218,6 +248,9 @@ public partial interface IRuleproperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether the rule action requires preprocessing.", SerializedName = @"requiresPreprocessing", PossibleTypes = new [] { typeof(bool) })] @@ -226,6 +259,9 @@ public partial interface IRuleproperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Session identifier.", SerializedName = @"sessionId", PossibleTypes = new [] { typeof(string) })] @@ -234,6 +270,9 @@ public partial interface IRuleproperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Address to send to.", SerializedName = @"to", PossibleTypes = new [] { typeof(string) })] @@ -242,16 +281,23 @@ public partial interface IRuleproperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Filter type that is evaluated against a BrokeredMessage.", SerializedName = @"filterType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType? FilterType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SqlFilter", "CorrelationFilter")] + string FilterType { get; set; } /// /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.", SerializedName = @"compatibilityLevel", PossibleTypes = new [] { typeof(int) })] @@ -260,6 +306,9 @@ public partial interface IRuleproperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether the rule action requires preprocessing.", SerializedName = @"requiresPreprocessing", PossibleTypes = new [] { typeof(bool) })] @@ -268,6 +317,9 @@ public partial interface IRuleproperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The SQL expression. e.g. MyProperty='ABC'", SerializedName = @"sqlExpression", PossibleTypes = new [] { typeof(string) })] @@ -282,7 +334,7 @@ internal partial interface IRulepropertiesInternal /// Represents the filter actions which are allowed for the transformation of a message that have been matched by a filter /// expression. /// - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction Action { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction Action { get; set; } /// /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. /// @@ -292,7 +344,7 @@ internal partial interface IRulepropertiesInternal /// SQL expression. e.g. MyProperty='ABC' string ActionSqlExpression { get; set; } /// Properties of correlationFilter - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilter CorrelationFilter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilter CorrelationFilter { get; set; } /// Content type of the message. string CorrelationFilterContentType { get; set; } /// Identifier of the correlation. @@ -302,7 +354,7 @@ internal partial interface IRulepropertiesInternal /// Identifier of the message. string CorrelationFilterMessageId { get; set; } /// dictionary object for custom filters - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties CorrelationFilterProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties CorrelationFilterProperty { get; set; } /// Address of the queue to reply to. string CorrelationFilterReplyTo { get; set; } /// Session identifier to reply to. @@ -314,9 +366,10 @@ internal partial interface IRulepropertiesInternal /// Address to send to. string CorrelationFilterTo { get; set; } /// Filter type that is evaluated against a BrokeredMessage. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType? FilterType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SqlFilter", "CorrelationFilter")] + string FilterType { get; set; } /// Properties of sqlFilter - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter SqlFilter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter SqlFilter { get; set; } /// /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. /// diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Ruleproperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Ruleproperties.json.cs similarity index 92% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Ruleproperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Ruleproperties.json.cs index 6748532133f2..425249ce684b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Ruleproperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Ruleproperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Ruleproperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleproperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleproperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleproperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleproperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleproperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleproperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new Ruleproperties(json) : null; } @@ -77,10 +77,10 @@ internal Ruleproperties(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Js { return; } - {_action = If( json?.PropertyT("action"), out var __jsonAction) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Action.FromJson(__jsonAction) : Action;} - {_sqlFilter = If( json?.PropertyT("sqlFilter"), out var __jsonSqlFilter) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SqlFilter.FromJson(__jsonSqlFilter) : SqlFilter;} - {_correlationFilter = If( json?.PropertyT("correlationFilter"), out var __jsonCorrelationFilter) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CorrelationFilter.FromJson(__jsonCorrelationFilter) : CorrelationFilter;} - {_filterType = If( json?.PropertyT("filterType"), out var __jsonFilterType) ? (string)__jsonFilterType : (string)FilterType;} + {_action = If( json?.PropertyT("action"), out var __jsonAction) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Action.FromJson(__jsonAction) : _action;} + {_sqlFilter = If( json?.PropertyT("sqlFilter"), out var __jsonSqlFilter) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SqlFilter.FromJson(__jsonSqlFilter) : _sqlFilter;} + {_correlationFilter = If( json?.PropertyT("correlationFilter"), out var __jsonCorrelationFilter) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CorrelationFilter.FromJson(__jsonCorrelationFilter) : _correlationFilter;} + {_filterType = If( json?.PropertyT("filterType"), out var __jsonFilterType) ? (string)__jsonFilterType : (string)_filterType;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRule.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRule.PowerShell.cs similarity index 52% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRule.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRule.PowerShell.cs index 312aea9e1a8f..2e01e20af26b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRule.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRule.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SbAuthorizationRule partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SbAuthorizationRule(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SbAuthorizationRule(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,61 +111,61 @@ internal SbAuthorizationRule(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRulePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRulePropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("Rights")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).Rights = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]) content.GetValueForProperty("Rights",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).Rights, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).Rights = (System.Collections.Generic.List) content.GetValueForProperty("Rights",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).Rights, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("SystemDataCreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -182,55 +180,55 @@ internal SbAuthorizationRule(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRulePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRulePropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("Rights")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).Rights = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]) content.GetValueForProperty("Rights",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).Rights, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).Rights = (System.Collections.Generic.List) content.GetValueForProperty("Rights",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).Rights, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("SystemDataCreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRule.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRule.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRule.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRule.TypeConverter.cs index 8972472e6a8a..1e3e5be9bab9 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRule.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRule.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRule.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRule.cs similarity index 59% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRule.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRule.cs index 9d5061e23553..efb4499a139b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRule.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRule.cs @@ -3,61 +3,60 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Description of a namespace authorization rule. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbAuthorizationRule : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(); /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id = value; } /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRuleProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRuleProperties()); set { {_property = value;} } } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); set { {_systemData = value;} } } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleProperties _property; /// AuthorizationRule properties. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRuleProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRuleProperties()); set => this._property = value; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] @@ -65,44 +64,44 @@ public partial class SbAuthorizationRule : /// The rights associated with the rule. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[] Rights { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRulePropertiesInternal)Property).Rights; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRulePropertiesInternal)Property).Rights = value ?? null /* arrayOf */; } + public System.Collections.Generic.List Rights { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRulePropertiesInternal)Property).Rights; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRulePropertiesInternal)Property).Rights = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; } /// Creates an new instance. public SbAuthorizationRule() @@ -125,88 +124,115 @@ public SbAuthorizationRule() /// Description of a namespace authorization rule. public partial interface ISbAuthorizationRule : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource { /// The rights associated with the rule. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The rights associated with the rule.", SerializedName = @"rights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[] Rights { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + System.Collections.Generic.List Rights { get; set; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } } /// Description of a namespace authorization rule. internal partial interface ISbAuthorizationRuleInternal : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal { /// AuthorizationRule properties. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleProperties Property { get; set; } /// The rights associated with the rule. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[] Rights { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + System.Collections.Generic.List Rights { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRule.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRule.json.cs similarity index 91% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRule.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRule.json.cs index bb972e13c2ce..1a032bac50fe 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRule.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRule.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SbAuthorizationRule partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbAuthorizationRule(json) : null; } @@ -77,9 +77,9 @@ internal SbAuthorizationRule(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runti { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRuleProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRuleProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleListResult.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleListResult.PowerShell.cs similarity index 74% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleListResult.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleListResult.PowerShell.cs index d9fea5f917b2..22b13b5c6915 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleListResult.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SbAuthorizationRuleListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SbAuthorizationRuleListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SbAuthorizationRuleListResult(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal SbAuthorizationRuleListResult(global::System.Collections.IDictionary co // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRuleTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRuleTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal SbAuthorizationRuleListResult(global::System.Management.Automation.PSOb // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRuleTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRuleTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleListResult.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleListResult.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleListResult.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleListResult.TypeConverter.cs index 1bde44eb754c..4da6989b21af 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleListResult.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleListResult.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleListResult.cs similarity index 75% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleListResult.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleListResult.cs index 4eb6704c3d35..e57c30e1a8a1 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleListResult.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The response to the List Namespace operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbAuthorizationRuleListResult : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResultInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class SbAuthorizationRuleListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule[] _value; + private System.Collections.Generic.List _value; /// Result of the List Authorization Rules operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public SbAuthorizationRuleListResult() @@ -46,6 +46,9 @@ public partial interface ISbAuthorizationRuleListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Link to the next set of results. Not empty if Value contains incomplete list of Authorization Rules.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -54,10 +57,13 @@ public partial interface ISbAuthorizationRuleListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result of the List Authorization Rules operation.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule) })] + System.Collections.Generic.List Value { get; set; } } /// The response to the List Namespace operation. @@ -69,7 +75,7 @@ internal partial interface ISbAuthorizationRuleListResultInternal /// string NextLink { get; set; } /// Result of the List Authorization Rules operation. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleListResult.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleListResult.json.cs similarity index 88% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleListResult.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleListResult.json.cs index 5fd67a931058..cccee252532f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleListResult.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SbAuthorizationRuleListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbAuthorizationRuleListResult(json) : null; } @@ -77,8 +77,8 @@ internal SbAuthorizationRuleListResult(Microsoft.Azure.PowerShell.Cmdlets.Servic { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRule.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleProperties.PowerShell.cs similarity index 78% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleProperties.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleProperties.PowerShell.cs index 196cb8ab80b7..3fef0d22495d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleProperties.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SbAuthorizationRuleProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SbAuthorizationRuleProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SbAuthorizationRuleProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,13 +111,13 @@ internal SbAuthorizationRuleProperties(global::System.Collections.IDictionary co // actually deserialize if (content.Contains("Rights")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRulePropertiesInternal)this).Rights = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]) content.GetValueForProperty("Rights",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRulePropertiesInternal)this).Rights, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRulePropertiesInternal)this).Rights = (System.Collections.Generic.List) content.GetValueForProperty("Rights",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRulePropertiesInternal)this).Rights, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -134,7 +132,7 @@ internal SbAuthorizationRuleProperties(global::System.Management.Automation.PSOb // actually deserialize if (content.Contains("Rights")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRulePropertiesInternal)this).Rights = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]) content.GetValueForProperty("Rights",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRulePropertiesInternal)this).Rights, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRulePropertiesInternal)this).Rights = (System.Collections.Generic.List) content.GetValueForProperty("Rights",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRulePropertiesInternal)this).Rights, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleProperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleProperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleProperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleProperties.TypeConverter.cs index b3fb8af58eac..2ef1497ad390 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleProperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleProperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleProperties.cs similarity index 64% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleProperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleProperties.cs index 18919be8e6f5..4e57ee7beeca 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleProperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleProperties.cs @@ -3,23 +3,23 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// AuthorizationRule properties. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbAuthorizationRuleProperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleProperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRulePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleProperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRulePropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[] _rights; + private System.Collections.Generic.List _rights; /// The rights associated with the rule. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[] Rights { get => this._rights; set => this._rights = value; } + public System.Collections.Generic.List Rights { get => this._rights; set => this._rights = value; } /// Creates an new instance. public SbAuthorizationRuleProperties() @@ -35,10 +35,14 @@ public partial interface ISbAuthorizationRuleProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The rights associated with the rule.", SerializedName = @"rights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[] Rights { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + System.Collections.Generic.List Rights { get; set; } } /// AuthorizationRule properties. @@ -46,7 +50,8 @@ internal partial interface ISbAuthorizationRulePropertiesInternal { /// The rights associated with the rule. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[] Rights { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + System.Collections.Generic.List Rights { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleProperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleProperties.json.cs similarity index 88% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleProperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleProperties.json.cs index ac5ea2e5983b..d61ddbbf99ae 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbAuthorizationRuleProperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbAuthorizationRuleProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SbAuthorizationRuleProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbAuthorizationRuleProperties(json) : null; } @@ -77,7 +77,7 @@ internal SbAuthorizationRuleProperties(Microsoft.Azure.PowerShell.Cmdlets.Servic { return; } - {_rights = If( json?.PropertyT("rights"), out var __jsonRights) ? If( __jsonRights as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights) (__u is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights)""))) ))() : null : Rights;} + {_rights = If( json?.PropertyT("rights"), out var __jsonRights) ? If( __jsonRights as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _rights;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbClientAffineProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbClientAffineProperties.PowerShell.cs similarity index 74% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbClientAffineProperties.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbClientAffineProperties.PowerShell.cs index 984f2f0055b3..1772d9bab33d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbClientAffineProperties.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbClientAffineProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SbClientAffineProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SbClientAffineProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SbClientAffineProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +111,21 @@ internal SbClientAffineProperties(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)this).ClientId, global::System.Convert.ToString); } if (content.Contains("IsDurable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)this).IsDurable = (bool?) content.GetValueForProperty("IsDurable",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)this).IsDurable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)this).IsDurable = (bool?) content.GetValueForProperty("IsDurable",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)this).IsDurable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsShared")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)this).IsShared = (bool?) content.GetValueForProperty("IsShared",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)this).IsShared, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)this).IsShared = (bool?) content.GetValueForProperty("IsShared",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)this).IsShared, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -142,15 +140,15 @@ internal SbClientAffineProperties(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)this).ClientId, global::System.Convert.ToString); } if (content.Contains("IsDurable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)this).IsDurable = (bool?) content.GetValueForProperty("IsDurable",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)this).IsDurable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)this).IsDurable = (bool?) content.GetValueForProperty("IsDurable",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)this).IsDurable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsShared")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)this).IsShared = (bool?) content.GetValueForProperty("IsShared",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)this).IsShared, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)this).IsShared = (bool?) content.GetValueForProperty("IsShared",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)this).IsShared, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbClientAffineProperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbClientAffineProperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbClientAffineProperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbClientAffineProperties.TypeConverter.cs index ee28da1f0b6a..71338d73e0e1 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbClientAffineProperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbClientAffineProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbClientAffineProperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbClientAffineProperties.cs similarity index 91% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbClientAffineProperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbClientAffineProperties.cs index e5a3942ae61a..31d8a6c82b4d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbClientAffineProperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbClientAffineProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Properties specific to client affine subscriptions. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbClientAffineProperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal { /// Backing field for property. @@ -57,6 +57,9 @@ public partial interface ISbClientAffineProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates the Client ID of the application that created the client-affine subscription.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -67,6 +70,9 @@ public partial interface ISbClientAffineProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"For client-affine subscriptions, this value indicates whether the subscription is durable or not.", SerializedName = @"isDurable", PossibleTypes = new [] { typeof(bool) })] @@ -77,6 +83,9 @@ public partial interface ISbClientAffineProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"For client-affine subscriptions, this value indicates whether the subscription is shared or not.", SerializedName = @"isShared", PossibleTypes = new [] { typeof(bool) })] diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbClientAffineProperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbClientAffineProperties.json.cs similarity index 92% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbClientAffineProperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbClientAffineProperties.json.cs index a49912bb4d76..db352677d15a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbClientAffineProperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbClientAffineProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SbClientAffineProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbClientAffineProperties(json) : null; } @@ -77,9 +77,9 @@ internal SbClientAffineProperties(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus. { return; } - {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)ClientId;} - {_isDurable = If( json?.PropertyT("isDurable"), out var __jsonIsDurable) ? (bool?)__jsonIsDurable : IsDurable;} - {_isShared = If( json?.PropertyT("isShared"), out var __jsonIsShared) ? (bool?)__jsonIsShared : IsShared;} + {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)_clientId;} + {_isDurable = If( json?.PropertyT("isDurable"), out var __jsonIsDurable) ? (bool?)__jsonIsDurable : _isDurable;} + {_isShared = If( json?.PropertyT("isShared"), out var __jsonIsShared) ? (bool?)__jsonIsShared : _isShared;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespace.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespace.PowerShell.cs new file mode 100644 index 000000000000..8b10074a3257 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespace.PowerShell.cs @@ -0,0 +1,468 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + + /// Description of a namespace resource. + [System.ComponentModel.TypeConverter(typeof(SbNamespaceTypeConverter))] + public partial class SbNamespace + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SbNamespace(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SbNamespace(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SbNamespace(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSkuTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespacePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SkuTier = (string) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SkuTier, global::System.Convert.ToString); + } + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.EncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("UserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("MinimumTlsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).MinimumTlsVersion = (string) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).MinimumTlsVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ServiceBusEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); + } + if (content.Contains("MetricId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).MetricId, global::System.Convert.ToString); + } + if (content.Contains("ZoneRedundant")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).ZoneRedundant = (bool?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).ZoneRedundant, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateEndpointConnection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + } + if (content.Contains("DisableLocalAuth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AlternateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).AlternateName, global::System.Convert.ToString); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).PublicNetworkAccess, global::System.Convert.ToString); + } + if (content.Contains("PremiumMessagingPartition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).PremiumMessagingPartition = (int?) content.GetValueForProperty("PremiumMessagingPartition",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).PremiumMessagingPartition, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KeySource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).KeySource = (string) content.GetValueForProperty("KeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).KeySource, global::System.Convert.ToString); + } + if (content.Contains("KeyVaultProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).KeyVaultProperty = (System.Collections.Generic.List) content.GetValueForProperty("KeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).KeyVaultProperty, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("RequireInfrastructureEncryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).RequireInfrastructureEncryption = (bool?) content.GetValueForProperty("RequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).RequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SbNamespace(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSkuTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespacePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SkuTier = (string) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SkuTier, global::System.Convert.ToString); + } + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.EncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("UserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("MinimumTlsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).MinimumTlsVersion = (string) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).MinimumTlsVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ServiceBusEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); + } + if (content.Contains("MetricId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).MetricId, global::System.Convert.ToString); + } + if (content.Contains("ZoneRedundant")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).ZoneRedundant = (bool?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).ZoneRedundant, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateEndpointConnection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + } + if (content.Contains("DisableLocalAuth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AlternateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).AlternateName, global::System.Convert.ToString); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).PublicNetworkAccess, global::System.Convert.ToString); + } + if (content.Contains("PremiumMessagingPartition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).PremiumMessagingPartition = (int?) content.GetValueForProperty("PremiumMessagingPartition",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).PremiumMessagingPartition, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KeySource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).KeySource = (string) content.GetValueForProperty("KeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).KeySource, global::System.Convert.ToString); + } + if (content.Contains("KeyVaultProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).KeyVaultProperty = (System.Collections.Generic.List) content.GetValueForProperty("KeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).KeyVaultProperty, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("RequireInfrastructureEncryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).RequireInfrastructureEncryption = (bool?) content.GetValueForProperty("RequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal)this).RequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Description of a namespace resource. + [System.ComponentModel.TypeConverter(typeof(SbNamespaceTypeConverter))] + public partial interface ISbNamespace + + { + + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespace.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespace.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespace.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespace.TypeConverter.cs index 29e757728ecd..2b4d53e1b869 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespace.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespace.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespace.cs similarity index 60% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespace.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespace.cs index 94ef08af3209..71073557c621 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespace.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespace.cs @@ -3,157 +3,156 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Description of a namespace resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbNamespace : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.TrackedResource(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.TrackedResource(); /// Alternate name for namespace [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string AlternateName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).AlternateName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).AlternateName = value ?? null; } + public string AlternateName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).AlternateName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).AlternateName = value ?? null; } /// The time the namespace was created [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).CreatedAt; } + public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).CreatedAt; } /// This property disables SAS authentication for the Service Bus namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? DisableLocalAuth { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).DisableLocalAuth; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).DisableLocalAuth = value ?? default(bool); } + public bool? DisableLocalAuth { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).DisableLocalAuth; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).DisableLocalAuth = value ?? default(bool); } /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__trackedResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__trackedResource).Id; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity _identity; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity _identity; /// Properties of BYOK Identity description [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Identity()); set => this._identity = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Identity()); set => this._identity = value; } /// Type of managed service identity. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType)""); } + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).Type = value ?? null; } /// Enumerates the possible value of keySource for Encryption [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource? KeySource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).EncryptionKeySource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).EncryptionKeySource = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource)""); } + public string KeySource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).EncryptionKeySource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).EncryptionKeySource = value ?? null; } /// Properties of KeyVault [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] KeyVaultProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).EncryptionKeyVaultProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).EncryptionKeyVaultProperty = value ?? null /* arrayOf */; } + public System.Collections.Generic.List KeyVaultProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).EncryptionKeyVaultProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).EncryptionKeyVaultProperty = value ?? null /* arrayOf */; } /// The Geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)__trackedResource).Location = value ; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)__trackedResource).Location = value ; } /// Identifier for Azure Insights metrics [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string MetricId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).MetricId; } + public string MetricId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).MetricId; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__trackedResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__trackedResource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__trackedResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__trackedResource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__trackedResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__trackedResource).Type = value; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).CreatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).CreatedAt = value; } /// Internal Acessors for Encryption - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal.Encryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).Encryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).Encryption = value; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal.Encryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).Encryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).Encryption = value; } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Identity()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Identity()); set { {_identity = value;} } } /// Internal Acessors for MetricId - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal.MetricId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).MetricId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).MetricId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal.MetricId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).MetricId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).MetricId = value; } /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal.PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal.PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).PrincipalId = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespaceProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespaceProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for ServiceBusEndpoint - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal.ServiceBusEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).ServiceBusEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).ServiceBusEndpoint = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal.ServiceBusEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).ServiceBusEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).ServiceBusEndpoint = value; } /// Internal Acessors for Sku - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSku()); set { {_sku = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSku()); set { {_sku = value;} } } /// Internal Acessors for Status - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).Status = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).Status = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); set { {_systemData = value;} } } /// Internal Acessors for TenantId - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal.TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal.TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).TenantId = value; } /// Internal Acessors for UpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).UpdatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).UpdatedAt = value; } /// The minimum TLS version for the cluster to support, e.g. '1.2' [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion? MinimumTlsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).MinimumTlsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).MinimumTlsVersion = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion)""); } + public string MinimumTlsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).MinimumTlsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).MinimumTlsVersion = value ?? null; } /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__trackedResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__trackedResource).Name; } /// /// The number of partitions of a Service Bus namespace. This property is only applicable to Premium SKU namespaces. The default /// value is 1 and possible values are 1, 2 and 4 /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public int? PremiumMessagingPartition { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).PremiumMessagingPartition; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).PremiumMessagingPartition = value ?? default(int); } + public int? PremiumMessagingPartition { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).PremiumMessagingPartition; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).PremiumMessagingPartition = value ?? default(int); } /// ObjectId from the KeyVault [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).PrincipalId; } + public string PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).PrincipalId; } /// List of private endpoint connections. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).PrivateEndpointConnection; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).PrivateEndpointConnection = value ?? null /* arrayOf */; } + public System.Collections.Generic.List PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).PrivateEndpointConnection; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).PrivateEndpointConnection = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceProperties _property; /// Properties of the namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespaceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespaceProperties()); set => this._property = value; } /// Provisioning state of the namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).ProvisioningState; } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).ProvisioningState; } /// /// This determines if traffic is allowed over public network. By default it is enabled. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess? PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).PublicNetworkAccess = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess)""); } + public string PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).PublicNetworkAccess = value ?? null; } /// Enable Infrastructure Encryption (Double Encryption) [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? RequireInfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).EncryptionRequireInfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).EncryptionRequireInfrastructureEncryption = value ?? default(bool); } + public bool? RequireInfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).EncryptionRequireInfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).EncryptionRequireInfrastructureEncryption = value ?? default(bool); } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] @@ -161,14 +160,14 @@ public partial class SbNamespace : /// Endpoint you can use to perform Service Bus operations. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string ServiceBusEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).ServiceBusEndpoint; } + public string ServiceBusEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).ServiceBusEndpoint; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku _sku; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku _sku; /// Properties of SKU [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSku()); set => this._sku = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSku()); set => this._sku = value; } /// /// Messaging units for your service bus premium namespace. Valid capacities are {1, 2, 4, 8, 16} multiples of your properties.premiumMessagingPartitions @@ -176,76 +175,76 @@ public partial class SbNamespace : /// 16. If properties.premiumMessagingPartitions is 4 then possible capacity values are 4, 8, 16, 32 and 64 /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)Sku).Capacity = value ?? default(int); } + public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)Sku).Capacity = value ?? default(int); } /// Name of this SKU. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName? SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)Sku).Name = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName)""); } + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)Sku).Name = value ?? null; } /// The billing tier of this particular SKU. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)Sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier)""); } + public string SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)Sku).Tier = value ?? null; } /// Status of the namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).Status; } + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).Status; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } /// TenantId from the KeyVault [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).TenantId; } + public string TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).TenantId; } /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__trackedResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__trackedResource).Type; } /// The time the namespace was updated. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).UpdatedAt; } + public global::System.DateTime? UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).UpdatedAt; } /// Properties for User Assigned Identities [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities UserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities UserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } /// /// Enabling this property creates a Premium Service Bus Namespace in regions supported availability zones. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? ZoneRedundant { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).ZoneRedundant; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal)Property).ZoneRedundant = value ?? default(bool); } + public bool? ZoneRedundant { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).ZoneRedundant; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)Property).ZoneRedundant = value ?? default(bool); } /// Creates an new instance. public SbNamespace() @@ -268,12 +267,15 @@ public SbNamespace() /// Description of a namespace resource. public partial interface ISbNamespace : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResource + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResource { /// Alternate name for namespace [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Alternate name for namespace", SerializedName = @"alternateName", PossibleTypes = new [] { typeof(string) })] @@ -282,6 +284,9 @@ public partial interface ISbNamespace : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The time the namespace was created", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -290,6 +295,9 @@ public partial interface ISbNamespace : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This property disables SAS authentication for the Service Bus namespace.", SerializedName = @"disableLocalAuth", PossibleTypes = new [] { typeof(bool) })] @@ -298,30 +306,44 @@ public partial interface ISbNamespace : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of managed service identity.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType? IdentityType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None")] + string IdentityType { get; set; } /// Enumerates the possible value of keySource for Encryption [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible value of keySource for Encryption", SerializedName = @"keySource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource? KeySource { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + string KeySource { get; set; } /// Properties of KeyVault [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Properties of KeyVault", SerializedName = @"keyVaultProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] KeyVaultProperty { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties) })] + System.Collections.Generic.List KeyVaultProperty { get; set; } /// Identifier for Azure Insights metrics [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Identifier for Azure Insights metrics", SerializedName = @"metricId", PossibleTypes = new [] { typeof(string) })] @@ -330,10 +352,14 @@ public partial interface ISbNamespace : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The minimum TLS version for the cluster to support, e.g. '1.2'", SerializedName = @"minimumTlsVersion", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion? MinimumTlsVersion { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("1.0", "1.1", "1.2")] + string MinimumTlsVersion { get; set; } /// /// The number of partitions of a Service Bus namespace. This property is only applicable to Premium SKU namespaces. The default /// value is 1 and possible values are 1, 2 and 4 @@ -341,6 +367,9 @@ public partial interface ISbNamespace : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The number of partitions of a Service Bus namespace. This property is only applicable to Premium SKU namespaces. The default value is 1 and possible values are 1, 2 and 4", SerializedName = @"premiumMessagingPartitions", PossibleTypes = new [] { typeof(int) })] @@ -349,6 +378,9 @@ public partial interface ISbNamespace : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"ObjectId from the KeyVault", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] @@ -357,14 +389,20 @@ public partial interface ISbNamespace : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of private endpoint connections.", SerializedName = @"privateEndpointConnections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection) })] + System.Collections.Generic.List PrivateEndpointConnection { get; set; } /// Provisioning state of the namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Provisioning state of the namespace.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] @@ -375,14 +413,21 @@ public partial interface ISbNamespace : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This determines if traffic is allowed over public network. By default it is enabled.", SerializedName = @"publicNetworkAccess", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] + string PublicNetworkAccess { get; set; } /// Enable Infrastructure Encryption (Double Encryption) [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enable Infrastructure Encryption (Double Encryption)", SerializedName = @"requireInfrastructureEncryption", PossibleTypes = new [] { typeof(bool) })] @@ -391,6 +436,9 @@ public partial interface ISbNamespace : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Endpoint you can use to perform Service Bus operations.", SerializedName = @"serviceBusEndpoint", PossibleTypes = new [] { typeof(string) })] @@ -403,6 +451,9 @@ public partial interface ISbNamespace : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Messaging units for your service bus premium namespace. Valid capacities are {1, 2, 4, 8, 16} multiples of your properties.premiumMessagingPartitions setting. For example, If properties.premiumMessagingPartitions is 1 then possible capacity values are 1, 2, 4, 8, and 16. If properties.premiumMessagingPartitions is 4 then possible capacity values are 4, 8, 16, 32 and 64", SerializedName = @"capacity", PossibleTypes = new [] { typeof(int) })] @@ -411,22 +462,33 @@ public partial interface ISbNamespace : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of this SKU.", SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName? SkuName { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string SkuName { get; set; } /// The billing tier of this particular SKU. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The billing tier of this particular SKU.", SerializedName = @"tier", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier? SkuTier { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string SkuTier { get; set; } /// Status of the namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status of the namespace.", SerializedName = @"status", PossibleTypes = new [] { typeof(string) })] @@ -434,55 +496,78 @@ public partial interface ISbNamespace : /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// TenantId from the KeyVault [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"TenantId from the KeyVault", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -491,6 +576,9 @@ public partial interface ISbNamespace : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The time the namespace was updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -499,16 +587,22 @@ public partial interface ISbNamespace : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Properties for User Assigned Identities", SerializedName = @"userAssignedIdentities", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } /// /// Enabling this property creates a Premium Service Bus Namespace in regions supported availability zones. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = false, Description = @"Enabling this property creates a Premium Service Bus Namespace in regions supported availability zones.", SerializedName = @"zoneRedundant", PossibleTypes = new [] { typeof(bool) })] @@ -517,7 +611,7 @@ public partial interface ISbNamespace : } /// Description of a namespace resource. internal partial interface ISbNamespaceInternal : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal { /// Alternate name for namespace string AlternateName { get; set; } @@ -526,19 +620,22 @@ internal partial interface ISbNamespaceInternal : /// This property disables SAS authentication for the Service Bus namespace. bool? DisableLocalAuth { get; set; } /// Properties of BYOK Encryption description - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption Encryption { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption Encryption { get; set; } /// Properties of BYOK Identity description - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity Identity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity Identity { get; set; } /// Type of managed service identity. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType? IdentityType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None")] + string IdentityType { get; set; } /// Enumerates the possible value of keySource for Encryption - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource? KeySource { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + string KeySource { get; set; } /// Properties of KeyVault - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] KeyVaultProperty { get; set; } + System.Collections.Generic.List KeyVaultProperty { get; set; } /// Identifier for Azure Insights metrics string MetricId { get; set; } /// The minimum TLS version for the cluster to support, e.g. '1.2' - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion? MinimumTlsVersion { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("1.0", "1.1", "1.2")] + string MinimumTlsVersion { get; set; } /// /// The number of partitions of a Service Bus namespace. This property is only applicable to Premium SKU namespaces. The default /// value is 1 and possible values are 1, 2 and 4 @@ -547,21 +644,22 @@ internal partial interface ISbNamespaceInternal : /// ObjectId from the KeyVault string PrincipalId { get; set; } /// List of private endpoint connections. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + System.Collections.Generic.List PrivateEndpointConnection { get; set; } /// Properties of the namespace. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceProperties Property { get; set; } /// Provisioning state of the namespace. string ProvisioningState { get; set; } /// /// This determines if traffic is allowed over public network. By default it is enabled. /// - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] + string PublicNetworkAccess { get; set; } /// Enable Infrastructure Encryption (Double Encryption) bool? RequireInfrastructureEncryption { get; set; } /// Endpoint you can use to perform Service Bus operations. string ServiceBusEndpoint { get; set; } /// Properties of SKU - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku Sku { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku Sku { get; set; } /// /// Messaging units for your service bus premium namespace. Valid capacities are {1, 2, 4, 8, 16} multiples of your properties.premiumMessagingPartitions /// setting. For example, If properties.premiumMessagingPartitions is 1 then possible capacity values are 1, 2, 4, 8, and @@ -569,31 +667,35 @@ internal partial interface ISbNamespaceInternal : /// int? SkuCapacity { get; set; } /// Name of this SKU. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName? SkuName { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string SkuName { get; set; } /// The billing tier of this particular SKU. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier? SkuTier { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string SkuTier { get; set; } /// Status of the namespace. string Status { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// TenantId from the KeyVault string TenantId { get; set; } /// The time the namespace was updated. global::System.DateTime? UpdatedAt { get; set; } /// Properties for User Assigned Identities - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } /// /// Enabling this property creates a Premium Service Bus Namespace in regions supported availability zones. /// diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespace.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespace.json.cs similarity index 90% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespace.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespace.json.cs index 2c66f3483d9b..8ca858862fe3 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespace.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespace.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SbNamespace partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbNamespace(json) : null; } @@ -77,11 +77,11 @@ internal SbNamespace(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json. { return; } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.TrackedResource(json); - {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSku.FromJson(__jsonSku) : Sku;} - {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Identity.FromJson(__jsonIdentity) : Identity;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespaceProperties.FromJson(__jsonProperties) : Property;} + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.TrackedResource(json); + {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSku.FromJson(__jsonSku) : _sku;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Identity.FromJson(__jsonIdentity) : _identity;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespaceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -107,7 +107,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso __trackedResource?.ToJson(container, serializationMode); AddIf( null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._sku.ToJson(null,serializationMode) : null, "sku" ,container.Add ); AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceListResult.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceListResult.PowerShell.cs similarity index 75% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceListResult.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceListResult.PowerShell.cs index 0a70d0053144..7f1c1965b296 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceListResult.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SbNamespaceListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SbNamespaceListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SbNamespaceListResult(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal SbNamespaceListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespaceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespaceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal SbNamespaceListResult(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespaceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespaceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceListResult.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceListResult.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceListResult.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceListResult.TypeConverter.cs index f7905bceb306..a8383a086fb2 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceListResult.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceListResult.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceListResult.cs similarity index 75% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceListResult.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceListResult.cs index deb7c3b50beb..90b654fca85b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceListResult.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The response of the List Namespace operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbNamespaceListResult : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResult, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResult, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResultInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class SbNamespaceListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace[] _value; + private System.Collections.Generic.List _value; /// Result of the List Namespace operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public SbNamespaceListResult() @@ -46,6 +46,9 @@ public partial interface ISbNamespaceListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Link to the next set of results. Not empty if Value contains incomplete list of Namespaces.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -54,10 +57,13 @@ public partial interface ISbNamespaceListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result of the List Namespace operation.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace) })] + System.Collections.Generic.List Value { get; set; } } /// The response of the List Namespace operation. @@ -69,7 +75,7 @@ internal partial interface ISbNamespaceListResultInternal /// string NextLink { get; set; } /// Result of the List Namespace operation. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceListResult.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceListResult.json.cs similarity index 89% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceListResult.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceListResult.json.cs index 9c922d846951..1d948bc51970 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceListResult.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SbNamespaceListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbNamespaceListResult(json) : null; } @@ -77,8 +77,8 @@ internal SbNamespaceListResult(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Run { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespace.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespace.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceProperties.PowerShell.cs new file mode 100644 index 000000000000..19cb82c1ab71 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceProperties.PowerShell.cs @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + + /// Properties of the namespace. + [System.ComponentModel.TypeConverter(typeof(SbNamespacePropertiesTypeConverter))] + public partial class SbNamespaceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SbNamespaceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SbNamespaceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SbNamespaceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.EncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("MinimumTlsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).MinimumTlsVersion = (string) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).MinimumTlsVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ServiceBusEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); + } + if (content.Contains("MetricId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).MetricId, global::System.Convert.ToString); + } + if (content.Contains("ZoneRedundant")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).ZoneRedundant = (bool?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).ZoneRedundant, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateEndpointConnection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + } + if (content.Contains("DisableLocalAuth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AlternateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).AlternateName, global::System.Convert.ToString); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).PublicNetworkAccess, global::System.Convert.ToString); + } + if (content.Contains("PremiumMessagingPartition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).PremiumMessagingPartition = (int?) content.GetValueForProperty("PremiumMessagingPartition",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).PremiumMessagingPartition, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EncryptionKeySource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).EncryptionKeySource = (string) content.GetValueForProperty("EncryptionKeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).EncryptionKeySource, global::System.Convert.ToString); + } + if (content.Contains("EncryptionKeyVaultProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).EncryptionKeyVaultProperty = (System.Collections.Generic.List) content.GetValueForProperty("EncryptionKeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).EncryptionKeyVaultProperty, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("EncryptionRequireInfrastructureEncryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).EncryptionRequireInfrastructureEncryption = (bool?) content.GetValueForProperty("EncryptionRequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).EncryptionRequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SbNamespaceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.EncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("MinimumTlsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).MinimumTlsVersion = (string) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).MinimumTlsVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ServiceBusEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); + } + if (content.Contains("MetricId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).MetricId, global::System.Convert.ToString); + } + if (content.Contains("ZoneRedundant")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).ZoneRedundant = (bool?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).ZoneRedundant, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateEndpointConnection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + } + if (content.Contains("DisableLocalAuth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AlternateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).AlternateName, global::System.Convert.ToString); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).PublicNetworkAccess, global::System.Convert.ToString); + } + if (content.Contains("PremiumMessagingPartition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).PremiumMessagingPartition = (int?) content.GetValueForProperty("PremiumMessagingPartition",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).PremiumMessagingPartition, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EncryptionKeySource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).EncryptionKeySource = (string) content.GetValueForProperty("EncryptionKeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).EncryptionKeySource, global::System.Convert.ToString); + } + if (content.Contains("EncryptionKeyVaultProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).EncryptionKeyVaultProperty = (System.Collections.Generic.List) content.GetValueForProperty("EncryptionKeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).EncryptionKeyVaultProperty, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("EncryptionRequireInfrastructureEncryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).EncryptionRequireInfrastructureEncryption = (bool?) content.GetValueForProperty("EncryptionRequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal)this).EncryptionRequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties of the namespace. + [System.ComponentModel.TypeConverter(typeof(SbNamespacePropertiesTypeConverter))] + public partial interface ISbNamespaceProperties + + { + + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceProperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceProperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceProperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceProperties.TypeConverter.cs index c7cec2aaf002..3eda7ab3b1e2 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceProperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceProperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceProperties.cs similarity index 73% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceProperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceProperties.cs index 6522a12f6920..28d0097a4f38 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceProperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Properties of the namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbNamespaceProperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceProperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceProperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal { /// Backing field for property. @@ -36,23 +36,23 @@ public partial class SbNamespaceProperties : public bool? DisableLocalAuth { get => this._disableLocalAuth; set => this._disableLocalAuth = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption _encryption; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption _encryption; /// Properties of BYOK Encryption description [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Encryption()); set => this._encryption = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Encryption()); set => this._encryption = value; } /// Enumerates the possible value of keySource for Encryption [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource? EncryptionKeySource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)Encryption).KeySource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)Encryption).KeySource = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource)""); } + public string EncryptionKeySource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)Encryption).KeySource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)Encryption).KeySource = value ?? null; } /// Properties of KeyVault [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] EncryptionKeyVaultProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)Encryption).KeyVaultProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)Encryption).KeyVaultProperty = value ?? null /* arrayOf */; } + public System.Collections.Generic.List EncryptionKeyVaultProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)Encryption).KeyVaultProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)Encryption).KeyVaultProperty = value ?? null /* arrayOf */; } /// Enable Infrastructure Encryption (Double Encryption) [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? EncryptionRequireInfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)Encryption).RequireInfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)Encryption).RequireInfrastructureEncryption = value ?? default(bool); } + public bool? EncryptionRequireInfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)Encryption).RequireInfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)Encryption).RequireInfrastructureEncryption = value ?? default(bool); } /// Backing field for property. private string _metricId; @@ -62,32 +62,32 @@ public partial class SbNamespaceProperties : public string MetricId { get => this._metricId; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } /// Internal Acessors for Encryption - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal.Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Encryption()); set { {_encryption = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal.Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Encryption()); set { {_encryption = value;} } } /// Internal Acessors for MetricId - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal.MetricId { get => this._metricId; set { {_metricId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal.MetricId { get => this._metricId; set { {_metricId = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for ServiceBusEndpoint - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal.ServiceBusEndpoint { get => this._serviceBusEndpoint; set { {_serviceBusEndpoint = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal.ServiceBusEndpoint { get => this._serviceBusEndpoint; set { {_serviceBusEndpoint = value;} } } /// Internal Acessors for Status - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal.Status { get => this._status; set { {_status = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal.Status { get => this._status; set { {_status = value;} } } /// Internal Acessors for UpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespacePropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespacePropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion? _minimumTlsVersion; + private string _minimumTlsVersion; /// The minimum TLS version for the cluster to support, e.g. '1.2' [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion? MinimumTlsVersion { get => this._minimumTlsVersion; set => this._minimumTlsVersion = value; } + public string MinimumTlsVersion { get => this._minimumTlsVersion; set => this._minimumTlsVersion = value; } /// Backing field for property. private int? _premiumMessagingPartition; @@ -100,11 +100,11 @@ public partial class SbNamespaceProperties : public int? PremiumMessagingPartition { get => this._premiumMessagingPartition; set => this._premiumMessagingPartition = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] _privateEndpointConnection; + private System.Collections.Generic.List _privateEndpointConnection; /// List of private endpoint connections. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get => this._privateEndpointConnection; set => this._privateEndpointConnection = value; } + public System.Collections.Generic.List PrivateEndpointConnection { get => this._privateEndpointConnection; set => this._privateEndpointConnection = value; } /// Backing field for property. private string _provisioningState; @@ -114,13 +114,13 @@ public partial class SbNamespaceProperties : public string ProvisioningState { get => this._provisioningState; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess? _publicNetworkAccess; + private string _publicNetworkAccess; /// /// This determines if traffic is allowed over public network. By default it is enabled. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess? PublicNetworkAccess { get => this._publicNetworkAccess; set => this._publicNetworkAccess = value; } + public string PublicNetworkAccess { get => this._publicNetworkAccess; set => this._publicNetworkAccess = value; } /// Backing field for property. private string _serviceBusEndpoint; @@ -166,6 +166,9 @@ public partial interface ISbNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Alternate name for namespace", SerializedName = @"alternateName", PossibleTypes = new [] { typeof(string) })] @@ -174,6 +177,9 @@ public partial interface ISbNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The time the namespace was created", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -182,6 +188,9 @@ public partial interface ISbNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This property disables SAS authentication for the Service Bus namespace.", SerializedName = @"disableLocalAuth", PossibleTypes = new [] { typeof(bool) })] @@ -190,22 +199,32 @@ public partial interface ISbNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible value of keySource for Encryption", SerializedName = @"keySource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource? EncryptionKeySource { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + string EncryptionKeySource { get; set; } /// Properties of KeyVault [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Properties of KeyVault", SerializedName = @"keyVaultProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] EncryptionKeyVaultProperty { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties) })] + System.Collections.Generic.List EncryptionKeyVaultProperty { get; set; } /// Enable Infrastructure Encryption (Double Encryption) [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enable Infrastructure Encryption (Double Encryption)", SerializedName = @"requireInfrastructureEncryption", PossibleTypes = new [] { typeof(bool) })] @@ -214,6 +233,9 @@ public partial interface ISbNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Identifier for Azure Insights metrics", SerializedName = @"metricId", PossibleTypes = new [] { typeof(string) })] @@ -222,10 +244,14 @@ public partial interface ISbNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The minimum TLS version for the cluster to support, e.g. '1.2'", SerializedName = @"minimumTlsVersion", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion? MinimumTlsVersion { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("1.0", "1.1", "1.2")] + string MinimumTlsVersion { get; set; } /// /// The number of partitions of a Service Bus namespace. This property is only applicable to Premium SKU namespaces. The default /// value is 1 and possible values are 1, 2 and 4 @@ -233,6 +259,9 @@ public partial interface ISbNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The number of partitions of a Service Bus namespace. This property is only applicable to Premium SKU namespaces. The default value is 1 and possible values are 1, 2 and 4", SerializedName = @"premiumMessagingPartitions", PossibleTypes = new [] { typeof(int) })] @@ -241,14 +270,20 @@ public partial interface ISbNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of private endpoint connections.", SerializedName = @"privateEndpointConnections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection) })] + System.Collections.Generic.List PrivateEndpointConnection { get; set; } /// Provisioning state of the namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Provisioning state of the namespace.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] @@ -259,14 +294,21 @@ public partial interface ISbNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This determines if traffic is allowed over public network. By default it is enabled.", SerializedName = @"publicNetworkAccess", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] + string PublicNetworkAccess { get; set; } /// Endpoint you can use to perform Service Bus operations. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Endpoint you can use to perform Service Bus operations.", SerializedName = @"serviceBusEndpoint", PossibleTypes = new [] { typeof(string) })] @@ -275,6 +317,9 @@ public partial interface ISbNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status of the namespace.", SerializedName = @"status", PossibleTypes = new [] { typeof(string) })] @@ -283,6 +328,9 @@ public partial interface ISbNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The time the namespace was updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -293,6 +341,9 @@ public partial interface ISbNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = false, Description = @"Enabling this property creates a Premium Service Bus Namespace in regions supported availability zones.", SerializedName = @"zoneRedundant", PossibleTypes = new [] { typeof(bool) })] @@ -310,30 +361,33 @@ internal partial interface ISbNamespacePropertiesInternal /// This property disables SAS authentication for the Service Bus namespace. bool? DisableLocalAuth { get; set; } /// Properties of BYOK Encryption description - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption Encryption { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption Encryption { get; set; } /// Enumerates the possible value of keySource for Encryption - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource? EncryptionKeySource { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + string EncryptionKeySource { get; set; } /// Properties of KeyVault - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] EncryptionKeyVaultProperty { get; set; } + System.Collections.Generic.List EncryptionKeyVaultProperty { get; set; } /// Enable Infrastructure Encryption (Double Encryption) bool? EncryptionRequireInfrastructureEncryption { get; set; } /// Identifier for Azure Insights metrics string MetricId { get; set; } /// The minimum TLS version for the cluster to support, e.g. '1.2' - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion? MinimumTlsVersion { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("1.0", "1.1", "1.2")] + string MinimumTlsVersion { get; set; } /// /// The number of partitions of a Service Bus namespace. This property is only applicable to Premium SKU namespaces. The default /// value is 1 and possible values are 1, 2 and 4 /// int? PremiumMessagingPartition { get; set; } /// List of private endpoint connections. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + System.Collections.Generic.List PrivateEndpointConnection { get; set; } /// Provisioning state of the namespace. string ProvisioningState { get; set; } /// /// This determines if traffic is allowed over public network. By default it is enabled. /// - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] + string PublicNetworkAccess { get; set; } /// Endpoint you can use to perform Service Bus operations. string ServiceBusEndpoint { get; set; } /// Status of the namespace. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceProperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceProperties.json.cs similarity index 85% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceProperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceProperties.json.cs index b0c5a8979201..65f70aaff66e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceProperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SbNamespaceProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbNamespaceProperties(json) : null; } @@ -77,20 +77,20 @@ internal SbNamespaceProperties(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Run { return; } - {_encryption = If( json?.PropertyT("encryption"), out var __jsonEncryption) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Encryption.FromJson(__jsonEncryption) : Encryption;} - {_minimumTlsVersion = If( json?.PropertyT("minimumTlsVersion"), out var __jsonMinimumTlsVersion) ? (string)__jsonMinimumTlsVersion : (string)MinimumTlsVersion;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} - {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtValue) ? __jsonUpdatedAtValue : UpdatedAt : UpdatedAt;} - {_serviceBusEndpoint = If( json?.PropertyT("serviceBusEndpoint"), out var __jsonServiceBusEndpoint) ? (string)__jsonServiceBusEndpoint : (string)ServiceBusEndpoint;} - {_metricId = If( json?.PropertyT("metricId"), out var __jsonMetricId) ? (string)__jsonMetricId : (string)MetricId;} - {_zoneRedundant = If( json?.PropertyT("zoneRedundant"), out var __jsonZoneRedundant) ? (bool?)__jsonZoneRedundant : ZoneRedundant;} - {_privateEndpointConnection = If( json?.PropertyT("privateEndpointConnections"), out var __jsonPrivateEndpointConnections) ? If( __jsonPrivateEndpointConnections as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnection.FromJson(__u) )) ))() : null : PrivateEndpointConnection;} - {_disableLocalAuth = If( json?.PropertyT("disableLocalAuth"), out var __jsonDisableLocalAuth) ? (bool?)__jsonDisableLocalAuth : DisableLocalAuth;} - {_alternateName = If( json?.PropertyT("alternateName"), out var __jsonAlternateName) ? (string)__jsonAlternateName : (string)AlternateName;} - {_publicNetworkAccess = If( json?.PropertyT("publicNetworkAccess"), out var __jsonPublicNetworkAccess) ? (string)__jsonPublicNetworkAccess : (string)PublicNetworkAccess;} - {_premiumMessagingPartition = If( json?.PropertyT("premiumMessagingPartitions"), out var __jsonPremiumMessagingPartitions) ? (int?)__jsonPremiumMessagingPartitions : PremiumMessagingPartition;} + {_encryption = If( json?.PropertyT("encryption"), out var __jsonEncryption) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Encryption.FromJson(__jsonEncryption) : _encryption;} + {_minimumTlsVersion = If( json?.PropertyT("minimumTlsVersion"), out var __jsonMinimumTlsVersion) ? (string)__jsonMinimumTlsVersion : (string)_minimumTlsVersion;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : _createdAt : _createdAt;} + {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtValue) ? __jsonUpdatedAtValue : _updatedAt : _updatedAt;} + {_serviceBusEndpoint = If( json?.PropertyT("serviceBusEndpoint"), out var __jsonServiceBusEndpoint) ? (string)__jsonServiceBusEndpoint : (string)_serviceBusEndpoint;} + {_metricId = If( json?.PropertyT("metricId"), out var __jsonMetricId) ? (string)__jsonMetricId : (string)_metricId;} + {_zoneRedundant = If( json?.PropertyT("zoneRedundant"), out var __jsonZoneRedundant) ? (bool?)__jsonZoneRedundant : _zoneRedundant;} + {_privateEndpointConnection = If( json?.PropertyT("privateEndpointConnections"), out var __jsonPrivateEndpointConnections) ? If( __jsonPrivateEndpointConnections as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnection.FromJson(__u) )) ))() : null : _privateEndpointConnection;} + {_disableLocalAuth = If( json?.PropertyT("disableLocalAuth"), out var __jsonDisableLocalAuth) ? (bool?)__jsonDisableLocalAuth : _disableLocalAuth;} + {_alternateName = If( json?.PropertyT("alternateName"), out var __jsonAlternateName) ? (string)__jsonAlternateName : (string)_alternateName;} + {_publicNetworkAccess = If( json?.PropertyT("publicNetworkAccess"), out var __jsonPublicNetworkAccess) ? (string)__jsonPublicNetworkAccess : (string)_publicNetworkAccess;} + {_premiumMessagingPartition = If( json?.PropertyT("premiumMessagingPartitions"), out var __jsonPremiumMessagingPartitions) ? (int?)__jsonPremiumMessagingPartitions : _premiumMessagingPartition;} AfterFromJson(json); } @@ -115,31 +115,34 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso } AddIf( null != this._encryption ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._encryption.ToJson(null,serializationMode) : null, "encryption" ,container.Add ); AddIf( null != (((object)this._minimumTlsVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._minimumTlsVersion.ToString()) : null, "minimumTlsVersion" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._updatedAt ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._updatedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "updatedAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._serviceBusEndpoint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._serviceBusEndpoint.ToString()) : null, "serviceBusEndpoint" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._metricId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._metricId.ToString()) : null, "metricId" ,container.Add ); } - AddIf( null != this._zoneRedundant ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonBoolean((bool)this._zoneRedundant) : null, "zoneRedundant" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != this._zoneRedundant ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonBoolean((bool)this._zoneRedundant) : null, "zoneRedundant" ,container.Add ); + } if (null != this._privateEndpointConnection) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.XNodeArray(); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateParameters.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..92f20f35265e --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateParameters.PowerShell.cs @@ -0,0 +1,380 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + + /// Description of a namespace resource. + [System.ComponentModel.TypeConverter(typeof(SbNamespaceUpdateParametersTypeConverter))] + public partial class SbNamespaceUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SbNamespaceUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SbNamespaceUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SbNamespaceUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSkuTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespaceUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ResourceNamespacePatchTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).SkuTier = (string) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).SkuTier, global::System.Convert.ToString); + } + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.EncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ServiceBusEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); + } + if (content.Contains("MetricId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).MetricId, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointConnection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + } + if (content.Contains("DisableLocalAuth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AlternateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).AlternateName, global::System.Convert.ToString); + } + if (content.Contains("EncryptionKeySource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).EncryptionKeySource = (string) content.GetValueForProperty("EncryptionKeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).EncryptionKeySource, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("EncryptionKeyVaultProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).EncryptionKeyVaultProperty = (System.Collections.Generic.List) content.GetValueForProperty("EncryptionKeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).EncryptionKeyVaultProperty, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("EncryptionRequireInfrastructureEncryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).EncryptionRequireInfrastructureEncryption = (bool?) content.GetValueForProperty("EncryptionRequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).EncryptionRequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SbNamespaceUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSkuTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespaceUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ResourceNamespacePatchTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).SkuTier = (string) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).SkuTier, global::System.Convert.ToString); + } + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.EncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ServiceBusEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); + } + if (content.Contains("MetricId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).MetricId, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointConnection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + } + if (content.Contains("DisableLocalAuth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AlternateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).AlternateName, global::System.Convert.ToString); + } + if (content.Contains("EncryptionKeySource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).EncryptionKeySource = (string) content.GetValueForProperty("EncryptionKeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).EncryptionKeySource, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("EncryptionKeyVaultProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).EncryptionKeyVaultProperty = (System.Collections.Generic.List) content.GetValueForProperty("EncryptionKeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).EncryptionKeyVaultProperty, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("EncryptionRequireInfrastructureEncryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).EncryptionRequireInfrastructureEncryption = (bool?) content.GetValueForProperty("EncryptionRequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal)this).EncryptionRequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Description of a namespace resource. + [System.ComponentModel.TypeConverter(typeof(SbNamespaceUpdateParametersTypeConverter))] + public partial interface ISbNamespaceUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateParameters.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateParameters.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateParameters.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateParameters.TypeConverter.cs index 35b6bd3a5593..89681073e5a7 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateParameters.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateParameters.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateParameters.cs similarity index 57% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateParameters.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateParameters.cs index c501b3cc50cd..4136acc9b135 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateParameters.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateParameters.cs @@ -3,156 +3,156 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Description of a namespace resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbNamespaceUpdateParameters : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParameters, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatch __resourceNamespacePatch = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ResourceNamespacePatch(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatch __resourceNamespacePatch = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ResourceNamespacePatch(); /// Alternate name for namespace [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string AlternateName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).AlternateName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).AlternateName = value ?? null; } + public string AlternateName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).AlternateName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).AlternateName = value ?? null; } /// The time the namespace was created [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).CreatedAt; } + public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).CreatedAt; } /// This property disables SAS authentication for the Service Bus namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? DisableLocalAuth { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).DisableLocalAuth; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).DisableLocalAuth = value ?? default(bool); } + public bool? DisableLocalAuth { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).DisableLocalAuth; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).DisableLocalAuth = value ?? default(bool); } /// Enumerates the possible value of keySource for Encryption [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource? EncryptionKeySource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).EncryptionKeySource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).EncryptionKeySource = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource)""); } + public string EncryptionKeySource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).EncryptionKeySource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).EncryptionKeySource = value ?? null; } /// Properties of KeyVault [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] EncryptionKeyVaultProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).EncryptionKeyVaultProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).EncryptionKeyVaultProperty = value ?? null /* arrayOf */; } + public System.Collections.Generic.List EncryptionKeyVaultProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).EncryptionKeyVaultProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).EncryptionKeyVaultProperty = value ?? null /* arrayOf */; } /// Enable Infrastructure Encryption (Double Encryption) [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? EncryptionRequireInfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).EncryptionRequireInfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).EncryptionRequireInfrastructureEncryption = value ?? default(bool); } + public bool? EncryptionRequireInfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).EncryptionRequireInfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).EncryptionRequireInfrastructureEncryption = value ?? default(bool); } /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resourceNamespacePatch).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resourceNamespacePatch).Id; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity _identity; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity _identity; /// Properties of BYOK Identity description [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Identity()); set => this._identity = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Identity()); set => this._identity = value; } /// ObjectId from the KeyVault [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).PrincipalId; } + public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).PrincipalId; } /// TenantId from the KeyVault [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).TenantId; } + public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).TenantId; } /// Type of managed service identity. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType)""); } + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).Type = value ?? null; } /// Properties for User Assigned Identities [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } /// Resource location [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)__resourceNamespacePatch).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)__resourceNamespacePatch).Location = value ?? null; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)__resourceNamespacePatch).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)__resourceNamespacePatch).Location = value ?? null; } /// Identifier for Azure Insights metrics [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string MetricId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).MetricId; } + public string MetricId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).MetricId; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resourceNamespacePatch).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resourceNamespacePatch).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resourceNamespacePatch).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resourceNamespacePatch).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resourceNamespacePatch).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resourceNamespacePatch).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resourceNamespacePatch).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resourceNamespacePatch).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resourceNamespacePatch).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resourceNamespacePatch).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resourceNamespacePatch).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resourceNamespacePatch).Type = value; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).CreatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).CreatedAt = value; } /// Internal Acessors for Encryption - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal.Encryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).Encryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).Encryption = value; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal.Encryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).Encryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).Encryption = value; } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Identity()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Identity()); set { {_identity = value;} } } /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).PrincipalId = value; } /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityInternal)Identity).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityInternal)Identity).TenantId = value; } /// Internal Acessors for MetricId - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal.MetricId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).MetricId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).MetricId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal.MetricId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).MetricId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).MetricId = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespaceUpdateProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespaceUpdateProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for ServiceBusEndpoint - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal.ServiceBusEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).ServiceBusEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).ServiceBusEndpoint = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal.ServiceBusEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).ServiceBusEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).ServiceBusEndpoint = value; } /// Internal Acessors for Sku - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSku()); set { {_sku = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSku()); set { {_sku = value;} } } /// Internal Acessors for Status - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).Status = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).Status = value; } /// Internal Acessors for UpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParametersInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).UpdatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParametersInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).UpdatedAt = value; } /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resourceNamespacePatch).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resourceNamespacePatch).Name; } /// List of private endpoint connections. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).PrivateEndpointConnection; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).PrivateEndpointConnection = value ?? null /* arrayOf */; } + public System.Collections.Generic.List PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).PrivateEndpointConnection; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).PrivateEndpointConnection = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateProperties _property; /// Properties of the namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespaceUpdateProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespaceUpdateProperties()); set => this._property = value; } /// Provisioning state of the namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).ProvisioningState; } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).ProvisioningState; } /// Endpoint you can use to perform Service Bus operations. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string ServiceBusEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).ServiceBusEndpoint; } + public string ServiceBusEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).ServiceBusEndpoint; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku _sku; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku _sku; /// Properties of SKU [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSku()); set => this._sku = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSku()); set => this._sku = value; } /// /// Messaging units for your service bus premium namespace. Valid capacities are {1, 2, 4, 8, 16} multiples of your properties.premiumMessagingPartitions @@ -160,31 +160,31 @@ public partial class SbNamespaceUpdateParameters : /// 16. If properties.premiumMessagingPartitions is 4 then possible capacity values are 4, 8, 16, 32 and 64 /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)Sku).Capacity = value ?? default(int); } + public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)Sku).Capacity = value ?? default(int); } /// Name of this SKU. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName? SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)Sku).Name = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName)""); } + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)Sku).Name = value ?? null; } /// The billing tier of this particular SKU. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)Sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier)""); } + public string SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)Sku).Tier = value ?? null; } /// Status of the namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).Status; } + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).Status; } /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)__resourceNamespacePatch).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal)__resourceNamespacePatch).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)__resourceNamespacePatch).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal)__resourceNamespacePatch).Tag = value ?? null /* model class */; } /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resourceNamespacePatch).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resourceNamespacePatch).Type; } /// The time the namespace was updated. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal)Property).UpdatedAt; } + public global::System.DateTime? UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)Property).UpdatedAt; } /// Creates an new instance. public SbNamespaceUpdateParameters() @@ -207,12 +207,15 @@ public SbNamespaceUpdateParameters() /// Description of a namespace resource. public partial interface ISbNamespaceUpdateParameters : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatch + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatch { /// Alternate name for namespace [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Alternate name for namespace", SerializedName = @"alternateName", PossibleTypes = new [] { typeof(string) })] @@ -221,6 +224,9 @@ public partial interface ISbNamespaceUpdateParameters : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The time the namespace was created", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -229,6 +235,9 @@ public partial interface ISbNamespaceUpdateParameters : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This property disables SAS authentication for the Service Bus namespace.", SerializedName = @"disableLocalAuth", PossibleTypes = new [] { typeof(bool) })] @@ -237,22 +246,32 @@ public partial interface ISbNamespaceUpdateParameters : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible value of keySource for Encryption", SerializedName = @"keySource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource? EncryptionKeySource { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + string EncryptionKeySource { get; set; } /// Properties of KeyVault [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Properties of KeyVault", SerializedName = @"keyVaultProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] EncryptionKeyVaultProperty { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties) })] + System.Collections.Generic.List EncryptionKeyVaultProperty { get; set; } /// Enable Infrastructure Encryption (Double Encryption) [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enable Infrastructure Encryption (Double Encryption)", SerializedName = @"requireInfrastructureEncryption", PossibleTypes = new [] { typeof(bool) })] @@ -261,6 +280,9 @@ public partial interface ISbNamespaceUpdateParameters : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"ObjectId from the KeyVault", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] @@ -269,6 +291,9 @@ public partial interface ISbNamespaceUpdateParameters : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"TenantId from the KeyVault", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -277,22 +302,32 @@ public partial interface ISbNamespaceUpdateParameters : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of managed service identity.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType? IdentityType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None")] + string IdentityType { get; set; } /// Properties for User Assigned Identities [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Properties for User Assigned Identities", SerializedName = @"userAssignedIdentities", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } /// Identifier for Azure Insights metrics [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Identifier for Azure Insights metrics", SerializedName = @"metricId", PossibleTypes = new [] { typeof(string) })] @@ -301,14 +336,20 @@ public partial interface ISbNamespaceUpdateParameters : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of private endpoint connections.", SerializedName = @"privateEndpointConnections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection) })] + System.Collections.Generic.List PrivateEndpointConnection { get; set; } /// Provisioning state of the namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Provisioning state of the namespace.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] @@ -317,6 +358,9 @@ public partial interface ISbNamespaceUpdateParameters : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Endpoint you can use to perform Service Bus operations.", SerializedName = @"serviceBusEndpoint", PossibleTypes = new [] { typeof(string) })] @@ -329,6 +373,9 @@ public partial interface ISbNamespaceUpdateParameters : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Messaging units for your service bus premium namespace. Valid capacities are {1, 2, 4, 8, 16} multiples of your properties.premiumMessagingPartitions setting. For example, If properties.premiumMessagingPartitions is 1 then possible capacity values are 1, 2, 4, 8, and 16. If properties.premiumMessagingPartitions is 4 then possible capacity values are 4, 8, 16, 32 and 64", SerializedName = @"capacity", PossibleTypes = new [] { typeof(int) })] @@ -337,22 +384,33 @@ public partial interface ISbNamespaceUpdateParameters : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of this SKU.", SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName? SkuName { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string SkuName { get; set; } /// The billing tier of this particular SKU. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The billing tier of this particular SKU.", SerializedName = @"tier", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier? SkuTier { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string SkuTier { get; set; } /// Status of the namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status of the namespace.", SerializedName = @"status", PossibleTypes = new [] { typeof(string) })] @@ -361,6 +419,9 @@ public partial interface ISbNamespaceUpdateParameters : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The time the namespace was updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -369,7 +430,7 @@ public partial interface ISbNamespaceUpdateParameters : } /// Description of a namespace resource. internal partial interface ISbNamespaceUpdateParametersInternal : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IResourceNamespacePatchInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceNamespacePatchInternal { /// Alternate name for namespace string AlternateName { get; set; } @@ -378,35 +439,37 @@ internal partial interface ISbNamespaceUpdateParametersInternal : /// This property disables SAS authentication for the Service Bus namespace. bool? DisableLocalAuth { get; set; } /// Properties of BYOK Encryption description - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption Encryption { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption Encryption { get; set; } /// Enumerates the possible value of keySource for Encryption - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource? EncryptionKeySource { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + string EncryptionKeySource { get; set; } /// Properties of KeyVault - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] EncryptionKeyVaultProperty { get; set; } + System.Collections.Generic.List EncryptionKeyVaultProperty { get; set; } /// Enable Infrastructure Encryption (Double Encryption) bool? EncryptionRequireInfrastructureEncryption { get; set; } /// Properties of BYOK Identity description - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentity Identity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentity Identity { get; set; } /// ObjectId from the KeyVault string IdentityPrincipalId { get; set; } /// TenantId from the KeyVault string IdentityTenantId { get; set; } /// Type of managed service identity. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType? IdentityType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None")] + string IdentityType { get; set; } /// Properties for User Assigned Identities - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } /// Identifier for Azure Insights metrics string MetricId { get; set; } /// List of private endpoint connections. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + System.Collections.Generic.List PrivateEndpointConnection { get; set; } /// Properties of the namespace. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateProperties Property { get; set; } /// Provisioning state of the namespace. string ProvisioningState { get; set; } /// Endpoint you can use to perform Service Bus operations. string ServiceBusEndpoint { get; set; } /// Properties of SKU - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku Sku { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku Sku { get; set; } /// /// Messaging units for your service bus premium namespace. Valid capacities are {1, 2, 4, 8, 16} multiples of your properties.premiumMessagingPartitions /// setting. For example, If properties.premiumMessagingPartitions is 1 then possible capacity values are 1, 2, 4, 8, and @@ -414,9 +477,11 @@ internal partial interface ISbNamespaceUpdateParametersInternal : /// int? SkuCapacity { get; set; } /// Name of this SKU. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName? SkuName { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string SkuName { get; set; } /// The billing tier of this particular SKU. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier? SkuTier { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string SkuTier { get; set; } /// Status of the namespace. string Status { get; set; } /// The time the namespace was updated. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateParameters.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateParameters.json.cs similarity index 91% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateParameters.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateParameters.json.cs index 5b5d1a52e80c..fd1b3dd29842 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateParameters.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SbNamespaceUpdateParameters partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbNamespaceUpdateParameters(json) : null; } @@ -77,10 +77,10 @@ internal SbNamespaceUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.ServiceB { return; } - __resourceNamespacePatch = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ResourceNamespacePatch(json); - {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSku.FromJson(__jsonSku) : Sku;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespaceUpdateProperties.FromJson(__jsonProperties) : Property;} - {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Identity.FromJson(__jsonIdentity) : Identity;} + __resourceNamespacePatch = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ResourceNamespacePatch(json); + {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSku.FromJson(__jsonSku) : _sku;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespaceUpdateProperties.FromJson(__jsonProperties) : _property;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Identity.FromJson(__jsonIdentity) : _identity;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..d399ef42d2c0 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateProperties.PowerShell.cs @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + + /// Properties of the namespace. + [System.ComponentModel.TypeConverter(typeof(SbNamespaceUpdatePropertiesTypeConverter))] + public partial class SbNamespaceUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SbNamespaceUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SbNamespaceUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SbNamespaceUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.EncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ServiceBusEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); + } + if (content.Contains("MetricId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).MetricId, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointConnection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + } + if (content.Contains("DisableLocalAuth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AlternateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).AlternateName, global::System.Convert.ToString); + } + if (content.Contains("EncryptionKeySource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).EncryptionKeySource = (string) content.GetValueForProperty("EncryptionKeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).EncryptionKeySource, global::System.Convert.ToString); + } + if (content.Contains("EncryptionKeyVaultProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).EncryptionKeyVaultProperty = (System.Collections.Generic.List) content.GetValueForProperty("EncryptionKeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).EncryptionKeyVaultProperty, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("EncryptionRequireInfrastructureEncryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).EncryptionRequireInfrastructureEncryption = (bool?) content.GetValueForProperty("EncryptionRequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).EncryptionRequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SbNamespaceUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.EncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ServiceBusEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); + } + if (content.Contains("MetricId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).MetricId, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointConnection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + } + if (content.Contains("DisableLocalAuth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AlternateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).AlternateName, global::System.Convert.ToString); + } + if (content.Contains("EncryptionKeySource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).EncryptionKeySource = (string) content.GetValueForProperty("EncryptionKeySource",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).EncryptionKeySource, global::System.Convert.ToString); + } + if (content.Contains("EncryptionKeyVaultProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).EncryptionKeyVaultProperty = (System.Collections.Generic.List) content.GetValueForProperty("EncryptionKeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).EncryptionKeyVaultProperty, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("EncryptionRequireInfrastructureEncryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).EncryptionRequireInfrastructureEncryption = (bool?) content.GetValueForProperty("EncryptionRequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal)this).EncryptionRequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties of the namespace. + [System.ComponentModel.TypeConverter(typeof(SbNamespaceUpdatePropertiesTypeConverter))] + public partial interface ISbNamespaceUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateProperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateProperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateProperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateProperties.TypeConverter.cs index ce2271bd2d09..36c42c7baa15 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateProperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateProperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateProperties.cs similarity index 72% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateProperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateProperties.cs index 03f850730c5f..cf5b8042baeb 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateProperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Properties of the namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbNamespaceUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal { /// Backing field for property. @@ -36,23 +36,23 @@ public partial class SbNamespaceUpdateProperties : public bool? DisableLocalAuth { get => this._disableLocalAuth; set => this._disableLocalAuth = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption _encryption; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption _encryption; /// Properties of BYOK Encryption description [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Encryption()); set => this._encryption = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Encryption()); set => this._encryption = value; } /// Enumerates the possible value of keySource for Encryption [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource? EncryptionKeySource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)Encryption).KeySource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)Encryption).KeySource = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource)""); } + public string EncryptionKeySource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)Encryption).KeySource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)Encryption).KeySource = value ?? null; } /// Properties of KeyVault [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] EncryptionKeyVaultProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)Encryption).KeyVaultProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)Encryption).KeyVaultProperty = value ?? null /* arrayOf */; } + public System.Collections.Generic.List EncryptionKeyVaultProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)Encryption).KeyVaultProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)Encryption).KeyVaultProperty = value ?? null /* arrayOf */; } /// Enable Infrastructure Encryption (Double Encryption) [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? EncryptionRequireInfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)Encryption).RequireInfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryptionInternal)Encryption).RequireInfrastructureEncryption = value ?? default(bool); } + public bool? EncryptionRequireInfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)Encryption).RequireInfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryptionInternal)Encryption).RequireInfrastructureEncryption = value ?? default(bool); } /// Backing field for property. private string _metricId; @@ -62,32 +62,32 @@ public partial class SbNamespaceUpdateProperties : public string MetricId { get => this._metricId; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } /// Internal Acessors for Encryption - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal.Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Encryption()); set { {_encryption = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal.Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Encryption()); set { {_encryption = value;} } } /// Internal Acessors for MetricId - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal.MetricId { get => this._metricId; set { {_metricId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal.MetricId { get => this._metricId; set { {_metricId = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for ServiceBusEndpoint - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal.ServiceBusEndpoint { get => this._serviceBusEndpoint; set { {_serviceBusEndpoint = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal.ServiceBusEndpoint { get => this._serviceBusEndpoint; set { {_serviceBusEndpoint = value;} } } /// Internal Acessors for Status - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal.Status { get => this._status; set { {_status = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal.Status { get => this._status; set { {_status = value;} } } /// Internal Acessors for UpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdatePropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdatePropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] _privateEndpointConnection; + private System.Collections.Generic.List _privateEndpointConnection; /// List of private endpoint connections. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get => this._privateEndpointConnection; set => this._privateEndpointConnection = value; } + public System.Collections.Generic.List PrivateEndpointConnection { get => this._privateEndpointConnection; set => this._privateEndpointConnection = value; } /// Backing field for property. private string _provisioningState; @@ -131,6 +131,9 @@ public partial interface ISbNamespaceUpdateProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Alternate name for namespace", SerializedName = @"alternateName", PossibleTypes = new [] { typeof(string) })] @@ -139,6 +142,9 @@ public partial interface ISbNamespaceUpdateProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The time the namespace was created", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -147,6 +153,9 @@ public partial interface ISbNamespaceUpdateProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This property disables SAS authentication for the Service Bus namespace.", SerializedName = @"disableLocalAuth", PossibleTypes = new [] { typeof(bool) })] @@ -155,22 +164,32 @@ public partial interface ISbNamespaceUpdateProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible value of keySource for Encryption", SerializedName = @"keySource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource? EncryptionKeySource { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + string EncryptionKeySource { get; set; } /// Properties of KeyVault [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Properties of KeyVault", SerializedName = @"keyVaultProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] EncryptionKeyVaultProperty { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties) })] + System.Collections.Generic.List EncryptionKeyVaultProperty { get; set; } /// Enable Infrastructure Encryption (Double Encryption) [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enable Infrastructure Encryption (Double Encryption)", SerializedName = @"requireInfrastructureEncryption", PossibleTypes = new [] { typeof(bool) })] @@ -179,6 +198,9 @@ public partial interface ISbNamespaceUpdateProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Identifier for Azure Insights metrics", SerializedName = @"metricId", PossibleTypes = new [] { typeof(string) })] @@ -187,14 +209,20 @@ public partial interface ISbNamespaceUpdateProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of private endpoint connections.", SerializedName = @"privateEndpointConnections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection) })] + System.Collections.Generic.List PrivateEndpointConnection { get; set; } /// Provisioning state of the namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Provisioning state of the namespace.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] @@ -203,6 +231,9 @@ public partial interface ISbNamespaceUpdateProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Endpoint you can use to perform Service Bus operations.", SerializedName = @"serviceBusEndpoint", PossibleTypes = new [] { typeof(string) })] @@ -211,6 +242,9 @@ public partial interface ISbNamespaceUpdateProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status of the namespace.", SerializedName = @"status", PossibleTypes = new [] { typeof(string) })] @@ -219,6 +253,9 @@ public partial interface ISbNamespaceUpdateProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The time the namespace was updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -236,17 +273,18 @@ internal partial interface ISbNamespaceUpdatePropertiesInternal /// This property disables SAS authentication for the Service Bus namespace. bool? DisableLocalAuth { get; set; } /// Properties of BYOK Encryption description - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IEncryption Encryption { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IEncryption Encryption { get; set; } /// Enumerates the possible value of keySource for Encryption - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource? EncryptionKeySource { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + string EncryptionKeySource { get; set; } /// Properties of KeyVault - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] EncryptionKeyVaultProperty { get; set; } + System.Collections.Generic.List EncryptionKeyVaultProperty { get; set; } /// Enable Infrastructure Encryption (Double Encryption) bool? EncryptionRequireInfrastructureEncryption { get; set; } /// Identifier for Azure Insights metrics string MetricId { get; set; } /// List of private endpoint connections. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + System.Collections.Generic.List PrivateEndpointConnection { get; set; } /// Provisioning state of the namespace. string ProvisioningState { get; set; } /// Endpoint you can use to perform Service Bus operations. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateProperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateProperties.json.cs similarity index 87% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateProperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateProperties.json.cs index 39eb38c5db86..66e0a98a73a5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbNamespaceUpdateProperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbNamespaceUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SbNamespaceUpdateProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbNamespaceUpdateProperties(json) : null; } @@ -77,16 +77,16 @@ internal SbNamespaceUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.ServiceB { return; } - {_encryption = If( json?.PropertyT("encryption"), out var __jsonEncryption) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Encryption.FromJson(__jsonEncryption) : Encryption;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} - {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtValue) ? __jsonUpdatedAtValue : UpdatedAt : UpdatedAt;} - {_serviceBusEndpoint = If( json?.PropertyT("serviceBusEndpoint"), out var __jsonServiceBusEndpoint) ? (string)__jsonServiceBusEndpoint : (string)ServiceBusEndpoint;} - {_metricId = If( json?.PropertyT("metricId"), out var __jsonMetricId) ? (string)__jsonMetricId : (string)MetricId;} - {_privateEndpointConnection = If( json?.PropertyT("privateEndpointConnections"), out var __jsonPrivateEndpointConnections) ? If( __jsonPrivateEndpointConnections as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnection.FromJson(__u) )) ))() : null : PrivateEndpointConnection;} - {_disableLocalAuth = If( json?.PropertyT("disableLocalAuth"), out var __jsonDisableLocalAuth) ? (bool?)__jsonDisableLocalAuth : DisableLocalAuth;} - {_alternateName = If( json?.PropertyT("alternateName"), out var __jsonAlternateName) ? (string)__jsonAlternateName : (string)AlternateName;} + {_encryption = If( json?.PropertyT("encryption"), out var __jsonEncryption) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Encryption.FromJson(__jsonEncryption) : _encryption;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : _createdAt : _createdAt;} + {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtValue) ? __jsonUpdatedAtValue : _updatedAt : _updatedAt;} + {_serviceBusEndpoint = If( json?.PropertyT("serviceBusEndpoint"), out var __jsonServiceBusEndpoint) ? (string)__jsonServiceBusEndpoint : (string)_serviceBusEndpoint;} + {_metricId = If( json?.PropertyT("metricId"), out var __jsonMetricId) ? (string)__jsonMetricId : (string)_metricId;} + {_privateEndpointConnection = If( json?.PropertyT("privateEndpointConnections"), out var __jsonPrivateEndpointConnections) ? If( __jsonPrivateEndpointConnections as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnection.FromJson(__u) )) ))() : null : _privateEndpointConnection;} + {_disableLocalAuth = If( json?.PropertyT("disableLocalAuth"), out var __jsonDisableLocalAuth) ? (bool?)__jsonDisableLocalAuth : _disableLocalAuth;} + {_alternateName = If( json?.PropertyT("alternateName"), out var __jsonAlternateName) ? (string)__jsonAlternateName : (string)_alternateName;} AfterFromJson(json); } @@ -110,27 +110,27 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso return container; } AddIf( null != this._encryption ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._encryption.ToJson(null,serializationMode) : null, "encryption" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._updatedAt ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._updatedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "updatedAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._serviceBusEndpoint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._serviceBusEndpoint.ToString()) : null, "serviceBusEndpoint" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._metricId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._metricId.ToString()) : null, "metricId" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueue.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueue.PowerShell.cs new file mode 100644 index 000000000000..725a1840f7b6 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueue.PowerShell.cs @@ -0,0 +1,468 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + + /// Description of queue Resource. + [System.ComponentModel.TypeConverter(typeof(SbQueueTypeConverter))] + public partial class SbQueue + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SbQueue(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SbQueue(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SbQueue(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbQueuePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CountDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("AccessedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SizeInByte")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SizeInByte = (long?) content.GetValueForProperty("SizeInByte",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SizeInByte, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).MessageCount = (long?) content.GetValueForProperty("MessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).MessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("LockDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).LockDuration = (global::System.TimeSpan?) content.GetValueForProperty("LockDuration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).LockDuration, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("MaxSizeInMegabytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).MaxSizeInMegabytes = (int?) content.GetValueForProperty("MaxSizeInMegabytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).MaxSizeInMegabytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMessageSizeInKilobytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).MaxMessageSizeInKilobytes = (long?) content.GetValueForProperty("MaxMessageSizeInKilobytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).MaxMessageSizeInKilobytes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("RequiresDuplicateDetection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).RequiresDuplicateDetection = (bool?) content.GetValueForProperty("RequiresDuplicateDetection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).RequiresDuplicateDetection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RequiresSession")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).RequiresSession = (bool?) content.GetValueForProperty("RequiresSession",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).RequiresSession, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DefaultMessageTimeToLive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("DeadLetteringOnMessageExpiration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).DeadLetteringOnMessageExpiration = (bool?) content.GetValueForProperty("DeadLetteringOnMessageExpiration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).DeadLetteringOnMessageExpiration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DuplicateDetectionHistoryTimeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("MaxDeliveryCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).MaxDeliveryCount = (int?) content.GetValueForProperty("MaxDeliveryCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).MaxDeliveryCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("EnableBatchedOperations")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoDeleteOnIdle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("EnablePartitioning")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).EnablePartitioning = (bool?) content.GetValueForProperty("EnablePartitioning",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).EnablePartitioning, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableExpress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).EnableExpress = (bool?) content.GetValueForProperty("EnableExpress",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).EnableExpress, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ForwardTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).ForwardTo = (string) content.GetValueForProperty("ForwardTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).ForwardTo, global::System.Convert.ToString); + } + if (content.Contains("ForwardDeadLetteredMessagesTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).ForwardDeadLetteredMessagesTo = (string) content.GetValueForProperty("ForwardDeadLetteredMessagesTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).ForwardDeadLetteredMessagesTo, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CountDetailActiveMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailScheduledMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SbQueue(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbQueuePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CountDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("AccessedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SizeInByte")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SizeInByte = (long?) content.GetValueForProperty("SizeInByte",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SizeInByte, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).MessageCount = (long?) content.GetValueForProperty("MessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).MessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("LockDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).LockDuration = (global::System.TimeSpan?) content.GetValueForProperty("LockDuration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).LockDuration, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("MaxSizeInMegabytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).MaxSizeInMegabytes = (int?) content.GetValueForProperty("MaxSizeInMegabytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).MaxSizeInMegabytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMessageSizeInKilobytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).MaxMessageSizeInKilobytes = (long?) content.GetValueForProperty("MaxMessageSizeInKilobytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).MaxMessageSizeInKilobytes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("RequiresDuplicateDetection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).RequiresDuplicateDetection = (bool?) content.GetValueForProperty("RequiresDuplicateDetection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).RequiresDuplicateDetection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RequiresSession")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).RequiresSession = (bool?) content.GetValueForProperty("RequiresSession",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).RequiresSession, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DefaultMessageTimeToLive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("DeadLetteringOnMessageExpiration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).DeadLetteringOnMessageExpiration = (bool?) content.GetValueForProperty("DeadLetteringOnMessageExpiration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).DeadLetteringOnMessageExpiration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DuplicateDetectionHistoryTimeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("MaxDeliveryCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).MaxDeliveryCount = (int?) content.GetValueForProperty("MaxDeliveryCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).MaxDeliveryCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("EnableBatchedOperations")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoDeleteOnIdle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("EnablePartitioning")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).EnablePartitioning = (bool?) content.GetValueForProperty("EnablePartitioning",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).EnablePartitioning, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableExpress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).EnableExpress = (bool?) content.GetValueForProperty("EnableExpress",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).EnableExpress, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ForwardTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).ForwardTo = (string) content.GetValueForProperty("ForwardTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).ForwardTo, global::System.Convert.ToString); + } + if (content.Contains("ForwardDeadLetteredMessagesTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).ForwardDeadLetteredMessagesTo = (string) content.GetValueForProperty("ForwardDeadLetteredMessagesTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).ForwardDeadLetteredMessagesTo, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CountDetailActiveMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailScheduledMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Description of queue Resource. + [System.ComponentModel.TypeConverter(typeof(SbQueueTypeConverter))] + public partial interface ISbQueue + + { + + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueue.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueue.TypeConverter.cs similarity index 97% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueue.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueue.TypeConverter.cs index 929c5e8480e7..27ec100e3d92 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueue.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueue.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueue.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueue.cs similarity index 69% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueue.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueue.cs index 38e8c6e338d7..34d4c582d0be 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueue.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueue.cs @@ -3,213 +3,212 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Description of queue Resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbQueue : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(); /// /// Last time a message was sent, or the last time there was a receive request to this queue. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? AccessedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).AccessedAt; } + public global::System.DateTime? AccessedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).AccessedAt; } /// /// ISO 8061 timeSpan idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.TimeSpan? AutoDeleteOnIdle { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).AutoDeleteOnIdle; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).AutoDeleteOnIdle = value ?? default(global::System.TimeSpan); } + public global::System.TimeSpan? AutoDeleteOnIdle { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).AutoDeleteOnIdle; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).AutoDeleteOnIdle = value ?? default(global::System.TimeSpan); } /// Number of active messages in the queue, topic, or subscription. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetailActiveMessageCount; } + public long? CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetailActiveMessageCount; } /// Number of messages that are dead lettered. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetailDeadLetterMessageCount; } + public long? CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetailDeadLetterMessageCount; } /// Number of scheduled messages. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetailScheduledMessageCount; } + public long? CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetailScheduledMessageCount; } /// Number of messages transferred into dead letters. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount; } + public long? CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount; } /// Number of messages transferred to another queue, topic, or subscription. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetailTransferMessageCount; } + public long? CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetailTransferMessageCount; } /// The exact time the message was created. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CreatedAt; } + public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CreatedAt; } /// /// A value that indicates whether this queue has dead letter support when a message expires. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? DeadLetteringOnMessageExpiration { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).DeadLetteringOnMessageExpiration; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).DeadLetteringOnMessageExpiration = value ?? default(bool); } + public bool? DeadLetteringOnMessageExpiration { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).DeadLetteringOnMessageExpiration; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).DeadLetteringOnMessageExpiration = value ?? default(bool); } /// /// ISO 8601 default message timespan to live value. This is the duration after which the message expires, starting from when /// the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.TimeSpan? DefaultMessageTimeToLive { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).DefaultMessageTimeToLive; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).DefaultMessageTimeToLive = value ?? default(global::System.TimeSpan); } + public global::System.TimeSpan? DefaultMessageTimeToLive { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).DefaultMessageTimeToLive; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).DefaultMessageTimeToLive = value ?? default(global::System.TimeSpan); } /// /// ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.TimeSpan? DuplicateDetectionHistoryTimeWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).DuplicateDetectionHistoryTimeWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).DuplicateDetectionHistoryTimeWindow = value ?? default(global::System.TimeSpan); } + public global::System.TimeSpan? DuplicateDetectionHistoryTimeWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).DuplicateDetectionHistoryTimeWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).DuplicateDetectionHistoryTimeWindow = value ?? default(global::System.TimeSpan); } /// Value that indicates whether server-side batched operations are enabled. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? EnableBatchedOperations { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).EnableBatchedOperations; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).EnableBatchedOperations = value ?? default(bool); } + public bool? EnableBatchedOperations { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).EnableBatchedOperations; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).EnableBatchedOperations = value ?? default(bool); } /// /// A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before /// writing it to persistent storage. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? EnableExpress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).EnableExpress; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).EnableExpress = value ?? default(bool); } + public bool? EnableExpress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).EnableExpress; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).EnableExpress = value ?? default(bool); } /// /// A value that indicates whether the queue is to be partitioned across multiple message brokers. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? EnablePartitioning { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).EnablePartitioning; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).EnablePartitioning = value ?? default(bool); } + public bool? EnablePartitioning { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).EnablePartitioning; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).EnablePartitioning = value ?? default(bool); } /// Queue/Topic name to forward the Dead Letter message [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string ForwardDeadLetteredMessagesTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).ForwardDeadLetteredMessagesTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).ForwardDeadLetteredMessagesTo = value ?? null; } + public string ForwardDeadLetteredMessagesTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).ForwardDeadLetteredMessagesTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).ForwardDeadLetteredMessagesTo = value ?? null; } /// Queue/Topic name to forward the messages [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string ForwardTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).ForwardTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).ForwardTo = value ?? null; } + public string ForwardTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).ForwardTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).ForwardTo = value ?? null; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; } /// /// ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. /// The maximum value for LockDuration is 5 minutes; the default value is 1 minute. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.TimeSpan? LockDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).LockDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).LockDuration = value ?? default(global::System.TimeSpan); } + public global::System.TimeSpan? LockDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).LockDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).LockDuration = value ?? default(global::System.TimeSpan); } /// /// The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is /// 10. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public int? MaxDeliveryCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).MaxDeliveryCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).MaxDeliveryCount = value ?? default(int); } + public int? MaxDeliveryCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).MaxDeliveryCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).MaxDeliveryCount = value ?? default(int); } /// /// Maximum size (in KB) of the message payload that can be accepted by the queue. This property is only used in Premium today /// and default is 1024. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? MaxMessageSizeInKilobytes { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).MaxMessageSizeInKilobytes; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).MaxMessageSizeInKilobytes = value ?? default(long); } + public long? MaxMessageSizeInKilobytes { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).MaxMessageSizeInKilobytes; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).MaxMessageSizeInKilobytes = value ?? default(long); } /// /// The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public int? MaxSizeInMegabytes { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).MaxSizeInMegabytes; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).MaxSizeInMegabytes = value ?? default(int); } + public int? MaxSizeInMegabytes { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).MaxSizeInMegabytes; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).MaxSizeInMegabytes = value ?? default(int); } /// The number of messages in the queue. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? MessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).MessageCount; } + public long? MessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).MessageCount; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id = value; } /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// Internal Acessors for AccessedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal.AccessedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).AccessedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).AccessedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal.AccessedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).AccessedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).AccessedAt = value; } /// Internal Acessors for CountDetail - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal.CountDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetail = value; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal.CountDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetail = value; } /// Internal Acessors for CountDetailActiveMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal.CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetailActiveMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetailActiveMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal.CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetailActiveMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetailActiveMessageCount = value; } /// Internal Acessors for CountDetailDeadLetterMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal.CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetailDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetailDeadLetterMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal.CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetailDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetailDeadLetterMessageCount = value; } /// Internal Acessors for CountDetailScheduledMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal.CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetailScheduledMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetailScheduledMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal.CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetailScheduledMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetailScheduledMessageCount = value; } /// Internal Acessors for CountDetailTransferDeadLetterMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal.CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal.CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount = value; } /// Internal Acessors for CountDetailTransferMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal.CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetailTransferMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CountDetailTransferMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal.CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetailTransferMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CountDetailTransferMessageCount = value; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).CreatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).CreatedAt = value; } /// Internal Acessors for MessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal.MessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).MessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).MessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal.MessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).MessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).MessageCount = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbQueueProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbQueueProperties()); set { {_property = value;} } } /// Internal Acessors for SizeInByte - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal.SizeInByte { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).SizeInByte; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).SizeInByte = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal.SizeInByte { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).SizeInByte; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).SizeInByte = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); set { {_systemData = value;} } } /// Internal Acessors for UpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).UpdatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).UpdatedAt = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueProperties _property; /// Queue Properties [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbQueueProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbQueueProperties()); set => this._property = value; } /// A value indicating if this queue requires duplicate detection. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? RequiresDuplicateDetection { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).RequiresDuplicateDetection; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).RequiresDuplicateDetection = value ?? default(bool); } + public bool? RequiresDuplicateDetection { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).RequiresDuplicateDetection; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).RequiresDuplicateDetection = value ?? default(bool); } /// A value that indicates whether the queue supports the concept of sessions. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? RequiresSession { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).RequiresSession; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).RequiresSession = value ?? default(bool); } + public bool? RequiresSession { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).RequiresSession; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).RequiresSession = value ?? default(bool); } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] @@ -217,52 +216,52 @@ public partial class SbQueue : /// The size of the queue, in bytes. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? SizeInByte { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).SizeInByte; } + public long? SizeInByte { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).SizeInByte; } /// Enumerates the possible values for the status of a messaging entity. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus)""); } + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).Status = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; } /// The exact time the message was updated. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal)Property).UpdatedAt; } + public global::System.DateTime? UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)Property).UpdatedAt; } /// Creates an new instance. public SbQueue() @@ -285,7 +284,7 @@ public SbQueue() /// Description of queue Resource. public partial interface ISbQueue : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource { /// /// Last time a message was sent, or the last time there was a receive request to this queue. @@ -293,6 +292,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Last time a message was sent, or the last time there was a receive request to this queue.", SerializedName = @"accessedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -303,6 +305,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8061 timeSpan idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.", SerializedName = @"autoDeleteOnIdle", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -311,6 +316,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of active messages in the queue, topic, or subscription.", SerializedName = @"activeMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -319,6 +327,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages that are dead lettered.", SerializedName = @"deadLetterMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -327,6 +338,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of scheduled messages.", SerializedName = @"scheduledMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -335,6 +349,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages transferred into dead letters.", SerializedName = @"transferDeadLetterMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -343,6 +360,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages transferred to another queue, topic, or subscription.", SerializedName = @"transferMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -351,6 +371,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The exact time the message was created.", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -361,6 +384,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value that indicates whether this queue has dead letter support when a message expires.", SerializedName = @"deadLetteringOnMessageExpiration", PossibleTypes = new [] { typeof(bool) })] @@ -372,6 +398,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8601 default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.", SerializedName = @"defaultMessageTimeToLive", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -382,6 +411,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.", SerializedName = @"duplicateDetectionHistoryTimeWindow", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -390,6 +422,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether server-side batched operations are enabled.", SerializedName = @"enableBatchedOperations", PossibleTypes = new [] { typeof(bool) })] @@ -401,6 +436,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage.", SerializedName = @"enableExpress", PossibleTypes = new [] { typeof(bool) })] @@ -411,6 +449,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value that indicates whether the queue is to be partitioned across multiple message brokers.", SerializedName = @"enablePartitioning", PossibleTypes = new [] { typeof(bool) })] @@ -419,6 +460,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Queue/Topic name to forward the Dead Letter message", SerializedName = @"forwardDeadLetteredMessagesTo", PossibleTypes = new [] { typeof(string) })] @@ -427,6 +471,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Queue/Topic name to forward the messages", SerializedName = @"forwardTo", PossibleTypes = new [] { typeof(string) })] @@ -438,6 +485,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.", SerializedName = @"lockDuration", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -449,6 +499,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is 10.", SerializedName = @"maxDeliveryCount", PossibleTypes = new [] { typeof(int) })] @@ -460,6 +513,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Maximum size (in KB) of the message payload that can be accepted by the queue. This property is only used in Premium today and default is 1024.", SerializedName = @"maxMessageSizeInKilobytes", PossibleTypes = new [] { typeof(long) })] @@ -470,6 +526,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024.", SerializedName = @"maxSizeInMegabytes", PossibleTypes = new [] { typeof(int) })] @@ -478,6 +537,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The number of messages in the queue.", SerializedName = @"messageCount", PossibleTypes = new [] { typeof(long) })] @@ -486,6 +548,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value indicating if this queue requires duplicate detection.", SerializedName = @"requiresDuplicateDetection", PossibleTypes = new [] { typeof(bool) })] @@ -494,6 +559,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value that indicates whether the queue supports the concept of sessions.", SerializedName = @"requiresSession", PossibleTypes = new [] { typeof(bool) })] @@ -502,6 +570,9 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The size of the queue, in bytes.", SerializedName = @"sizeInBytes", PossibleTypes = new [] { typeof(long) })] @@ -510,62 +581,89 @@ public partial interface ISbQueue : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible values for the status of a messaging entity.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + string Status { get; set; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// The exact time the message was updated. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The exact time the message was updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -574,7 +672,7 @@ public partial interface ISbQueue : } /// Description of queue Resource. internal partial interface ISbQueueInternal : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal { /// /// Last time a message was sent, or the last time there was a receive request to this queue. @@ -585,7 +683,7 @@ internal partial interface ISbQueueInternal : /// global::System.TimeSpan? AutoDeleteOnIdle { get; set; } /// Message Count Details. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails CountDetail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails CountDetail { get; set; } /// Number of active messages in the queue, topic, or subscription. long? CountDetailActiveMessageCount { get; set; } /// Number of messages that are dead lettered. @@ -648,7 +746,7 @@ internal partial interface ISbQueueInternal : /// The number of messages in the queue. long? MessageCount { get; set; } /// Queue Properties - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueProperties Property { get; set; } /// A value indicating if this queue requires duplicate detection. bool? RequiresDuplicateDetection { get; set; } /// A value that indicates whether the queue supports the concept of sessions. @@ -656,21 +754,24 @@ internal partial interface ISbQueueInternal : /// The size of the queue, in bytes. long? SizeInByte { get; set; } /// Enumerates the possible values for the status of a messaging entity. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + string Status { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// The exact time the message was updated. global::System.DateTime? UpdatedAt { get; set; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueue.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueue.json.cs similarity index 90% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueue.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueue.json.cs index bffadedf389f..1300a5671558 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueue.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueue.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class SbQueue partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbQueue(json) : null; } @@ -77,9 +75,9 @@ internal SbQueue(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.Json { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbQueueProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbQueueProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } @@ -104,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueListResult.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueListResult.PowerShell.cs similarity index 75% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueListResult.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueListResult.PowerShell.cs index e42f33b6a903..cb9b3f1ae146 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueListResult.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SbQueueListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SbQueueListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SbQueueListResult(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal SbQueueListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbQueueTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbQueueTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal SbQueueListResult(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbQueueTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbQueueTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueListResult.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueListResult.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueListResult.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueListResult.TypeConverter.cs index 2f08ecef0fc0..ccdca8ca3e8d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueListResult.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueListResult.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueListResult.cs similarity index 75% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueListResult.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueListResult.cs index f7f0d99e2349..30994397660e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueListResult.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The response to the List Queues operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbQueueListResult : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResult, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResult, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResultInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class SbQueueListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue[] _value; + private System.Collections.Generic.List _value; /// Result of the List Queues operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public SbQueueListResult() @@ -46,6 +46,9 @@ public partial interface ISbQueueListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Link to the next set of results. Not empty if Value contains incomplete list of queues.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -54,10 +57,13 @@ public partial interface ISbQueueListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result of the List Queues operation.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue) })] + System.Collections.Generic.List Value { get; set; } } /// The response to the List Queues operation. @@ -69,7 +75,7 @@ internal partial interface ISbQueueListResultInternal /// string NextLink { get; set; } /// Result of the List Queues operation. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueListResult.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueListResult.json.cs similarity index 89% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueListResult.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueListResult.json.cs index 767f96aac38b..4043ab246f57 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueListResult.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SbQueueListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbQueueListResult(json) : null; } @@ -77,8 +77,8 @@ internal SbQueueListResult(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbQueue.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbQueue.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueProperties.PowerShell.cs new file mode 100644 index 000000000000..cc44d5d84a45 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueProperties.PowerShell.cs @@ -0,0 +1,372 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + + /// The Queue Properties definition. + [System.ComponentModel.TypeConverter(typeof(SbQueuePropertiesTypeConverter))] + public partial class SbQueueProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SbQueueProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SbQueueProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SbQueueProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CountDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("AccessedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SizeInByte")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).SizeInByte = (long?) content.GetValueForProperty("SizeInByte",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).SizeInByte, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).MessageCount = (long?) content.GetValueForProperty("MessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).MessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("LockDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).LockDuration = (global::System.TimeSpan?) content.GetValueForProperty("LockDuration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).LockDuration, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("MaxSizeInMegabytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).MaxSizeInMegabytes = (int?) content.GetValueForProperty("MaxSizeInMegabytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).MaxSizeInMegabytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMessageSizeInKilobytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).MaxMessageSizeInKilobytes = (long?) content.GetValueForProperty("MaxMessageSizeInKilobytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).MaxMessageSizeInKilobytes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("RequiresDuplicateDetection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).RequiresDuplicateDetection = (bool?) content.GetValueForProperty("RequiresDuplicateDetection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).RequiresDuplicateDetection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RequiresSession")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).RequiresSession = (bool?) content.GetValueForProperty("RequiresSession",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).RequiresSession, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DefaultMessageTimeToLive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("DeadLetteringOnMessageExpiration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).DeadLetteringOnMessageExpiration = (bool?) content.GetValueForProperty("DeadLetteringOnMessageExpiration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).DeadLetteringOnMessageExpiration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DuplicateDetectionHistoryTimeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("MaxDeliveryCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).MaxDeliveryCount = (int?) content.GetValueForProperty("MaxDeliveryCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).MaxDeliveryCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("EnableBatchedOperations")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoDeleteOnIdle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("EnablePartitioning")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).EnablePartitioning = (bool?) content.GetValueForProperty("EnablePartitioning",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).EnablePartitioning, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableExpress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).EnableExpress = (bool?) content.GetValueForProperty("EnableExpress",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).EnableExpress, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ForwardTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).ForwardTo = (string) content.GetValueForProperty("ForwardTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).ForwardTo, global::System.Convert.ToString); + } + if (content.Contains("ForwardDeadLetteredMessagesTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).ForwardDeadLetteredMessagesTo = (string) content.GetValueForProperty("ForwardDeadLetteredMessagesTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).ForwardDeadLetteredMessagesTo, global::System.Convert.ToString); + } + if (content.Contains("CountDetailActiveMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailScheduledMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SbQueueProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CountDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("AccessedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SizeInByte")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).SizeInByte = (long?) content.GetValueForProperty("SizeInByte",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).SizeInByte, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).MessageCount = (long?) content.GetValueForProperty("MessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).MessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("LockDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).LockDuration = (global::System.TimeSpan?) content.GetValueForProperty("LockDuration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).LockDuration, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("MaxSizeInMegabytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).MaxSizeInMegabytes = (int?) content.GetValueForProperty("MaxSizeInMegabytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).MaxSizeInMegabytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMessageSizeInKilobytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).MaxMessageSizeInKilobytes = (long?) content.GetValueForProperty("MaxMessageSizeInKilobytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).MaxMessageSizeInKilobytes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("RequiresDuplicateDetection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).RequiresDuplicateDetection = (bool?) content.GetValueForProperty("RequiresDuplicateDetection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).RequiresDuplicateDetection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RequiresSession")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).RequiresSession = (bool?) content.GetValueForProperty("RequiresSession",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).RequiresSession, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DefaultMessageTimeToLive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("DeadLetteringOnMessageExpiration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).DeadLetteringOnMessageExpiration = (bool?) content.GetValueForProperty("DeadLetteringOnMessageExpiration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).DeadLetteringOnMessageExpiration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DuplicateDetectionHistoryTimeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("MaxDeliveryCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).MaxDeliveryCount = (int?) content.GetValueForProperty("MaxDeliveryCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).MaxDeliveryCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("EnableBatchedOperations")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoDeleteOnIdle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("EnablePartitioning")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).EnablePartitioning = (bool?) content.GetValueForProperty("EnablePartitioning",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).EnablePartitioning, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableExpress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).EnableExpress = (bool?) content.GetValueForProperty("EnableExpress",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).EnableExpress, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ForwardTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).ForwardTo = (string) content.GetValueForProperty("ForwardTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).ForwardTo, global::System.Convert.ToString); + } + if (content.Contains("ForwardDeadLetteredMessagesTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).ForwardDeadLetteredMessagesTo = (string) content.GetValueForProperty("ForwardDeadLetteredMessagesTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).ForwardDeadLetteredMessagesTo, global::System.Convert.ToString); + } + if (content.Contains("CountDetailActiveMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailScheduledMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The Queue Properties definition. + [System.ComponentModel.TypeConverter(typeof(SbQueuePropertiesTypeConverter))] + public partial interface ISbQueueProperties + + { + + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueProperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueProperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueProperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueProperties.TypeConverter.cs index da624c6ccd52..1b2997a1996f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueProperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueProperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueProperties.cs similarity index 84% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueProperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueProperties.cs index 9f3217f23516..c84e968eb1b0 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueProperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The Queue Properties definition. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbQueueProperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueProperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueProperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal { /// Backing field for property. @@ -33,31 +33,31 @@ public partial class SbQueueProperties : public global::System.TimeSpan? AutoDeleteOnIdle { get => this._autoDeleteOnIdle; set => this._autoDeleteOnIdle = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails _countDetail; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails _countDetail; /// Message Count Details. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails CountDetail { get => (this._countDetail = this._countDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetails()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails CountDetail { get => (this._countDetail = this._countDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetails()); } /// Number of active messages in the queue, topic, or subscription. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount; } + public long? CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount; } /// Number of messages that are dead lettered. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount; } + public long? CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount; } /// Number of scheduled messages. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount; } + public long? CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount; } /// Number of messages transferred into dead letters. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount; } + public long? CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount; } /// Number of messages transferred to another queue, topic, or subscription. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferMessageCount; } + public long? CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferMessageCount; } /// Backing field for property. private global::System.DateTime? _createdAt; @@ -181,37 +181,37 @@ public partial class SbQueueProperties : public long? MessageCount { get => this._messageCount; } /// Internal Acessors for AccessedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal.AccessedAt { get => this._accessedAt; set { {_accessedAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal.AccessedAt { get => this._accessedAt; set { {_accessedAt = value;} } } /// Internal Acessors for CountDetail - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal.CountDetail { get => (this._countDetail = this._countDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetails()); set { {_countDetail = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal.CountDetail { get => (this._countDetail = this._countDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetails()); set { {_countDetail = value;} } } /// Internal Acessors for CountDetailActiveMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal.CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal.CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount = value; } /// Internal Acessors for CountDetailDeadLetterMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal.CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal.CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount = value; } /// Internal Acessors for CountDetailScheduledMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal.CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal.CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount = value; } /// Internal Acessors for CountDetailTransferDeadLetterMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal.CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal.CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount = value; } /// Internal Acessors for CountDetailTransferMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal.CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal.CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferMessageCount = value; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } /// Internal Acessors for MessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal.MessageCount { get => this._messageCount; set { {_messageCount = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal.MessageCount { get => this._messageCount; set { {_messageCount = value;} } } /// Internal Acessors for SizeInByte - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal.SizeInByte { get => this._sizeInByte; set { {_sizeInByte = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal.SizeInByte { get => this._sizeInByte; set { {_sizeInByte = value;} } } /// Internal Acessors for UpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueuePropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueuePropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } /// Backing field for property. private bool? _requiresDuplicateDetection; @@ -235,11 +235,11 @@ public partial class SbQueueProperties : public long? SizeInByte { get => this._sizeInByte; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? _status; + private string _status; /// Enumerates the possible values for the status of a messaging entity. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get => this._status; set => this._status = value; } + public string Status { get => this._status; set => this._status = value; } /// Backing field for property. private global::System.DateTime? _updatedAt; @@ -264,6 +264,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Last time a message was sent, or the last time there was a receive request to this queue.", SerializedName = @"accessedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -274,6 +277,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8061 timeSpan idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.", SerializedName = @"autoDeleteOnIdle", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -282,6 +288,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of active messages in the queue, topic, or subscription.", SerializedName = @"activeMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -290,6 +299,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages that are dead lettered.", SerializedName = @"deadLetterMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -298,6 +310,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of scheduled messages.", SerializedName = @"scheduledMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -306,6 +321,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages transferred into dead letters.", SerializedName = @"transferDeadLetterMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -314,6 +332,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages transferred to another queue, topic, or subscription.", SerializedName = @"transferMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -322,6 +343,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The exact time the message was created.", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -332,6 +356,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value that indicates whether this queue has dead letter support when a message expires.", SerializedName = @"deadLetteringOnMessageExpiration", PossibleTypes = new [] { typeof(bool) })] @@ -343,6 +370,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8601 default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.", SerializedName = @"defaultMessageTimeToLive", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -353,6 +383,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.", SerializedName = @"duplicateDetectionHistoryTimeWindow", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -361,6 +394,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether server-side batched operations are enabled.", SerializedName = @"enableBatchedOperations", PossibleTypes = new [] { typeof(bool) })] @@ -372,6 +408,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage.", SerializedName = @"enableExpress", PossibleTypes = new [] { typeof(bool) })] @@ -382,6 +421,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value that indicates whether the queue is to be partitioned across multiple message brokers.", SerializedName = @"enablePartitioning", PossibleTypes = new [] { typeof(bool) })] @@ -390,6 +432,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Queue/Topic name to forward the Dead Letter message", SerializedName = @"forwardDeadLetteredMessagesTo", PossibleTypes = new [] { typeof(string) })] @@ -398,6 +443,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Queue/Topic name to forward the messages", SerializedName = @"forwardTo", PossibleTypes = new [] { typeof(string) })] @@ -409,6 +457,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.", SerializedName = @"lockDuration", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -420,6 +471,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is 10.", SerializedName = @"maxDeliveryCount", PossibleTypes = new [] { typeof(int) })] @@ -431,6 +485,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Maximum size (in KB) of the message payload that can be accepted by the queue. This property is only used in Premium today and default is 1024.", SerializedName = @"maxMessageSizeInKilobytes", PossibleTypes = new [] { typeof(long) })] @@ -441,6 +498,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024.", SerializedName = @"maxSizeInMegabytes", PossibleTypes = new [] { typeof(int) })] @@ -449,6 +509,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The number of messages in the queue.", SerializedName = @"messageCount", PossibleTypes = new [] { typeof(long) })] @@ -457,6 +520,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value indicating if this queue requires duplicate detection.", SerializedName = @"requiresDuplicateDetection", PossibleTypes = new [] { typeof(bool) })] @@ -465,6 +531,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value that indicates whether the queue supports the concept of sessions.", SerializedName = @"requiresSession", PossibleTypes = new [] { typeof(bool) })] @@ -473,6 +542,9 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The size of the queue, in bytes.", SerializedName = @"sizeInBytes", PossibleTypes = new [] { typeof(long) })] @@ -481,14 +553,21 @@ public partial interface ISbQueueProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible values for the status of a messaging entity.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + string Status { get; set; } /// The exact time the message was updated. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The exact time the message was updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -508,7 +587,7 @@ internal partial interface ISbQueuePropertiesInternal /// global::System.TimeSpan? AutoDeleteOnIdle { get; set; } /// Message Count Details. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails CountDetail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails CountDetail { get; set; } /// Number of active messages in the queue, topic, or subscription. long? CountDetailActiveMessageCount { get; set; } /// Number of messages that are dead lettered. @@ -577,7 +656,8 @@ internal partial interface ISbQueuePropertiesInternal /// The size of the queue, in bytes. long? SizeInByte { get; set; } /// Enumerates the possible values for the status of a messaging entity. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + string Status { get; set; } /// The exact time the message was updated. global::System.DateTime? UpdatedAt { get; set; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueProperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueProperties.json.cs similarity index 90% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueProperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueProperties.json.cs index e642c6d45a1b..47f8f0a4e7f4 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbQueueProperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbQueueProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SbQueueProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbQueueProperties(json) : null; } @@ -77,28 +77,28 @@ internal SbQueueProperties(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime { return; } - {_countDetail = If( json?.PropertyT("countDetails"), out var __jsonCountDetails) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetails.FromJson(__jsonCountDetails) : CountDetail;} - {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} - {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtValue) ? __jsonUpdatedAtValue : UpdatedAt : UpdatedAt;} - {_accessedAt = If( json?.PropertyT("accessedAt"), out var __jsonAccessedAt) ? global::System.DateTime.TryParse((string)__jsonAccessedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonAccessedAtValue) ? __jsonAccessedAtValue : AccessedAt : AccessedAt;} - {_sizeInByte = If( json?.PropertyT("sizeInBytes"), out var __jsonSizeInBytes) ? (long?)__jsonSizeInBytes : SizeInByte;} - {_messageCount = If( json?.PropertyT("messageCount"), out var __jsonMessageCount) ? (long?)__jsonMessageCount : MessageCount;} - {_lockDuration = If( json?.PropertyT("lockDuration"), out var __jsonLockDuration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonLockDuration ) : LockDuration;} - {_maxSizeInMegabytes = If( json?.PropertyT("maxSizeInMegabytes"), out var __jsonMaxSizeInMegabytes) ? (int?)__jsonMaxSizeInMegabytes : MaxSizeInMegabytes;} - {_maxMessageSizeInKilobytes = If( json?.PropertyT("maxMessageSizeInKilobytes"), out var __jsonMaxMessageSizeInKilobytes) ? (long?)__jsonMaxMessageSizeInKilobytes : MaxMessageSizeInKilobytes;} - {_requiresDuplicateDetection = If( json?.PropertyT("requiresDuplicateDetection"), out var __jsonRequiresDuplicateDetection) ? (bool?)__jsonRequiresDuplicateDetection : RequiresDuplicateDetection;} - {_requiresSession = If( json?.PropertyT("requiresSession"), out var __jsonRequiresSession) ? (bool?)__jsonRequiresSession : RequiresSession;} - {_defaultMessageTimeToLive = If( json?.PropertyT("defaultMessageTimeToLive"), out var __jsonDefaultMessageTimeToLive) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDefaultMessageTimeToLive ) : DefaultMessageTimeToLive;} - {_deadLetteringOnMessageExpiration = If( json?.PropertyT("deadLetteringOnMessageExpiration"), out var __jsonDeadLetteringOnMessageExpiration) ? (bool?)__jsonDeadLetteringOnMessageExpiration : DeadLetteringOnMessageExpiration;} - {_duplicateDetectionHistoryTimeWindow = If( json?.PropertyT("duplicateDetectionHistoryTimeWindow"), out var __jsonDuplicateDetectionHistoryTimeWindow) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDuplicateDetectionHistoryTimeWindow ) : DuplicateDetectionHistoryTimeWindow;} - {_maxDeliveryCount = If( json?.PropertyT("maxDeliveryCount"), out var __jsonMaxDeliveryCount) ? (int?)__jsonMaxDeliveryCount : MaxDeliveryCount;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_enableBatchedOperations = If( json?.PropertyT("enableBatchedOperations"), out var __jsonEnableBatchedOperations) ? (bool?)__jsonEnableBatchedOperations : EnableBatchedOperations;} - {_autoDeleteOnIdle = If( json?.PropertyT("autoDeleteOnIdle"), out var __jsonAutoDeleteOnIdle) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonAutoDeleteOnIdle ) : AutoDeleteOnIdle;} - {_enablePartitioning = If( json?.PropertyT("enablePartitioning"), out var __jsonEnablePartitioning) ? (bool?)__jsonEnablePartitioning : EnablePartitioning;} - {_enableExpress = If( json?.PropertyT("enableExpress"), out var __jsonEnableExpress) ? (bool?)__jsonEnableExpress : EnableExpress;} - {_forwardTo = If( json?.PropertyT("forwardTo"), out var __jsonForwardTo) ? (string)__jsonForwardTo : (string)ForwardTo;} - {_forwardDeadLetteredMessagesTo = If( json?.PropertyT("forwardDeadLetteredMessagesTo"), out var __jsonForwardDeadLetteredMessagesTo) ? (string)__jsonForwardDeadLetteredMessagesTo : (string)ForwardDeadLetteredMessagesTo;} + {_countDetail = If( json?.PropertyT("countDetails"), out var __jsonCountDetails) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetails.FromJson(__jsonCountDetails) : _countDetail;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : _createdAt : _createdAt;} + {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtValue) ? __jsonUpdatedAtValue : _updatedAt : _updatedAt;} + {_accessedAt = If( json?.PropertyT("accessedAt"), out var __jsonAccessedAt) ? global::System.DateTime.TryParse((string)__jsonAccessedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonAccessedAtValue) ? __jsonAccessedAtValue : _accessedAt : _accessedAt;} + {_sizeInByte = If( json?.PropertyT("sizeInBytes"), out var __jsonSizeInBytes) ? (long?)__jsonSizeInBytes : _sizeInByte;} + {_messageCount = If( json?.PropertyT("messageCount"), out var __jsonMessageCount) ? (long?)__jsonMessageCount : _messageCount;} + {_lockDuration = If( json?.PropertyT("lockDuration"), out var __jsonLockDuration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonLockDuration ) : _lockDuration;} + {_maxSizeInMegabytes = If( json?.PropertyT("maxSizeInMegabytes"), out var __jsonMaxSizeInMegabytes) ? (int?)__jsonMaxSizeInMegabytes : _maxSizeInMegabytes;} + {_maxMessageSizeInKilobytes = If( json?.PropertyT("maxMessageSizeInKilobytes"), out var __jsonMaxMessageSizeInKilobytes) ? (long?)__jsonMaxMessageSizeInKilobytes : _maxMessageSizeInKilobytes;} + {_requiresDuplicateDetection = If( json?.PropertyT("requiresDuplicateDetection"), out var __jsonRequiresDuplicateDetection) ? (bool?)__jsonRequiresDuplicateDetection : _requiresDuplicateDetection;} + {_requiresSession = If( json?.PropertyT("requiresSession"), out var __jsonRequiresSession) ? (bool?)__jsonRequiresSession : _requiresSession;} + {_defaultMessageTimeToLive = If( json?.PropertyT("defaultMessageTimeToLive"), out var __jsonDefaultMessageTimeToLive) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDefaultMessageTimeToLive ) : _defaultMessageTimeToLive;} + {_deadLetteringOnMessageExpiration = If( json?.PropertyT("deadLetteringOnMessageExpiration"), out var __jsonDeadLetteringOnMessageExpiration) ? (bool?)__jsonDeadLetteringOnMessageExpiration : _deadLetteringOnMessageExpiration;} + {_duplicateDetectionHistoryTimeWindow = If( json?.PropertyT("duplicateDetectionHistoryTimeWindow"), out var __jsonDuplicateDetectionHistoryTimeWindow) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDuplicateDetectionHistoryTimeWindow ) : _duplicateDetectionHistoryTimeWindow;} + {_maxDeliveryCount = If( json?.PropertyT("maxDeliveryCount"), out var __jsonMaxDeliveryCount) ? (int?)__jsonMaxDeliveryCount : _maxDeliveryCount;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_enableBatchedOperations = If( json?.PropertyT("enableBatchedOperations"), out var __jsonEnableBatchedOperations) ? (bool?)__jsonEnableBatchedOperations : _enableBatchedOperations;} + {_autoDeleteOnIdle = If( json?.PropertyT("autoDeleteOnIdle"), out var __jsonAutoDeleteOnIdle) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonAutoDeleteOnIdle ) : _autoDeleteOnIdle;} + {_enablePartitioning = If( json?.PropertyT("enablePartitioning"), out var __jsonEnablePartitioning) ? (bool?)__jsonEnablePartitioning : _enablePartitioning;} + {_enableExpress = If( json?.PropertyT("enableExpress"), out var __jsonEnableExpress) ? (bool?)__jsonEnableExpress : _enableExpress;} + {_forwardTo = If( json?.PropertyT("forwardTo"), out var __jsonForwardTo) ? (string)__jsonForwardTo : (string)_forwardTo;} + {_forwardDeadLetteredMessagesTo = If( json?.PropertyT("forwardDeadLetteredMessagesTo"), out var __jsonForwardDeadLetteredMessagesTo) ? (string)__jsonForwardDeadLetteredMessagesTo : (string)_forwardDeadLetteredMessagesTo;} AfterFromJson(json); } @@ -121,27 +121,27 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._countDetail ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._countDetail.ToJson(null,serializationMode) : null, "countDetails" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._updatedAt ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._updatedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "updatedAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._accessedAt ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._accessedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "accessedAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._sizeInByte ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNumber((long)this._sizeInByte) : null, "sizeInBytes" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._messageCount ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNumber((long)this._messageCount) : null, "messageCount" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSku.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSku.PowerShell.cs similarity index 75% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSku.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSku.PowerShell.cs index 9de44c0483b9..71bb42ed0f35 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSku.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSku.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class SbSku partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SbSku(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SbSku(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,21 +111,21 @@ internal SbSku(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Tier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)this).Tier = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier?) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)this).Tier, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)this).Tier = (string) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)this).Tier, global::System.Convert.ToString); } if (content.Contains("Capacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -140,15 +140,15 @@ internal SbSku(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Tier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)this).Tier = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier?) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)this).Tier, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)this).Tier = (string) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)this).Tier, global::System.Convert.ToString); } if (content.Contains("Capacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSku.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSku.TypeConverter.cs similarity index 97% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSku.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSku.TypeConverter.cs index 7e0f7be0e596..82d9b08740a1 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSku.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSku.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSku.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSku.cs similarity index 76% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSku.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSku.cs index f74ca2c9c049..74fd727a30e2 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSku.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSku.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// SKU of the namespace. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbSku : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSkuInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSkuInternal { /// Backing field for property. @@ -26,18 +26,18 @@ public partial class SbSku : public int? Capacity { get => this._capacity; set => this._capacity = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName _name; + private string _name; /// Name of this SKU. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName Name { get => this._name; set => this._name = value; } + public string Name { get => this._name; set => this._name = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier? _tier; + private string _tier; /// The billing tier of this particular SKU. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier? Tier { get => this._tier; set => this._tier = value; } + public string Tier { get => this._tier; set => this._tier = value; } /// Creates an new instance. public SbSku() @@ -57,6 +57,9 @@ public partial interface ISbSku : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Messaging units for your service bus premium namespace. Valid capacities are {1, 2, 4, 8, 16} multiples of your properties.premiumMessagingPartitions setting. For example, If properties.premiumMessagingPartitions is 1 then possible capacity values are 1, 2, 4, 8, and 16. If properties.premiumMessagingPartitions is 4 then possible capacity values are 4, 8, 16, 32 and 64", SerializedName = @"capacity", PossibleTypes = new [] { typeof(int) })] @@ -65,18 +68,26 @@ public partial interface ISbSku : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of this SKU.", SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName Name { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string Name { get; set; } /// The billing tier of this particular SKU. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The billing tier of this particular SKU.", SerializedName = @"tier", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier? Tier { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string Tier { get; set; } } /// SKU of the namespace. @@ -90,9 +101,11 @@ internal partial interface ISbSkuInternal /// int? Capacity { get; set; } /// Name of this SKU. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName Name { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string Name { get; set; } /// The billing tier of this particular SKU. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier? Tier { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string Tier { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSku.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSku.json.cs similarity index 92% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSku.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSku.json.cs index 92a72b8e4f98..d9debb4db737 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSku.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSku.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class SbSku partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSku FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSku FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbSku(json) : null; } @@ -77,9 +75,9 @@ internal SbSku(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonOb { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_tier = If( json?.PropertyT("tier"), out var __jsonTier) ? (string)__jsonTier : (string)Tier;} - {_capacity = If( json?.PropertyT("capacity"), out var __jsonCapacity) ? (int?)__jsonCapacity : Capacity;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_tier = If( json?.PropertyT("tier"), out var __jsonTier) ? (string)__jsonTier : (string)_tier;} + {_capacity = If( json?.PropertyT("capacity"), out var __jsonCapacity) ? (int?)__jsonCapacity : _capacity;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscription.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscription.PowerShell.cs new file mode 100644 index 000000000000..d8f17eb62e6a --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscription.PowerShell.cs @@ -0,0 +1,468 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + + /// Description of subscription resource. + [System.ComponentModel.TypeConverter(typeof(SbSubscriptionTypeConverter))] + public partial class SbSubscription + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SbSubscription(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SbSubscription(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SbSubscription(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscriptionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CountDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("ClientAffineProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).ClientAffineProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties) content.GetValueForProperty("ClientAffineProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).ClientAffineProperty, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbClientAffinePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("MessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).MessageCount = (long?) content.GetValueForProperty("MessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).MessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("AccessedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LockDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).LockDuration = (global::System.TimeSpan?) content.GetValueForProperty("LockDuration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).LockDuration, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("RequiresSession")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).RequiresSession = (bool?) content.GetValueForProperty("RequiresSession",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).RequiresSession, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DefaultMessageTimeToLive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("DeadLetteringOnFilterEvaluationException")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).DeadLetteringOnFilterEvaluationException = (bool?) content.GetValueForProperty("DeadLetteringOnFilterEvaluationException",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).DeadLetteringOnFilterEvaluationException, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DeadLetteringOnMessageExpiration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).DeadLetteringOnMessageExpiration = (bool?) content.GetValueForProperty("DeadLetteringOnMessageExpiration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).DeadLetteringOnMessageExpiration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DuplicateDetectionHistoryTimeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("MaxDeliveryCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).MaxDeliveryCount = (int?) content.GetValueForProperty("MaxDeliveryCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).MaxDeliveryCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("EnableBatchedOperations")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoDeleteOnIdle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("ForwardTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).ForwardTo = (string) content.GetValueForProperty("ForwardTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).ForwardTo, global::System.Convert.ToString); + } + if (content.Contains("ForwardDeadLetteredMessagesTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).ForwardDeadLetteredMessagesTo = (string) content.GetValueForProperty("ForwardDeadLetteredMessagesTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).ForwardDeadLetteredMessagesTo, global::System.Convert.ToString); + } + if (content.Contains("IsClientAffine")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).IsClientAffine = (bool?) content.GetValueForProperty("IsClientAffine",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).IsClientAffine, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CountDetailActiveMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailScheduledMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).ClientId, global::System.Convert.ToString); + } + if (content.Contains("IsDurable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).IsDurable = (bool?) content.GetValueForProperty("IsDurable",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).IsDurable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsShared")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).IsShared = (bool?) content.GetValueForProperty("IsShared",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).IsShared, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SbSubscription(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscriptionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CountDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("ClientAffineProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).ClientAffineProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties) content.GetValueForProperty("ClientAffineProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).ClientAffineProperty, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbClientAffinePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("MessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).MessageCount = (long?) content.GetValueForProperty("MessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).MessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("AccessedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LockDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).LockDuration = (global::System.TimeSpan?) content.GetValueForProperty("LockDuration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).LockDuration, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("RequiresSession")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).RequiresSession = (bool?) content.GetValueForProperty("RequiresSession",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).RequiresSession, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DefaultMessageTimeToLive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("DeadLetteringOnFilterEvaluationException")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).DeadLetteringOnFilterEvaluationException = (bool?) content.GetValueForProperty("DeadLetteringOnFilterEvaluationException",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).DeadLetteringOnFilterEvaluationException, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DeadLetteringOnMessageExpiration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).DeadLetteringOnMessageExpiration = (bool?) content.GetValueForProperty("DeadLetteringOnMessageExpiration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).DeadLetteringOnMessageExpiration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DuplicateDetectionHistoryTimeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("MaxDeliveryCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).MaxDeliveryCount = (int?) content.GetValueForProperty("MaxDeliveryCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).MaxDeliveryCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("EnableBatchedOperations")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoDeleteOnIdle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("ForwardTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).ForwardTo = (string) content.GetValueForProperty("ForwardTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).ForwardTo, global::System.Convert.ToString); + } + if (content.Contains("ForwardDeadLetteredMessagesTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).ForwardDeadLetteredMessagesTo = (string) content.GetValueForProperty("ForwardDeadLetteredMessagesTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).ForwardDeadLetteredMessagesTo, global::System.Convert.ToString); + } + if (content.Contains("IsClientAffine")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).IsClientAffine = (bool?) content.GetValueForProperty("IsClientAffine",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).IsClientAffine, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CountDetailActiveMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailScheduledMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).ClientId, global::System.Convert.ToString); + } + if (content.Contains("IsDurable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).IsDurable = (bool?) content.GetValueForProperty("IsDurable",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).IsDurable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsShared")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).IsShared = (bool?) content.GetValueForProperty("IsShared",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal)this).IsShared, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Description of subscription resource. + [System.ComponentModel.TypeConverter(typeof(SbSubscriptionTypeConverter))] + public partial interface ISbSubscription + + { + + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscription.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscription.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscription.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscription.TypeConverter.cs index ca6d8f28d5bf..b72ae28bb4dc 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscription.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscription.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscription.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscription.cs similarity index 66% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscription.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscription.cs index 82dfe7ab5796..c51deca74ed1 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscription.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscription.cs @@ -3,205 +3,204 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Description of subscription resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbSubscription : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(); /// Last time there was a receive request to this subscription. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? AccessedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).AccessedAt; } + public global::System.DateTime? AccessedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).AccessedAt; } /// /// ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.TimeSpan? AutoDeleteOnIdle { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).AutoDeleteOnIdle; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).AutoDeleteOnIdle = value ?? default(global::System.TimeSpan); } + public global::System.TimeSpan? AutoDeleteOnIdle { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).AutoDeleteOnIdle; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).AutoDeleteOnIdle = value ?? default(global::System.TimeSpan); } /// /// Indicates the Client ID of the application that created the client-affine subscription. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).ClientAffinePropertyClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).ClientAffinePropertyClientId = value ?? null; } + public string ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).ClientAffinePropertyClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).ClientAffinePropertyClientId = value ?? null; } /// Number of active messages in the queue, topic, or subscription. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetailActiveMessageCount; } + public long? CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetailActiveMessageCount; } /// Number of messages that are dead lettered. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetailDeadLetterMessageCount; } + public long? CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetailDeadLetterMessageCount; } /// Number of scheduled messages. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetailScheduledMessageCount; } + public long? CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetailScheduledMessageCount; } /// Number of messages transferred into dead letters. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount; } + public long? CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount; } /// Number of messages transferred to another queue, topic, or subscription. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetailTransferMessageCount; } + public long? CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetailTransferMessageCount; } /// Exact time the message was created. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CreatedAt; } + public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CreatedAt; } /// /// Value that indicates whether a subscription has dead letter support on filter evaluation exceptions. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? DeadLetteringOnFilterEvaluationException { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).DeadLetteringOnFilterEvaluationException; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).DeadLetteringOnFilterEvaluationException = value ?? default(bool); } + public bool? DeadLetteringOnFilterEvaluationException { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).DeadLetteringOnFilterEvaluationException; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).DeadLetteringOnFilterEvaluationException = value ?? default(bool); } /// /// Value that indicates whether a subscription has dead letter support when a message expires. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? DeadLetteringOnMessageExpiration { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).DeadLetteringOnMessageExpiration; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).DeadLetteringOnMessageExpiration = value ?? default(bool); } + public bool? DeadLetteringOnMessageExpiration { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).DeadLetteringOnMessageExpiration; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).DeadLetteringOnMessageExpiration = value ?? default(bool); } /// /// ISO 8061 Default message timespan to live value. This is the duration after which the message expires, starting from when /// the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.TimeSpan? DefaultMessageTimeToLive { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).DefaultMessageTimeToLive; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).DefaultMessageTimeToLive = value ?? default(global::System.TimeSpan); } + public global::System.TimeSpan? DefaultMessageTimeToLive { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).DefaultMessageTimeToLive; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).DefaultMessageTimeToLive = value ?? default(global::System.TimeSpan); } /// /// ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.TimeSpan? DuplicateDetectionHistoryTimeWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).DuplicateDetectionHistoryTimeWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).DuplicateDetectionHistoryTimeWindow = value ?? default(global::System.TimeSpan); } + public global::System.TimeSpan? DuplicateDetectionHistoryTimeWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).DuplicateDetectionHistoryTimeWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).DuplicateDetectionHistoryTimeWindow = value ?? default(global::System.TimeSpan); } /// Value that indicates whether server-side batched operations are enabled. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? EnableBatchedOperations { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).EnableBatchedOperations; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).EnableBatchedOperations = value ?? default(bool); } + public bool? EnableBatchedOperations { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).EnableBatchedOperations; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).EnableBatchedOperations = value ?? default(bool); } /// Queue/Topic name to forward the Dead Letter message [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string ForwardDeadLetteredMessagesTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).ForwardDeadLetteredMessagesTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).ForwardDeadLetteredMessagesTo = value ?? null; } + public string ForwardDeadLetteredMessagesTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).ForwardDeadLetteredMessagesTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).ForwardDeadLetteredMessagesTo = value ?? null; } /// Queue/Topic name to forward the messages [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string ForwardTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).ForwardTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).ForwardTo = value ?? null; } + public string ForwardTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).ForwardTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).ForwardTo = value ?? null; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; } /// Value that indicates whether the subscription has an affinity to the client id. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? IsClientAffine { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).IsClientAffine; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).IsClientAffine = value ?? default(bool); } + public bool? IsClientAffine { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).IsClientAffine; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).IsClientAffine = value ?? default(bool); } /// /// For client-affine subscriptions, this value indicates whether the subscription is durable or not. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? IsDurable { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).ClientAffinePropertyIsDurable; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).ClientAffinePropertyIsDurable = value ?? default(bool); } + public bool? IsDurable { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).ClientAffinePropertyIsDurable; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).ClientAffinePropertyIsDurable = value ?? default(bool); } /// /// For client-affine subscriptions, this value indicates whether the subscription is shared or not. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? IsShared { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).ClientAffinePropertyIsShared; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).ClientAffinePropertyIsShared = value ?? default(bool); } + public bool? IsShared { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).ClientAffinePropertyIsShared; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).ClientAffinePropertyIsShared = value ?? default(bool); } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; } /// /// ISO 8061 lock duration timespan for the subscription. The default value is 1 minute. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.TimeSpan? LockDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).LockDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).LockDuration = value ?? default(global::System.TimeSpan); } + public global::System.TimeSpan? LockDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).LockDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).LockDuration = value ?? default(global::System.TimeSpan); } /// Number of maximum deliveries. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public int? MaxDeliveryCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).MaxDeliveryCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).MaxDeliveryCount = value ?? default(int); } + public int? MaxDeliveryCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).MaxDeliveryCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).MaxDeliveryCount = value ?? default(int); } /// Number of messages. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? MessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).MessageCount; } + public long? MessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).MessageCount; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id = value; } /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// Internal Acessors for AccessedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal.AccessedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).AccessedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).AccessedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal.AccessedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).AccessedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).AccessedAt = value; } /// Internal Acessors for ClientAffineProperty - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal.ClientAffineProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).ClientAffineProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).ClientAffineProperty = value; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal.ClientAffineProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).ClientAffineProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).ClientAffineProperty = value; } /// Internal Acessors for CountDetail - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal.CountDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetail = value; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal.CountDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetail = value; } /// Internal Acessors for CountDetailActiveMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal.CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetailActiveMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetailActiveMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal.CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetailActiveMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetailActiveMessageCount = value; } /// Internal Acessors for CountDetailDeadLetterMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal.CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetailDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetailDeadLetterMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal.CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetailDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetailDeadLetterMessageCount = value; } /// Internal Acessors for CountDetailScheduledMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal.CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetailScheduledMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetailScheduledMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal.CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetailScheduledMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetailScheduledMessageCount = value; } /// Internal Acessors for CountDetailTransferDeadLetterMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal.CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal.CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount = value; } /// Internal Acessors for CountDetailTransferMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal.CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetailTransferMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CountDetailTransferMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal.CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetailTransferMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CountDetailTransferMessageCount = value; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).CreatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).CreatedAt = value; } /// Internal Acessors for MessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal.MessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).MessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).MessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal.MessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).MessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).MessageCount = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSubscriptionProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscriptionProperties()); set { {_property = value;} } } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); set { {_systemData = value;} } } /// Internal Acessors for UpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).UpdatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).UpdatedAt = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionProperties _property; /// Properties of subscriptions resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSubscriptionProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscriptionProperties()); set => this._property = value; } /// Value indicating if a subscription supports the concept of sessions. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? RequiresSession { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).RequiresSession; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).RequiresSession = value ?? default(bool); } + public bool? RequiresSession { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).RequiresSession; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).RequiresSession = value ?? default(bool); } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] @@ -209,48 +208,48 @@ public partial class SbSubscription : /// Enumerates the possible values for the status of a messaging entity. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus)""); } + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).Status = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; } /// The exact time the message was updated. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal)Property).UpdatedAt; } + public global::System.DateTime? UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)Property).UpdatedAt; } /// Creates an new instance. public SbSubscription() @@ -273,12 +272,15 @@ public SbSubscription() /// Description of subscription resource. public partial interface ISbSubscription : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource { /// Last time there was a receive request to this subscription. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Last time there was a receive request to this subscription.", SerializedName = @"accessedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -289,6 +291,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.", SerializedName = @"autoDeleteOnIdle", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -299,6 +304,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates the Client ID of the application that created the client-affine subscription.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -307,6 +315,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of active messages in the queue, topic, or subscription.", SerializedName = @"activeMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -315,6 +326,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages that are dead lettered.", SerializedName = @"deadLetterMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -323,6 +337,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of scheduled messages.", SerializedName = @"scheduledMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -331,6 +348,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages transferred into dead letters.", SerializedName = @"transferDeadLetterMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -339,6 +359,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages transferred to another queue, topic, or subscription.", SerializedName = @"transferMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -347,6 +370,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Exact time the message was created.", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -357,6 +383,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.", SerializedName = @"deadLetteringOnFilterEvaluationExceptions", PossibleTypes = new [] { typeof(bool) })] @@ -367,6 +396,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether a subscription has dead letter support when a message expires.", SerializedName = @"deadLetteringOnMessageExpiration", PossibleTypes = new [] { typeof(bool) })] @@ -378,6 +410,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8061 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.", SerializedName = @"defaultMessageTimeToLive", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -388,6 +423,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.", SerializedName = @"duplicateDetectionHistoryTimeWindow", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -396,6 +434,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether server-side batched operations are enabled.", SerializedName = @"enableBatchedOperations", PossibleTypes = new [] { typeof(bool) })] @@ -404,6 +445,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Queue/Topic name to forward the Dead Letter message", SerializedName = @"forwardDeadLetteredMessagesTo", PossibleTypes = new [] { typeof(string) })] @@ -412,6 +456,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Queue/Topic name to forward the messages", SerializedName = @"forwardTo", PossibleTypes = new [] { typeof(string) })] @@ -420,6 +467,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether the subscription has an affinity to the client id.", SerializedName = @"isClientAffine", PossibleTypes = new [] { typeof(bool) })] @@ -430,6 +480,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"For client-affine subscriptions, this value indicates whether the subscription is durable or not.", SerializedName = @"isDurable", PossibleTypes = new [] { typeof(bool) })] @@ -440,6 +493,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"For client-affine subscriptions, this value indicates whether the subscription is shared or not.", SerializedName = @"isShared", PossibleTypes = new [] { typeof(bool) })] @@ -450,6 +506,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8061 lock duration timespan for the subscription. The default value is 1 minute.", SerializedName = @"lockDuration", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -458,6 +517,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number of maximum deliveries.", SerializedName = @"maxDeliveryCount", PossibleTypes = new [] { typeof(int) })] @@ -466,6 +528,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages.", SerializedName = @"messageCount", PossibleTypes = new [] { typeof(long) })] @@ -474,6 +539,9 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value indicating if a subscription supports the concept of sessions.", SerializedName = @"requiresSession", PossibleTypes = new [] { typeof(bool) })] @@ -482,62 +550,89 @@ public partial interface ISbSubscription : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible values for the status of a messaging entity.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + string Status { get; set; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// The exact time the message was updated. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The exact time the message was updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -546,7 +641,7 @@ public partial interface ISbSubscription : } /// Description of subscription resource. internal partial interface ISbSubscriptionInternal : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal { /// Last time there was a receive request to this subscription. global::System.DateTime? AccessedAt { get; set; } @@ -555,13 +650,13 @@ internal partial interface ISbSubscriptionInternal : /// global::System.TimeSpan? AutoDeleteOnIdle { get; set; } /// Properties specific to client affine subscriptions. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties ClientAffineProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties ClientAffineProperty { get; set; } /// /// Indicates the Client ID of the application that created the client-affine subscription. /// string ClientId { get; set; } /// Message count details - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails CountDetail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails CountDetail { get; set; } /// Number of active messages in the queue, topic, or subscription. long? CountDetailActiveMessageCount { get; set; } /// Number of messages that are dead lettered. @@ -616,25 +711,28 @@ internal partial interface ISbSubscriptionInternal : /// Number of messages. long? MessageCount { get; set; } /// Properties of subscriptions resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionProperties Property { get; set; } /// Value indicating if a subscription supports the concept of sessions. bool? RequiresSession { get; set; } /// Enumerates the possible values for the status of a messaging entity. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + string Status { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// The exact time the message was updated. global::System.DateTime? UpdatedAt { get; set; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscription.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscription.json.cs similarity index 91% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscription.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscription.json.cs index 2b501c864052..dec409ef12ce 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscription.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscription.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SbSubscription partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbSubscription(json) : null; } @@ -77,9 +77,9 @@ internal SbSubscription(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Js { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSubscriptionProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscriptionProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionListResult.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionListResult.PowerShell.cs similarity index 74% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionListResult.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionListResult.PowerShell.cs index f77cd1c60a17..ab5a8f8d4da0 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionListResult.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SbSubscriptionListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SbSubscriptionListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SbSubscriptionListResult(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal SbSubscriptionListResult(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSubscriptionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscriptionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal SbSubscriptionListResult(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSubscriptionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscriptionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionListResult.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionListResult.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionListResult.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionListResult.TypeConverter.cs index 419d190e4402..dc32b0e1e710 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionListResult.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionListResult.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionListResult.cs similarity index 75% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionListResult.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionListResult.cs index 553d5443b6aa..11473d366d65 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionListResult.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The response to the List Subscriptions operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbSubscriptionListResult : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResult, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResult, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResultInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class SbSubscriptionListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription[] _value; + private System.Collections.Generic.List _value; /// Result of the List Subscriptions operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public SbSubscriptionListResult() @@ -46,6 +46,9 @@ public partial interface ISbSubscriptionListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Link to the next set of results. Not empty if Value contains incomplete list of subscriptions.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -54,10 +57,13 @@ public partial interface ISbSubscriptionListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result of the List Subscriptions operation.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription) })] + System.Collections.Generic.List Value { get; set; } } /// The response to the List Subscriptions operation. @@ -69,7 +75,7 @@ internal partial interface ISbSubscriptionListResultInternal /// string NextLink { get; set; } /// Result of the List Subscriptions operation. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionListResult.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionListResult.json.cs similarity index 89% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionListResult.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionListResult.json.cs index 167da99f4b0d..eb6825a38af5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionListResult.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SbSubscriptionListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbSubscriptionListResult(json) : null; } @@ -77,8 +77,8 @@ internal SbSubscriptionListResult(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus. { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSubscription.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscription.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionProperties.PowerShell.cs new file mode 100644 index 000000000000..f77c3926d4dd --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionProperties.PowerShell.cs @@ -0,0 +1,372 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + + /// Description of Subscription Resource. + [System.ComponentModel.TypeConverter(typeof(SbSubscriptionPropertiesTypeConverter))] + public partial class SbSubscriptionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SbSubscriptionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SbSubscriptionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SbSubscriptionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CountDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("ClientAffineProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ClientAffineProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties) content.GetValueForProperty("ClientAffineProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ClientAffineProperty, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbClientAffinePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("MessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).MessageCount = (long?) content.GetValueForProperty("MessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).MessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("AccessedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LockDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).LockDuration = (global::System.TimeSpan?) content.GetValueForProperty("LockDuration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).LockDuration, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("RequiresSession")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).RequiresSession = (bool?) content.GetValueForProperty("RequiresSession",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).RequiresSession, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DefaultMessageTimeToLive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("DeadLetteringOnFilterEvaluationException")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).DeadLetteringOnFilterEvaluationException = (bool?) content.GetValueForProperty("DeadLetteringOnFilterEvaluationException",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).DeadLetteringOnFilterEvaluationException, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DeadLetteringOnMessageExpiration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).DeadLetteringOnMessageExpiration = (bool?) content.GetValueForProperty("DeadLetteringOnMessageExpiration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).DeadLetteringOnMessageExpiration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DuplicateDetectionHistoryTimeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("MaxDeliveryCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).MaxDeliveryCount = (int?) content.GetValueForProperty("MaxDeliveryCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).MaxDeliveryCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("EnableBatchedOperations")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoDeleteOnIdle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("ForwardTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ForwardTo = (string) content.GetValueForProperty("ForwardTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ForwardTo, global::System.Convert.ToString); + } + if (content.Contains("ForwardDeadLetteredMessagesTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ForwardDeadLetteredMessagesTo = (string) content.GetValueForProperty("ForwardDeadLetteredMessagesTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ForwardDeadLetteredMessagesTo, global::System.Convert.ToString); + } + if (content.Contains("IsClientAffine")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).IsClientAffine = (bool?) content.GetValueForProperty("IsClientAffine",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).IsClientAffine, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CountDetailActiveMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailScheduledMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ClientAffinePropertyClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyClientId = (string) content.GetValueForProperty("ClientAffinePropertyClientId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyClientId, global::System.Convert.ToString); + } + if (content.Contains("ClientAffinePropertyIsDurable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyIsDurable = (bool?) content.GetValueForProperty("ClientAffinePropertyIsDurable",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyIsDurable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ClientAffinePropertyIsShared")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyIsShared = (bool?) content.GetValueForProperty("ClientAffinePropertyIsShared",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyIsShared, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SbSubscriptionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CountDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("ClientAffineProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ClientAffineProperty = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties) content.GetValueForProperty("ClientAffineProperty",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ClientAffineProperty, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbClientAffinePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("MessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).MessageCount = (long?) content.GetValueForProperty("MessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).MessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("AccessedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LockDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).LockDuration = (global::System.TimeSpan?) content.GetValueForProperty("LockDuration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).LockDuration, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("RequiresSession")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).RequiresSession = (bool?) content.GetValueForProperty("RequiresSession",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).RequiresSession, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DefaultMessageTimeToLive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("DeadLetteringOnFilterEvaluationException")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).DeadLetteringOnFilterEvaluationException = (bool?) content.GetValueForProperty("DeadLetteringOnFilterEvaluationException",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).DeadLetteringOnFilterEvaluationException, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DeadLetteringOnMessageExpiration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).DeadLetteringOnMessageExpiration = (bool?) content.GetValueForProperty("DeadLetteringOnMessageExpiration",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).DeadLetteringOnMessageExpiration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DuplicateDetectionHistoryTimeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("MaxDeliveryCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).MaxDeliveryCount = (int?) content.GetValueForProperty("MaxDeliveryCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).MaxDeliveryCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("EnableBatchedOperations")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoDeleteOnIdle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("ForwardTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ForwardTo = (string) content.GetValueForProperty("ForwardTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ForwardTo, global::System.Convert.ToString); + } + if (content.Contains("ForwardDeadLetteredMessagesTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ForwardDeadLetteredMessagesTo = (string) content.GetValueForProperty("ForwardDeadLetteredMessagesTo",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ForwardDeadLetteredMessagesTo, global::System.Convert.ToString); + } + if (content.Contains("IsClientAffine")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).IsClientAffine = (bool?) content.GetValueForProperty("IsClientAffine",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).IsClientAffine, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CountDetailActiveMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailScheduledMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ClientAffinePropertyClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyClientId = (string) content.GetValueForProperty("ClientAffinePropertyClientId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyClientId, global::System.Convert.ToString); + } + if (content.Contains("ClientAffinePropertyIsDurable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyIsDurable = (bool?) content.GetValueForProperty("ClientAffinePropertyIsDurable",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyIsDurable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ClientAffinePropertyIsShared")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyIsShared = (bool?) content.GetValueForProperty("ClientAffinePropertyIsShared",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal)this).ClientAffinePropertyIsShared, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Description of Subscription Resource. + [System.ComponentModel.TypeConverter(typeof(SbSubscriptionPropertiesTypeConverter))] + public partial interface ISbSubscriptionProperties + + { + + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionProperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionProperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionProperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionProperties.TypeConverter.cs index db6135cbab89..77cb189b6857 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionProperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionProperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionProperties.cs similarity index 80% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionProperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionProperties.cs index 374001d78598..43a8e65ffaca 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionProperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Description of Subscription Resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbSubscriptionProperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionProperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionProperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal { /// Backing field for property. @@ -31,56 +31,56 @@ public partial class SbSubscriptionProperties : public global::System.TimeSpan? AutoDeleteOnIdle { get => this._autoDeleteOnIdle; set => this._autoDeleteOnIdle = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties _clientAffineProperty; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties _clientAffineProperty; /// Properties specific to client affine subscriptions. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties ClientAffineProperty { get => (this._clientAffineProperty = this._clientAffineProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbClientAffineProperties()); set => this._clientAffineProperty = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties ClientAffineProperty { get => (this._clientAffineProperty = this._clientAffineProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbClientAffineProperties()); set => this._clientAffineProperty = value; } /// /// Indicates the Client ID of the application that created the client-affine subscription. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string ClientAffinePropertyClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)ClientAffineProperty).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)ClientAffineProperty).ClientId = value ?? null; } + public string ClientAffinePropertyClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)ClientAffineProperty).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)ClientAffineProperty).ClientId = value ?? null; } /// /// For client-affine subscriptions, this value indicates whether the subscription is durable or not. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? ClientAffinePropertyIsDurable { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)ClientAffineProperty).IsDurable; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)ClientAffineProperty).IsDurable = value ?? default(bool); } + public bool? ClientAffinePropertyIsDurable { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)ClientAffineProperty).IsDurable; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)ClientAffineProperty).IsDurable = value ?? default(bool); } /// /// For client-affine subscriptions, this value indicates whether the subscription is shared or not. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? ClientAffinePropertyIsShared { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)ClientAffineProperty).IsShared; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffinePropertiesInternal)ClientAffineProperty).IsShared = value ?? default(bool); } + public bool? ClientAffinePropertyIsShared { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)ClientAffineProperty).IsShared; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffinePropertiesInternal)ClientAffineProperty).IsShared = value ?? default(bool); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails _countDetail; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails _countDetail; /// Message count details [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails CountDetail { get => (this._countDetail = this._countDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetails()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails CountDetail { get => (this._countDetail = this._countDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetails()); } /// Number of active messages in the queue, topic, or subscription. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount; } + public long? CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount; } /// Number of messages that are dead lettered. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount; } + public long? CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount; } /// Number of scheduled messages. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount; } + public long? CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount; } /// Number of messages transferred into dead letters. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount; } + public long? CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount; } /// Number of messages transferred to another queue, topic, or subscription. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferMessageCount; } + public long? CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferMessageCount; } /// Backing field for property. private global::System.DateTime? _createdAt; @@ -180,37 +180,37 @@ public partial class SbSubscriptionProperties : public long? MessageCount { get => this._messageCount; } /// Internal Acessors for AccessedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal.AccessedAt { get => this._accessedAt; set { {_accessedAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal.AccessedAt { get => this._accessedAt; set { {_accessedAt = value;} } } /// Internal Acessors for ClientAffineProperty - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal.ClientAffineProperty { get => (this._clientAffineProperty = this._clientAffineProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbClientAffineProperties()); set { {_clientAffineProperty = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal.ClientAffineProperty { get => (this._clientAffineProperty = this._clientAffineProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbClientAffineProperties()); set { {_clientAffineProperty = value;} } } /// Internal Acessors for CountDetail - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal.CountDetail { get => (this._countDetail = this._countDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetails()); set { {_countDetail = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal.CountDetail { get => (this._countDetail = this._countDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetails()); set { {_countDetail = value;} } } /// Internal Acessors for CountDetailActiveMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal.CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal.CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount = value; } /// Internal Acessors for CountDetailDeadLetterMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal.CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal.CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount = value; } /// Internal Acessors for CountDetailScheduledMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal.CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal.CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount = value; } /// Internal Acessors for CountDetailTransferDeadLetterMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal.CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal.CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount = value; } /// Internal Acessors for CountDetailTransferMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal.CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal.CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferMessageCount = value; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } /// Internal Acessors for MessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal.MessageCount { get => this._messageCount; set { {_messageCount = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal.MessageCount { get => this._messageCount; set { {_messageCount = value;} } } /// Internal Acessors for UpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionPropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionPropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } /// Backing field for property. private bool? _requiresSession; @@ -220,11 +220,11 @@ public partial class SbSubscriptionProperties : public bool? RequiresSession { get => this._requiresSession; set => this._requiresSession = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? _status; + private string _status; /// Enumerates the possible values for the status of a messaging entity. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get => this._status; set => this._status = value; } + public string Status { get => this._status; set => this._status = value; } /// Backing field for property. private global::System.DateTime? _updatedAt; @@ -247,6 +247,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Last time there was a receive request to this subscription.", SerializedName = @"accessedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -257,6 +260,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.", SerializedName = @"autoDeleteOnIdle", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -267,6 +273,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates the Client ID of the application that created the client-affine subscription.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -277,6 +286,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"For client-affine subscriptions, this value indicates whether the subscription is durable or not.", SerializedName = @"isDurable", PossibleTypes = new [] { typeof(bool) })] @@ -287,6 +299,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"For client-affine subscriptions, this value indicates whether the subscription is shared or not.", SerializedName = @"isShared", PossibleTypes = new [] { typeof(bool) })] @@ -295,6 +310,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of active messages in the queue, topic, or subscription.", SerializedName = @"activeMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -303,6 +321,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages that are dead lettered.", SerializedName = @"deadLetterMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -311,6 +332,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of scheduled messages.", SerializedName = @"scheduledMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -319,6 +343,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages transferred into dead letters.", SerializedName = @"transferDeadLetterMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -327,6 +354,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages transferred to another queue, topic, or subscription.", SerializedName = @"transferMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -335,6 +365,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Exact time the message was created.", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -345,6 +378,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.", SerializedName = @"deadLetteringOnFilterEvaluationExceptions", PossibleTypes = new [] { typeof(bool) })] @@ -355,6 +391,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether a subscription has dead letter support when a message expires.", SerializedName = @"deadLetteringOnMessageExpiration", PossibleTypes = new [] { typeof(bool) })] @@ -366,6 +405,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8061 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.", SerializedName = @"defaultMessageTimeToLive", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -376,6 +418,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.", SerializedName = @"duplicateDetectionHistoryTimeWindow", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -384,6 +429,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether server-side batched operations are enabled.", SerializedName = @"enableBatchedOperations", PossibleTypes = new [] { typeof(bool) })] @@ -392,6 +440,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Queue/Topic name to forward the Dead Letter message", SerializedName = @"forwardDeadLetteredMessagesTo", PossibleTypes = new [] { typeof(string) })] @@ -400,6 +451,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Queue/Topic name to forward the messages", SerializedName = @"forwardTo", PossibleTypes = new [] { typeof(string) })] @@ -408,6 +462,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether the subscription has an affinity to the client id.", SerializedName = @"isClientAffine", PossibleTypes = new [] { typeof(bool) })] @@ -418,6 +475,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8061 lock duration timespan for the subscription. The default value is 1 minute.", SerializedName = @"lockDuration", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -426,6 +486,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number of maximum deliveries.", SerializedName = @"maxDeliveryCount", PossibleTypes = new [] { typeof(int) })] @@ -434,6 +497,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages.", SerializedName = @"messageCount", PossibleTypes = new [] { typeof(long) })] @@ -442,6 +508,9 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value indicating if a subscription supports the concept of sessions.", SerializedName = @"requiresSession", PossibleTypes = new [] { typeof(bool) })] @@ -450,14 +519,21 @@ public partial interface ISbSubscriptionProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible values for the status of a messaging entity.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + string Status { get; set; } /// The exact time the message was updated. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The exact time the message was updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -475,7 +551,7 @@ internal partial interface ISbSubscriptionPropertiesInternal /// global::System.TimeSpan? AutoDeleteOnIdle { get; set; } /// Properties specific to client affine subscriptions. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbClientAffineProperties ClientAffineProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbClientAffineProperties ClientAffineProperty { get; set; } /// /// Indicates the Client ID of the application that created the client-affine subscription. /// @@ -489,7 +565,7 @@ internal partial interface ISbSubscriptionPropertiesInternal /// bool? ClientAffinePropertyIsShared { get; set; } /// Message count details - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails CountDetail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails CountDetail { get; set; } /// Number of active messages in the queue, topic, or subscription. long? CountDetailActiveMessageCount { get; set; } /// Number of messages that are dead lettered. @@ -538,7 +614,8 @@ internal partial interface ISbSubscriptionPropertiesInternal /// Value indicating if a subscription supports the concept of sessions. bool? RequiresSession { get; set; } /// Enumerates the possible values for the status of a messaging entity. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + string Status { get; set; } /// The exact time the message was updated. global::System.DateTime? UpdatedAt { get; set; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionProperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionProperties.json.cs similarity index 90% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionProperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionProperties.json.cs index a3567b85da27..aa2305a64ecf 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbSubscriptionProperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbSubscriptionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SbSubscriptionProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbSubscriptionProperties(json) : null; } @@ -77,25 +77,25 @@ internal SbSubscriptionProperties(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus. { return; } - {_countDetail = If( json?.PropertyT("countDetails"), out var __jsonCountDetails) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetails.FromJson(__jsonCountDetails) : CountDetail;} - {_clientAffineProperty = If( json?.PropertyT("clientAffineProperties"), out var __jsonClientAffineProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbClientAffineProperties.FromJson(__jsonClientAffineProperties) : ClientAffineProperty;} - {_messageCount = If( json?.PropertyT("messageCount"), out var __jsonMessageCount) ? (long?)__jsonMessageCount : MessageCount;} - {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} - {_accessedAt = If( json?.PropertyT("accessedAt"), out var __jsonAccessedAt) ? global::System.DateTime.TryParse((string)__jsonAccessedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonAccessedAtValue) ? __jsonAccessedAtValue : AccessedAt : AccessedAt;} - {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtValue) ? __jsonUpdatedAtValue : UpdatedAt : UpdatedAt;} - {_lockDuration = If( json?.PropertyT("lockDuration"), out var __jsonLockDuration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonLockDuration ) : LockDuration;} - {_requiresSession = If( json?.PropertyT("requiresSession"), out var __jsonRequiresSession) ? (bool?)__jsonRequiresSession : RequiresSession;} - {_defaultMessageTimeToLive = If( json?.PropertyT("defaultMessageTimeToLive"), out var __jsonDefaultMessageTimeToLive) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDefaultMessageTimeToLive ) : DefaultMessageTimeToLive;} - {_deadLetteringOnFilterEvaluationException = If( json?.PropertyT("deadLetteringOnFilterEvaluationExceptions"), out var __jsonDeadLetteringOnFilterEvaluationExceptions) ? (bool?)__jsonDeadLetteringOnFilterEvaluationExceptions : DeadLetteringOnFilterEvaluationException;} - {_deadLetteringOnMessageExpiration = If( json?.PropertyT("deadLetteringOnMessageExpiration"), out var __jsonDeadLetteringOnMessageExpiration) ? (bool?)__jsonDeadLetteringOnMessageExpiration : DeadLetteringOnMessageExpiration;} - {_duplicateDetectionHistoryTimeWindow = If( json?.PropertyT("duplicateDetectionHistoryTimeWindow"), out var __jsonDuplicateDetectionHistoryTimeWindow) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDuplicateDetectionHistoryTimeWindow ) : DuplicateDetectionHistoryTimeWindow;} - {_maxDeliveryCount = If( json?.PropertyT("maxDeliveryCount"), out var __jsonMaxDeliveryCount) ? (int?)__jsonMaxDeliveryCount : MaxDeliveryCount;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_enableBatchedOperations = If( json?.PropertyT("enableBatchedOperations"), out var __jsonEnableBatchedOperations) ? (bool?)__jsonEnableBatchedOperations : EnableBatchedOperations;} - {_autoDeleteOnIdle = If( json?.PropertyT("autoDeleteOnIdle"), out var __jsonAutoDeleteOnIdle) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonAutoDeleteOnIdle ) : AutoDeleteOnIdle;} - {_forwardTo = If( json?.PropertyT("forwardTo"), out var __jsonForwardTo) ? (string)__jsonForwardTo : (string)ForwardTo;} - {_forwardDeadLetteredMessagesTo = If( json?.PropertyT("forwardDeadLetteredMessagesTo"), out var __jsonForwardDeadLetteredMessagesTo) ? (string)__jsonForwardDeadLetteredMessagesTo : (string)ForwardDeadLetteredMessagesTo;} - {_isClientAffine = If( json?.PropertyT("isClientAffine"), out var __jsonIsClientAffine) ? (bool?)__jsonIsClientAffine : IsClientAffine;} + {_countDetail = If( json?.PropertyT("countDetails"), out var __jsonCountDetails) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetails.FromJson(__jsonCountDetails) : _countDetail;} + {_clientAffineProperty = If( json?.PropertyT("clientAffineProperties"), out var __jsonClientAffineProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbClientAffineProperties.FromJson(__jsonClientAffineProperties) : _clientAffineProperty;} + {_messageCount = If( json?.PropertyT("messageCount"), out var __jsonMessageCount) ? (long?)__jsonMessageCount : _messageCount;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : _createdAt : _createdAt;} + {_accessedAt = If( json?.PropertyT("accessedAt"), out var __jsonAccessedAt) ? global::System.DateTime.TryParse((string)__jsonAccessedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonAccessedAtValue) ? __jsonAccessedAtValue : _accessedAt : _accessedAt;} + {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtValue) ? __jsonUpdatedAtValue : _updatedAt : _updatedAt;} + {_lockDuration = If( json?.PropertyT("lockDuration"), out var __jsonLockDuration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonLockDuration ) : _lockDuration;} + {_requiresSession = If( json?.PropertyT("requiresSession"), out var __jsonRequiresSession) ? (bool?)__jsonRequiresSession : _requiresSession;} + {_defaultMessageTimeToLive = If( json?.PropertyT("defaultMessageTimeToLive"), out var __jsonDefaultMessageTimeToLive) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDefaultMessageTimeToLive ) : _defaultMessageTimeToLive;} + {_deadLetteringOnFilterEvaluationException = If( json?.PropertyT("deadLetteringOnFilterEvaluationExceptions"), out var __jsonDeadLetteringOnFilterEvaluationExceptions) ? (bool?)__jsonDeadLetteringOnFilterEvaluationExceptions : _deadLetteringOnFilterEvaluationException;} + {_deadLetteringOnMessageExpiration = If( json?.PropertyT("deadLetteringOnMessageExpiration"), out var __jsonDeadLetteringOnMessageExpiration) ? (bool?)__jsonDeadLetteringOnMessageExpiration : _deadLetteringOnMessageExpiration;} + {_duplicateDetectionHistoryTimeWindow = If( json?.PropertyT("duplicateDetectionHistoryTimeWindow"), out var __jsonDuplicateDetectionHistoryTimeWindow) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDuplicateDetectionHistoryTimeWindow ) : _duplicateDetectionHistoryTimeWindow;} + {_maxDeliveryCount = If( json?.PropertyT("maxDeliveryCount"), out var __jsonMaxDeliveryCount) ? (int?)__jsonMaxDeliveryCount : _maxDeliveryCount;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_enableBatchedOperations = If( json?.PropertyT("enableBatchedOperations"), out var __jsonEnableBatchedOperations) ? (bool?)__jsonEnableBatchedOperations : _enableBatchedOperations;} + {_autoDeleteOnIdle = If( json?.PropertyT("autoDeleteOnIdle"), out var __jsonAutoDeleteOnIdle) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonAutoDeleteOnIdle ) : _autoDeleteOnIdle;} + {_forwardTo = If( json?.PropertyT("forwardTo"), out var __jsonForwardTo) ? (string)__jsonForwardTo : (string)_forwardTo;} + {_forwardDeadLetteredMessagesTo = If( json?.PropertyT("forwardDeadLetteredMessagesTo"), out var __jsonForwardDeadLetteredMessagesTo) ? (string)__jsonForwardDeadLetteredMessagesTo : (string)_forwardDeadLetteredMessagesTo;} + {_isClientAffine = If( json?.PropertyT("isClientAffine"), out var __jsonIsClientAffine) ? (bool?)__jsonIsClientAffine : _isClientAffine;} AfterFromJson(json); } @@ -118,24 +118,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._countDetail ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._countDetail.ToJson(null,serializationMode) : null, "countDetails" ,container.Add ); } AddIf( null != this._clientAffineProperty ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._clientAffineProperty.ToJson(null,serializationMode) : null, "clientAffineProperties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._messageCount ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNumber((long)this._messageCount) : null, "messageCount" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._accessedAt ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._accessedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "accessedAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._updatedAt ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._updatedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "updatedAt" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopic.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopic.PowerShell.cs new file mode 100644 index 000000000000..d56e84c5c4e2 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopic.PowerShell.cs @@ -0,0 +1,428 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + + /// Description of topic resource. + [System.ComponentModel.TypeConverter(typeof(SbTopicTypeConverter))] + public partial class SbTopic + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SbTopic(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SbTopic(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SbTopic(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbTopicPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CountDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("SizeInByte")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SizeInByte = (long?) content.GetValueForProperty("SizeInByte",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SizeInByte, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("AccessedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SubscriptionCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SubscriptionCount = (int?) content.GetValueForProperty("SubscriptionCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SubscriptionCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DefaultMessageTimeToLive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("MaxSizeInMegabytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).MaxSizeInMegabytes = (int?) content.GetValueForProperty("MaxSizeInMegabytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).MaxSizeInMegabytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMessageSizeInKilobytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).MaxMessageSizeInKilobytes = (long?) content.GetValueForProperty("MaxMessageSizeInKilobytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).MaxMessageSizeInKilobytes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("RequiresDuplicateDetection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).RequiresDuplicateDetection = (bool?) content.GetValueForProperty("RequiresDuplicateDetection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).RequiresDuplicateDetection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DuplicateDetectionHistoryTimeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("EnableBatchedOperations")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("SupportOrdering")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SupportOrdering = (bool?) content.GetValueForProperty("SupportOrdering",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SupportOrdering, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoDeleteOnIdle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("EnablePartitioning")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).EnablePartitioning = (bool?) content.GetValueForProperty("EnablePartitioning",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).EnablePartitioning, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableExpress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).EnableExpress = (bool?) content.GetValueForProperty("EnableExpress",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).EnableExpress, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CountDetailActiveMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailScheduledMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SbTopic(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbTopicPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CountDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("SizeInByte")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SizeInByte = (long?) content.GetValueForProperty("SizeInByte",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SizeInByte, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("AccessedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SubscriptionCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SubscriptionCount = (int?) content.GetValueForProperty("SubscriptionCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SubscriptionCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DefaultMessageTimeToLive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("MaxSizeInMegabytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).MaxSizeInMegabytes = (int?) content.GetValueForProperty("MaxSizeInMegabytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).MaxSizeInMegabytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMessageSizeInKilobytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).MaxMessageSizeInKilobytes = (long?) content.GetValueForProperty("MaxMessageSizeInKilobytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).MaxMessageSizeInKilobytes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("RequiresDuplicateDetection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).RequiresDuplicateDetection = (bool?) content.GetValueForProperty("RequiresDuplicateDetection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).RequiresDuplicateDetection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DuplicateDetectionHistoryTimeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("EnableBatchedOperations")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("SupportOrdering")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SupportOrdering = (bool?) content.GetValueForProperty("SupportOrdering",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SupportOrdering, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoDeleteOnIdle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("EnablePartitioning")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).EnablePartitioning = (bool?) content.GetValueForProperty("EnablePartitioning",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).EnablePartitioning, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableExpress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).EnableExpress = (bool?) content.GetValueForProperty("EnableExpress",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).EnableExpress, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CountDetailActiveMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailScheduledMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Description of topic resource. + [System.ComponentModel.TypeConverter(typeof(SbTopicTypeConverter))] + public partial interface ISbTopic + + { + + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopic.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopic.TypeConverter.cs similarity index 97% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopic.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopic.TypeConverter.cs index 8b3e27af8682..3e8bde2782bd 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopic.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopic.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopic.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopic.cs similarity index 67% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopic.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopic.cs index 56131a113963..856c21cb01f6 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopic.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopic.cs @@ -3,175 +3,174 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Description of topic resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbTopic : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(); /// Last time the message was sent, or a request was received, for this topic. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? AccessedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).AccessedAt; } + public global::System.DateTime? AccessedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).AccessedAt; } /// /// ISO 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.TimeSpan? AutoDeleteOnIdle { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).AutoDeleteOnIdle; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).AutoDeleteOnIdle = value ?? default(global::System.TimeSpan); } + public global::System.TimeSpan? AutoDeleteOnIdle { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).AutoDeleteOnIdle; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).AutoDeleteOnIdle = value ?? default(global::System.TimeSpan); } /// Number of active messages in the queue, topic, or subscription. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetailActiveMessageCount; } + public long? CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetailActiveMessageCount; } /// Number of messages that are dead lettered. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetailDeadLetterMessageCount; } + public long? CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetailDeadLetterMessageCount; } /// Number of scheduled messages. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetailScheduledMessageCount; } + public long? CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetailScheduledMessageCount; } /// Number of messages transferred into dead letters. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount; } + public long? CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount; } /// Number of messages transferred to another queue, topic, or subscription. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetailTransferMessageCount; } + public long? CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetailTransferMessageCount; } /// Exact time the message was created. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CreatedAt; } + public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CreatedAt; } /// /// ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting from when /// the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.TimeSpan? DefaultMessageTimeToLive { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).DefaultMessageTimeToLive; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).DefaultMessageTimeToLive = value ?? default(global::System.TimeSpan); } + public global::System.TimeSpan? DefaultMessageTimeToLive { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).DefaultMessageTimeToLive; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).DefaultMessageTimeToLive = value ?? default(global::System.TimeSpan); } /// /// ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.TimeSpan? DuplicateDetectionHistoryTimeWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).DuplicateDetectionHistoryTimeWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).DuplicateDetectionHistoryTimeWindow = value ?? default(global::System.TimeSpan); } + public global::System.TimeSpan? DuplicateDetectionHistoryTimeWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).DuplicateDetectionHistoryTimeWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).DuplicateDetectionHistoryTimeWindow = value ?? default(global::System.TimeSpan); } /// Value that indicates whether server-side batched operations are enabled. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? EnableBatchedOperations { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).EnableBatchedOperations; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).EnableBatchedOperations = value ?? default(bool); } + public bool? EnableBatchedOperations { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).EnableBatchedOperations; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).EnableBatchedOperations = value ?? default(bool); } /// /// Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before /// writing it to persistent storage. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? EnableExpress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).EnableExpress; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).EnableExpress = value ?? default(bool); } + public bool? EnableExpress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).EnableExpress; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).EnableExpress = value ?? default(bool); } /// /// Value that indicates whether the topic to be partitioned across multiple message brokers is enabled. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? EnablePartitioning { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).EnablePartitioning; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).EnablePartitioning = value ?? default(bool); } + public bool? EnablePartitioning { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).EnablePartitioning; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).EnablePartitioning = value ?? default(bool); } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; } /// /// Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today /// and default is 1024. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? MaxMessageSizeInKilobytes { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).MaxMessageSizeInKilobytes; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).MaxMessageSizeInKilobytes = value ?? default(long); } + public long? MaxMessageSizeInKilobytes { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).MaxMessageSizeInKilobytes; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).MaxMessageSizeInKilobytes = value ?? default(long); } /// /// Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public int? MaxSizeInMegabytes { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).MaxSizeInMegabytes; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).MaxSizeInMegabytes = value ?? default(int); } + public int? MaxSizeInMegabytes { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).MaxSizeInMegabytes; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).MaxSizeInMegabytes = value ?? default(int); } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Id = value; } /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Location = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Location = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// Internal Acessors for AccessedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal.AccessedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).AccessedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).AccessedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal.AccessedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).AccessedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).AccessedAt = value; } /// Internal Acessors for CountDetail - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal.CountDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetail = value; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal.CountDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetail = value; } /// Internal Acessors for CountDetailActiveMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal.CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetailActiveMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetailActiveMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal.CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetailActiveMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetailActiveMessageCount = value; } /// Internal Acessors for CountDetailDeadLetterMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal.CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetailDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetailDeadLetterMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal.CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetailDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetailDeadLetterMessageCount = value; } /// Internal Acessors for CountDetailScheduledMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal.CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetailScheduledMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetailScheduledMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal.CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetailScheduledMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetailScheduledMessageCount = value; } /// Internal Acessors for CountDetailTransferDeadLetterMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal.CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal.CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetailTransferDeadLetterMessageCount = value; } /// Internal Acessors for CountDetailTransferMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal.CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetailTransferMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CountDetailTransferMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal.CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetailTransferMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CountDetailTransferMessageCount = value; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).CreatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).CreatedAt = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbTopicProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicProperties Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbTopicProperties()); set { {_property = value;} } } /// Internal Acessors for SizeInByte - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal.SizeInByte { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).SizeInByte; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).SizeInByte = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal.SizeInByte { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).SizeInByte; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).SizeInByte = value; } /// Internal Acessors for SubscriptionCount - int? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal.SubscriptionCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).SubscriptionCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).SubscriptionCount = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal.SubscriptionCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).SubscriptionCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).SubscriptionCount = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); set { {_systemData = value;} } } /// Internal Acessors for UpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).UpdatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).UpdatedAt = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicProperties _property; /// Properties of topic resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbTopicProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbTopicProperties()); set => this._property = value; } /// Value indicating if this topic requires duplicate detection. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? RequiresDuplicateDetection { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).RequiresDuplicateDetection; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).RequiresDuplicateDetection = value ?? default(bool); } + public bool? RequiresDuplicateDetection { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).RequiresDuplicateDetection; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).RequiresDuplicateDetection = value ?? default(bool); } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] @@ -179,60 +178,60 @@ public partial class SbTopic : /// Size of the topic, in bytes. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? SizeInByte { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).SizeInByte; } + public long? SizeInByte { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).SizeInByte; } /// Enumerates the possible values for the status of a messaging entity. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus)""); } + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).Status = value ?? null; } /// Number of subscriptions. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public int? SubscriptionCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).SubscriptionCount; } + public int? SubscriptionCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).SubscriptionCount; } /// Value that indicates whether the topic supports ordering. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public bool? SupportOrdering { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).SupportOrdering; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).SupportOrdering = value ?? default(bool); } + public bool? SupportOrdering { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).SupportOrdering; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).SupportOrdering = value ?? default(bool); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal)__proxyResource).Type; } /// The exact time the message was updated. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public global::System.DateTime? UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal)Property).UpdatedAt; } + public global::System.DateTime? UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)Property).UpdatedAt; } /// Creates an new instance. public SbTopic() @@ -255,12 +254,15 @@ public SbTopic() /// Description of topic resource. public partial interface ISbTopic : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResource { /// Last time the message was sent, or a request was received, for this topic. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Last time the message was sent, or a request was received, for this topic.", SerializedName = @"accessedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -271,6 +273,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.", SerializedName = @"autoDeleteOnIdle", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -279,6 +284,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of active messages in the queue, topic, or subscription.", SerializedName = @"activeMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -287,6 +295,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages that are dead lettered.", SerializedName = @"deadLetterMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -295,6 +306,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of scheduled messages.", SerializedName = @"scheduledMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -303,6 +317,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages transferred into dead letters.", SerializedName = @"transferDeadLetterMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -311,6 +328,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages transferred to another queue, topic, or subscription.", SerializedName = @"transferMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -319,6 +339,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Exact time the message was created.", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -330,6 +353,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.", SerializedName = @"defaultMessageTimeToLive", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -340,6 +366,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.", SerializedName = @"duplicateDetectionHistoryTimeWindow", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -348,6 +377,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether server-side batched operations are enabled.", SerializedName = @"enableBatchedOperations", PossibleTypes = new [] { typeof(bool) })] @@ -359,6 +391,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.", SerializedName = @"enableExpress", PossibleTypes = new [] { typeof(bool) })] @@ -369,6 +404,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether the topic to be partitioned across multiple message brokers is enabled.", SerializedName = @"enablePartitioning", PossibleTypes = new [] { typeof(bool) })] @@ -380,6 +418,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024.", SerializedName = @"maxMessageSizeInKilobytes", PossibleTypes = new [] { typeof(long) })] @@ -390,6 +431,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024.", SerializedName = @"maxSizeInMegabytes", PossibleTypes = new [] { typeof(int) })] @@ -398,6 +442,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value indicating if this topic requires duplicate detection.", SerializedName = @"requiresDuplicateDetection", PossibleTypes = new [] { typeof(bool) })] @@ -406,6 +453,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Size of the topic, in bytes.", SerializedName = @"sizeInBytes", PossibleTypes = new [] { typeof(long) })] @@ -414,14 +464,21 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible values for the status of a messaging entity.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + string Status { get; set; } /// Number of subscriptions. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of subscriptions.", SerializedName = @"subscriptionCount", PossibleTypes = new [] { typeof(int) })] @@ -430,6 +487,9 @@ public partial interface ISbTopic : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether the topic supports ordering.", SerializedName = @"supportOrdering", PossibleTypes = new [] { typeof(bool) })] @@ -437,55 +497,78 @@ public partial interface ISbTopic : /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// The exact time the message was updated. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The exact time the message was updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -494,7 +577,7 @@ public partial interface ISbTopic : } /// Description of topic resource. internal partial interface ISbTopicInternal : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IProxyResourceInternal { /// Last time the message was sent, or a request was received, for this topic. global::System.DateTime? AccessedAt { get; set; } @@ -503,7 +586,7 @@ internal partial interface ISbTopicInternal : /// global::System.TimeSpan? AutoDeleteOnIdle { get; set; } /// Message count details - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails CountDetail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails CountDetail { get; set; } /// Number of active messages in the queue, topic, or subscription. long? CountDetailActiveMessageCount { get; set; } /// Number of messages that are dead lettered. @@ -546,31 +629,34 @@ internal partial interface ISbTopicInternal : /// int? MaxSizeInMegabytes { get; set; } /// Properties of topic resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicProperties Property { get; set; } /// Value indicating if this topic requires duplicate detection. bool? RequiresDuplicateDetection { get; set; } /// Size of the topic, in bytes. long? SizeInByte { get; set; } /// Enumerates the possible values for the status of a messaging entity. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + string Status { get; set; } /// Number of subscriptions. int? SubscriptionCount { get; set; } /// Value that indicates whether the topic supports ordering. bool? SupportOrdering { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// The exact time the message was updated. global::System.DateTime? UpdatedAt { get; set; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopic.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopic.json.cs similarity index 90% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopic.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopic.json.cs index 7c7df221f0be..adf5133250af 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopic.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopic.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class SbTopic partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbTopic(json) : null; } @@ -77,9 +75,9 @@ internal SbTopic(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.Json { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbTopicProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbTopicProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } @@ -104,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicListResult.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicListResult.PowerShell.cs similarity index 75% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicListResult.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicListResult.PowerShell.cs index ee5b4997f885..082d06553750 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicListResult.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SbTopicListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SbTopicListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SbTopicListResult(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal SbTopicListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbTopicTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbTopicTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal SbTopicListResult(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbTopicTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbTopicTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicListResult.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicListResult.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicListResult.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicListResult.TypeConverter.cs index 99c16051ad3f..67bc0fa035d7 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicListResult.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicListResult.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicListResult.cs similarity index 75% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicListResult.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicListResult.cs index 9e43759019b7..da718f1f4fe8 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicListResult.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The response to the List Topics operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbTopicListResult : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResult, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResult, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResultInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class SbTopicListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic[] _value; + private System.Collections.Generic.List _value; /// Result of the List Topics operation. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public SbTopicListResult() @@ -46,6 +46,9 @@ public partial interface ISbTopicListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Link to the next set of results. Not empty if Value contains incomplete list of topics.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -54,10 +57,13 @@ public partial interface ISbTopicListResult : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result of the List Topics operation.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic) })] + System.Collections.Generic.List Value { get; set; } } /// The response to the List Topics operation. @@ -69,7 +75,7 @@ internal partial interface ISbTopicListResultInternal /// string NextLink { get; set; } /// Result of the List Topics operation. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicListResult.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicListResult.json.cs similarity index 89% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicListResult.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicListResult.json.cs index 50d10fbd17fa..b310c8434a4a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicListResult.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SbTopicListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbTopicListResult(json) : null; } @@ -77,8 +77,8 @@ internal SbTopicListResult(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbTopic.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic) (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbTopic.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicProperties.PowerShell.cs new file mode 100644 index 000000000000..75a644eb59bb --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicProperties.PowerShell.cs @@ -0,0 +1,332 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + + /// The Topic Properties definition. + [System.ComponentModel.TypeConverter(typeof(SbTopicPropertiesTypeConverter))] + public partial class SbTopicProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SbTopicProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SbTopicProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SbTopicProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CountDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("SizeInByte")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).SizeInByte = (long?) content.GetValueForProperty("SizeInByte",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).SizeInByte, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("AccessedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SubscriptionCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).SubscriptionCount = (int?) content.GetValueForProperty("SubscriptionCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).SubscriptionCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DefaultMessageTimeToLive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("MaxSizeInMegabytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).MaxSizeInMegabytes = (int?) content.GetValueForProperty("MaxSizeInMegabytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).MaxSizeInMegabytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMessageSizeInKilobytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).MaxMessageSizeInKilobytes = (long?) content.GetValueForProperty("MaxMessageSizeInKilobytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).MaxMessageSizeInKilobytes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("RequiresDuplicateDetection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).RequiresDuplicateDetection = (bool?) content.GetValueForProperty("RequiresDuplicateDetection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).RequiresDuplicateDetection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DuplicateDetectionHistoryTimeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("EnableBatchedOperations")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("SupportOrdering")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).SupportOrdering = (bool?) content.GetValueForProperty("SupportOrdering",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).SupportOrdering, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoDeleteOnIdle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("EnablePartitioning")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).EnablePartitioning = (bool?) content.GetValueForProperty("EnablePartitioning",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).EnablePartitioning, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableExpress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).EnableExpress = (bool?) content.GetValueForProperty("EnableExpress",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).EnableExpress, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CountDetailActiveMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailScheduledMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SbTopicProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CountDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetail = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails) content.GetValueForProperty("CountDetail",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetail, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("SizeInByte")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).SizeInByte = (long?) content.GetValueForProperty("SizeInByte",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).SizeInByte, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("AccessedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).AccessedAt = (global::System.DateTime?) content.GetValueForProperty("AccessedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).AccessedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SubscriptionCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).SubscriptionCount = (int?) content.GetValueForProperty("SubscriptionCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).SubscriptionCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DefaultMessageTimeToLive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).DefaultMessageTimeToLive = (global::System.TimeSpan?) content.GetValueForProperty("DefaultMessageTimeToLive",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).DefaultMessageTimeToLive, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("MaxSizeInMegabytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).MaxSizeInMegabytes = (int?) content.GetValueForProperty("MaxSizeInMegabytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).MaxSizeInMegabytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMessageSizeInKilobytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).MaxMessageSizeInKilobytes = (long?) content.GetValueForProperty("MaxMessageSizeInKilobytes",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).MaxMessageSizeInKilobytes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("RequiresDuplicateDetection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).RequiresDuplicateDetection = (bool?) content.GetValueForProperty("RequiresDuplicateDetection",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).RequiresDuplicateDetection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DuplicateDetectionHistoryTimeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).DuplicateDetectionHistoryTimeWindow = (global::System.TimeSpan?) content.GetValueForProperty("DuplicateDetectionHistoryTimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).DuplicateDetectionHistoryTimeWindow, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("EnableBatchedOperations")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).EnableBatchedOperations = (bool?) content.GetValueForProperty("EnableBatchedOperations",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).EnableBatchedOperations, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("SupportOrdering")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).SupportOrdering = (bool?) content.GetValueForProperty("SupportOrdering",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).SupportOrdering, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AutoDeleteOnIdle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).AutoDeleteOnIdle = (global::System.TimeSpan?) content.GetValueForProperty("AutoDeleteOnIdle",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).AutoDeleteOnIdle, (v) => v is global::System.TimeSpan _v ? _v : global::System.Xml.XmlConvert.ToTimeSpan( v.ToString() )); + } + if (content.Contains("EnablePartitioning")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).EnablePartitioning = (bool?) content.GetValueForProperty("EnablePartitioning",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).EnablePartitioning, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableExpress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).EnableExpress = (bool?) content.GetValueForProperty("EnableExpress",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).EnableExpress, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CountDetailActiveMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailActiveMessageCount = (long?) content.GetValueForProperty("CountDetailActiveMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailActiveMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailScheduledMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailScheduledMessageCount = (long?) content.GetValueForProperty("CountDetailScheduledMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailScheduledMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailTransferMessageCount = (long?) content.GetValueForProperty("CountDetailTransferMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailTransferMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("CountDetailTransferDeadLetterMessageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailTransferDeadLetterMessageCount = (long?) content.GetValueForProperty("CountDetailTransferDeadLetterMessageCount",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal)this).CountDetailTransferDeadLetterMessageCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The Topic Properties definition. + [System.ComponentModel.TypeConverter(typeof(SbTopicPropertiesTypeConverter))] + public partial interface ISbTopicProperties + + { + + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicProperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicProperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicProperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicProperties.TypeConverter.cs index d6dbc6d058d6..234ee1914b36 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicProperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicProperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicProperties.cs similarity index 82% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicProperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicProperties.cs index 8c74d05465bb..f929e3006d3f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicProperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The Topic Properties definition. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SbTopicProperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicProperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicProperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal { /// Backing field for property. @@ -31,31 +31,31 @@ public partial class SbTopicProperties : public global::System.TimeSpan? AutoDeleteOnIdle { get => this._autoDeleteOnIdle; set => this._autoDeleteOnIdle = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails _countDetail; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails _countDetail; /// Message count details [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails CountDetail { get => (this._countDetail = this._countDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetails()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails CountDetail { get => (this._countDetail = this._countDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetails()); } /// Number of active messages in the queue, topic, or subscription. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount; } + public long? CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount; } /// Number of messages that are dead lettered. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount; } + public long? CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount; } /// Number of scheduled messages. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount; } + public long? CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount; } /// Number of messages transferred into dead letters. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount; } + public long? CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount; } /// Number of messages transferred to another queue, topic, or subscription. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inlined)] - public long? CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferMessageCount; } + public long? CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferMessageCount; } /// Backing field for property. private global::System.DateTime? _createdAt; @@ -129,37 +129,37 @@ public partial class SbTopicProperties : public int? MaxSizeInMegabytes { get => this._maxSizeInMegabytes; set => this._maxSizeInMegabytes = value; } /// Internal Acessors for AccessedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal.AccessedAt { get => this._accessedAt; set { {_accessedAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal.AccessedAt { get => this._accessedAt; set { {_accessedAt = value;} } } /// Internal Acessors for CountDetail - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal.CountDetail { get => (this._countDetail = this._countDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetails()); set { {_countDetail = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal.CountDetail { get => (this._countDetail = this._countDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetails()); set { {_countDetail = value;} } } /// Internal Acessors for CountDetailActiveMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal.CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal.CountDetailActiveMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ActiveMessageCount = value; } /// Internal Acessors for CountDetailDeadLetterMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal.CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal.CountDetailDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).DeadLetterMessageCount = value; } /// Internal Acessors for CountDetailScheduledMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal.CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal.CountDetailScheduledMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).ScheduledMessageCount = value; } /// Internal Acessors for CountDetailTransferDeadLetterMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal.CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal.CountDetailTransferDeadLetterMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferDeadLetterMessageCount = value; } /// Internal Acessors for CountDetailTransferMessageCount - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal.CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetailsInternal)CountDetail).TransferMessageCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal.CountDetailTransferMessageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferMessageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetailsInternal)CountDetail).TransferMessageCount = value; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } /// Internal Acessors for SizeInByte - long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal.SizeInByte { get => this._sizeInByte; set { {_sizeInByte = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal.SizeInByte { get => this._sizeInByte; set { {_sizeInByte = value;} } } /// Internal Acessors for SubscriptionCount - int? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal.SubscriptionCount { get => this._subscriptionCount; set { {_subscriptionCount = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal.SubscriptionCount { get => this._subscriptionCount; set { {_subscriptionCount = value;} } } /// Internal Acessors for UpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicPropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicPropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } /// Backing field for property. private bool? _requiresDuplicateDetection; @@ -176,11 +176,11 @@ public partial class SbTopicProperties : public long? SizeInByte { get => this._sizeInByte; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? _status; + private string _status; /// Enumerates the possible values for the status of a messaging entity. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get => this._status; set => this._status = value; } + public string Status { get => this._status; set => this._status = value; } /// Backing field for property. private int? _subscriptionCount; @@ -217,6 +217,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Last time the message was sent, or a request was received, for this topic.", SerializedName = @"accessedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -227,6 +230,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.", SerializedName = @"autoDeleteOnIdle", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -235,6 +241,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of active messages in the queue, topic, or subscription.", SerializedName = @"activeMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -243,6 +252,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages that are dead lettered.", SerializedName = @"deadLetterMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -251,6 +263,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of scheduled messages.", SerializedName = @"scheduledMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -259,6 +274,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages transferred into dead letters.", SerializedName = @"transferDeadLetterMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -267,6 +285,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of messages transferred to another queue, topic, or subscription.", SerializedName = @"transferMessageCount", PossibleTypes = new [] { typeof(long) })] @@ -275,6 +296,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Exact time the message was created.", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -286,6 +310,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.", SerializedName = @"defaultMessageTimeToLive", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -296,6 +323,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.", SerializedName = @"duplicateDetectionHistoryTimeWindow", PossibleTypes = new [] { typeof(global::System.TimeSpan) })] @@ -304,6 +334,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether server-side batched operations are enabled.", SerializedName = @"enableBatchedOperations", PossibleTypes = new [] { typeof(bool) })] @@ -315,6 +348,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.", SerializedName = @"enableExpress", PossibleTypes = new [] { typeof(bool) })] @@ -325,6 +361,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether the topic to be partitioned across multiple message brokers is enabled.", SerializedName = @"enablePartitioning", PossibleTypes = new [] { typeof(bool) })] @@ -336,6 +375,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024.", SerializedName = @"maxMessageSizeInKilobytes", PossibleTypes = new [] { typeof(long) })] @@ -346,6 +388,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024.", SerializedName = @"maxSizeInMegabytes", PossibleTypes = new [] { typeof(int) })] @@ -354,6 +399,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value indicating if this topic requires duplicate detection.", SerializedName = @"requiresDuplicateDetection", PossibleTypes = new [] { typeof(bool) })] @@ -362,6 +410,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Size of the topic, in bytes.", SerializedName = @"sizeInBytes", PossibleTypes = new [] { typeof(long) })] @@ -370,14 +421,21 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible values for the status of a messaging entity.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + string Status { get; set; } /// Number of subscriptions. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of subscriptions.", SerializedName = @"subscriptionCount", PossibleTypes = new [] { typeof(int) })] @@ -386,6 +444,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether the topic supports ordering.", SerializedName = @"supportOrdering", PossibleTypes = new [] { typeof(bool) })] @@ -394,6 +455,9 @@ public partial interface ISbTopicProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The exact time the message was updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -411,7 +475,7 @@ internal partial interface ISbTopicPropertiesInternal /// global::System.TimeSpan? AutoDeleteOnIdle { get; set; } /// Message count details - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IMessageCountDetails CountDetail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMessageCountDetails CountDetail { get; set; } /// Number of active messages in the queue, topic, or subscription. long? CountDetailActiveMessageCount { get; set; } /// Number of messages that are dead lettered. @@ -458,7 +522,8 @@ internal partial interface ISbTopicPropertiesInternal /// Size of the topic, in bytes. long? SizeInByte { get; set; } /// Enumerates the possible values for the status of a messaging entity. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus? Status { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + string Status { get; set; } /// Number of subscriptions. int? SubscriptionCount { get; set; } /// Value that indicates whether the topic supports ordering. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicProperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicProperties.json.cs similarity index 90% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicProperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicProperties.json.cs index 6161812cd2d3..a401c826784e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SbTopicProperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SbTopicProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SbTopicProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SbTopicProperties(json) : null; } @@ -77,23 +77,23 @@ internal SbTopicProperties(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime { return; } - {_countDetail = If( json?.PropertyT("countDetails"), out var __jsonCountDetails) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.MessageCountDetails.FromJson(__jsonCountDetails) : CountDetail;} - {_sizeInByte = If( json?.PropertyT("sizeInBytes"), out var __jsonSizeInBytes) ? (long?)__jsonSizeInBytes : SizeInByte;} - {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} - {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtValue) ? __jsonUpdatedAtValue : UpdatedAt : UpdatedAt;} - {_accessedAt = If( json?.PropertyT("accessedAt"), out var __jsonAccessedAt) ? global::System.DateTime.TryParse((string)__jsonAccessedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonAccessedAtValue) ? __jsonAccessedAtValue : AccessedAt : AccessedAt;} - {_subscriptionCount = If( json?.PropertyT("subscriptionCount"), out var __jsonSubscriptionCount) ? (int?)__jsonSubscriptionCount : SubscriptionCount;} - {_defaultMessageTimeToLive = If( json?.PropertyT("defaultMessageTimeToLive"), out var __jsonDefaultMessageTimeToLive) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDefaultMessageTimeToLive ) : DefaultMessageTimeToLive;} - {_maxSizeInMegabytes = If( json?.PropertyT("maxSizeInMegabytes"), out var __jsonMaxSizeInMegabytes) ? (int?)__jsonMaxSizeInMegabytes : MaxSizeInMegabytes;} - {_maxMessageSizeInKilobytes = If( json?.PropertyT("maxMessageSizeInKilobytes"), out var __jsonMaxMessageSizeInKilobytes) ? (long?)__jsonMaxMessageSizeInKilobytes : MaxMessageSizeInKilobytes;} - {_requiresDuplicateDetection = If( json?.PropertyT("requiresDuplicateDetection"), out var __jsonRequiresDuplicateDetection) ? (bool?)__jsonRequiresDuplicateDetection : RequiresDuplicateDetection;} - {_duplicateDetectionHistoryTimeWindow = If( json?.PropertyT("duplicateDetectionHistoryTimeWindow"), out var __jsonDuplicateDetectionHistoryTimeWindow) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDuplicateDetectionHistoryTimeWindow ) : DuplicateDetectionHistoryTimeWindow;} - {_enableBatchedOperations = If( json?.PropertyT("enableBatchedOperations"), out var __jsonEnableBatchedOperations) ? (bool?)__jsonEnableBatchedOperations : EnableBatchedOperations;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_supportOrdering = If( json?.PropertyT("supportOrdering"), out var __jsonSupportOrdering) ? (bool?)__jsonSupportOrdering : SupportOrdering;} - {_autoDeleteOnIdle = If( json?.PropertyT("autoDeleteOnIdle"), out var __jsonAutoDeleteOnIdle) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonAutoDeleteOnIdle ) : AutoDeleteOnIdle;} - {_enablePartitioning = If( json?.PropertyT("enablePartitioning"), out var __jsonEnablePartitioning) ? (bool?)__jsonEnablePartitioning : EnablePartitioning;} - {_enableExpress = If( json?.PropertyT("enableExpress"), out var __jsonEnableExpress) ? (bool?)__jsonEnableExpress : EnableExpress;} + {_countDetail = If( json?.PropertyT("countDetails"), out var __jsonCountDetails) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MessageCountDetails.FromJson(__jsonCountDetails) : _countDetail;} + {_sizeInByte = If( json?.PropertyT("sizeInBytes"), out var __jsonSizeInBytes) ? (long?)__jsonSizeInBytes : _sizeInByte;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : _createdAt : _createdAt;} + {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtValue) ? __jsonUpdatedAtValue : _updatedAt : _updatedAt;} + {_accessedAt = If( json?.PropertyT("accessedAt"), out var __jsonAccessedAt) ? global::System.DateTime.TryParse((string)__jsonAccessedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonAccessedAtValue) ? __jsonAccessedAtValue : _accessedAt : _accessedAt;} + {_subscriptionCount = If( json?.PropertyT("subscriptionCount"), out var __jsonSubscriptionCount) ? (int?)__jsonSubscriptionCount : _subscriptionCount;} + {_defaultMessageTimeToLive = If( json?.PropertyT("defaultMessageTimeToLive"), out var __jsonDefaultMessageTimeToLive) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDefaultMessageTimeToLive ) : _defaultMessageTimeToLive;} + {_maxSizeInMegabytes = If( json?.PropertyT("maxSizeInMegabytes"), out var __jsonMaxSizeInMegabytes) ? (int?)__jsonMaxSizeInMegabytes : _maxSizeInMegabytes;} + {_maxMessageSizeInKilobytes = If( json?.PropertyT("maxMessageSizeInKilobytes"), out var __jsonMaxMessageSizeInKilobytes) ? (long?)__jsonMaxMessageSizeInKilobytes : _maxMessageSizeInKilobytes;} + {_requiresDuplicateDetection = If( json?.PropertyT("requiresDuplicateDetection"), out var __jsonRequiresDuplicateDetection) ? (bool?)__jsonRequiresDuplicateDetection : _requiresDuplicateDetection;} + {_duplicateDetectionHistoryTimeWindow = If( json?.PropertyT("duplicateDetectionHistoryTimeWindow"), out var __jsonDuplicateDetectionHistoryTimeWindow) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDuplicateDetectionHistoryTimeWindow ) : _duplicateDetectionHistoryTimeWindow;} + {_enableBatchedOperations = If( json?.PropertyT("enableBatchedOperations"), out var __jsonEnableBatchedOperations) ? (bool?)__jsonEnableBatchedOperations : _enableBatchedOperations;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_supportOrdering = If( json?.PropertyT("supportOrdering"), out var __jsonSupportOrdering) ? (bool?)__jsonSupportOrdering : _supportOrdering;} + {_autoDeleteOnIdle = If( json?.PropertyT("autoDeleteOnIdle"), out var __jsonAutoDeleteOnIdle) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonAutoDeleteOnIdle ) : _autoDeleteOnIdle;} + {_enablePartitioning = If( json?.PropertyT("enablePartitioning"), out var __jsonEnablePartitioning) ? (bool?)__jsonEnablePartitioning : _enablePartitioning;} + {_enableExpress = If( json?.PropertyT("enableExpress"), out var __jsonEnableExpress) ? (bool?)__jsonEnableExpress : _enableExpress;} AfterFromJson(json); } @@ -116,27 +116,27 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._countDetail ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._countDetail.ToJson(null,serializationMode) : null, "countDetails" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._sizeInByte ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNumber((long)this._sizeInByte) : null, "sizeInBytes" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._updatedAt ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._updatedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "updatedAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._accessedAt ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._accessedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "accessedAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._subscriptionCount ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNumber((int)this._subscriptionCount) : null, "subscriptionCount" ,container.Add ); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ServiceBusIdentity.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ServiceBusIdentity.PowerShell.cs index 4f0382a35786..c383b2daabcf 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ServiceBusIdentity.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ServiceBusIdentity.PowerShell.cs @@ -108,6 +108,10 @@ internal ServiceBusIdentity(global::System.Collections.IDictionary content) return; } // actually deserialize + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + } if (content.Contains("ResourceGroupName")) { ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); @@ -116,10 +120,6 @@ internal ServiceBusIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).NamespaceName = (string) content.GetValueForProperty("NamespaceName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).NamespaceName, global::System.Convert.ToString); } - if (content.Contains("SubscriptionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); - } if (content.Contains("QueueName")) { ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).QueueName = (string) content.GetValueForProperty("QueueName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).QueueName, global::System.Convert.ToString); @@ -142,7 +142,7 @@ internal ServiceBusIdentity(global::System.Collections.IDictionary content) } if (content.Contains("ConfigName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).ConfigName = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName?) content.GetValueForProperty("ConfigName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).ConfigName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).ConfigName = (string) content.GetValueForProperty("ConfigName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).ConfigName, global::System.Convert.ToString); } if (content.Contains("SubscriptionName")) { @@ -173,6 +173,10 @@ internal ServiceBusIdentity(global::System.Management.Automation.PSObject conten return; } // actually deserialize + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + } if (content.Contains("ResourceGroupName")) { ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); @@ -181,10 +185,6 @@ internal ServiceBusIdentity(global::System.Management.Automation.PSObject conten { ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).NamespaceName = (string) content.GetValueForProperty("NamespaceName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).NamespaceName, global::System.Convert.ToString); } - if (content.Contains("SubscriptionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); - } if (content.Contains("QueueName")) { ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).QueueName = (string) content.GetValueForProperty("QueueName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).QueueName, global::System.Convert.ToString); @@ -207,7 +207,7 @@ internal ServiceBusIdentity(global::System.Management.Automation.PSObject conten } if (content.Contains("ConfigName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).ConfigName = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName?) content.GetValueForProperty("ConfigName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).ConfigName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).ConfigName = (string) content.GetValueForProperty("ConfigName",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentityInternal)this).ConfigName, global::System.Convert.ToString); } if (content.Contains("SubscriptionName")) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ServiceBusIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ServiceBusIdentity.cs index 2654de47cf1b..1421641e22a9 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ServiceBusIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ServiceBusIdentity.cs @@ -28,11 +28,11 @@ public partial class ServiceBusIdentity : public string AuthorizationRuleName { get => this._authorizationRuleName; set => this._authorizationRuleName = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName? _configName; + private string _configName; /// The configuration name. Should always be "$default". [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName? ConfigName { get => this._configName; set => this._configName = value; } + public string ConfigName { get => this._configName; set => this._configName = value; } /// Backing field for property. private string _id; @@ -113,6 +113,9 @@ public partial interface IServiceBusIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Disaster Recovery configuration name", SerializedName = @"alias", PossibleTypes = new [] { typeof(string) })] @@ -121,6 +124,9 @@ public partial interface IServiceBusIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The authorization rule name.", SerializedName = @"authorizationRuleName", PossibleTypes = new [] { typeof(string) })] @@ -129,14 +135,21 @@ public partial interface IServiceBusIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The configuration name. Should always be ""$default"".", SerializedName = @"configName", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName? ConfigName { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("$default")] + string ConfigName { get; set; } /// Resource identity path [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource identity path", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -145,6 +158,9 @@ public partial interface IServiceBusIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The namespace name", SerializedName = @"namespaceName", PossibleTypes = new [] { typeof(string) })] @@ -153,6 +169,9 @@ public partial interface IServiceBusIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The PrivateEndpointConnection name", SerializedName = @"privateEndpointConnectionName", PossibleTypes = new [] { typeof(string) })] @@ -161,6 +180,9 @@ public partial interface IServiceBusIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The queue name.", SerializedName = @"queueName", PossibleTypes = new [] { typeof(string) })] @@ -169,6 +191,9 @@ public partial interface IServiceBusIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the Resource group within the Azure subscription.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] @@ -177,6 +202,9 @@ public partial interface IServiceBusIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The rule name.", SerializedName = @"ruleName", PossibleTypes = new [] { typeof(string) })] @@ -188,6 +216,9 @@ public partial interface IServiceBusIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] @@ -196,6 +227,9 @@ public partial interface IServiceBusIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The subscription name.", SerializedName = @"subscriptionName", PossibleTypes = new [] { typeof(string) })] @@ -204,6 +238,9 @@ public partial interface IServiceBusIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The topic name.", SerializedName = @"topicName", PossibleTypes = new [] { typeof(string) })] @@ -218,7 +255,8 @@ internal partial interface IServiceBusIdentityInternal /// The authorization rule name. string AuthorizationRuleName { get; set; } /// The configuration name. Should always be "$default". - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName? ConfigName { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("$default")] + string ConfigName { get; set; } /// Resource identity path string Id { get; set; } /// The namespace name diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ServiceBusIdentity.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ServiceBusIdentity.json.cs index a0ce43ed05fa..78f80ccb8099 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ServiceBusIdentity.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/ServiceBusIdentity.json.cs @@ -76,18 +76,18 @@ internal ServiceBusIdentity(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtim { return; } - {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} - {_namespaceName = If( json?.PropertyT("namespaceName"), out var __jsonNamespaceName) ? (string)__jsonNamespaceName : (string)NamespaceName;} - {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} - {_queueName = If( json?.PropertyT("queueName"), out var __jsonQueueName) ? (string)__jsonQueueName : (string)QueueName;} - {_authorizationRuleName = If( json?.PropertyT("authorizationRuleName"), out var __jsonAuthorizationRuleName) ? (string)__jsonAuthorizationRuleName : (string)AuthorizationRuleName;} - {_topicName = If( json?.PropertyT("topicName"), out var __jsonTopicName) ? (string)__jsonTopicName : (string)TopicName;} - {_privateEndpointConnectionName = If( json?.PropertyT("privateEndpointConnectionName"), out var __jsonPrivateEndpointConnectionName) ? (string)__jsonPrivateEndpointConnectionName : (string)PrivateEndpointConnectionName;} - {_alias = If( json?.PropertyT("alias"), out var __jsonAlias) ? (string)__jsonAlias : (string)Alias;} - {_configName = If( json?.PropertyT("configName"), out var __jsonConfigName) ? (string)__jsonConfigName : (string)ConfigName;} - {_subscriptionName = If( json?.PropertyT("subscriptionName"), out var __jsonSubscriptionName) ? (string)__jsonSubscriptionName : (string)SubscriptionName;} - {_ruleName = If( json?.PropertyT("ruleName"), out var __jsonRuleName) ? (string)__jsonRuleName : (string)RuleName;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)_subscriptionId;} + {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)_resourceGroupName;} + {_namespaceName = If( json?.PropertyT("namespaceName"), out var __jsonNamespaceName) ? (string)__jsonNamespaceName : (string)_namespaceName;} + {_queueName = If( json?.PropertyT("queueName"), out var __jsonQueueName) ? (string)__jsonQueueName : (string)_queueName;} + {_authorizationRuleName = If( json?.PropertyT("authorizationRuleName"), out var __jsonAuthorizationRuleName) ? (string)__jsonAuthorizationRuleName : (string)_authorizationRuleName;} + {_topicName = If( json?.PropertyT("topicName"), out var __jsonTopicName) ? (string)__jsonTopicName : (string)_topicName;} + {_privateEndpointConnectionName = If( json?.PropertyT("privateEndpointConnectionName"), out var __jsonPrivateEndpointConnectionName) ? (string)__jsonPrivateEndpointConnectionName : (string)_privateEndpointConnectionName;} + {_alias = If( json?.PropertyT("alias"), out var __jsonAlias) ? (string)__jsonAlias : (string)_alias;} + {_configName = If( json?.PropertyT("configName"), out var __jsonConfigName) ? (string)__jsonConfigName : (string)_configName;} + {_subscriptionName = If( json?.PropertyT("subscriptionName"), out var __jsonSubscriptionName) ? (string)__jsonSubscriptionName : (string)_subscriptionName;} + {_ruleName = If( json?.PropertyT("ruleName"), out var __jsonRuleName) ? (string)__jsonRuleName : (string)_ruleName;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } @@ -110,9 +110,9 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } + AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); AddIf( null != (((object)this._namespaceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._namespaceName.ToString()) : null, "namespaceName" ,container.Add ); - AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); AddIf( null != (((object)this._queueName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._queueName.ToString()) : null, "queueName" ,container.Add ); AddIf( null != (((object)this._authorizationRuleName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._authorizationRuleName.ToString()) : null, "authorizationRuleName" ,container.Add ); AddIf( null != (((object)this._topicName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._topicName.ToString()) : null, "topicName" ,container.Add ); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlFilter.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlFilter.PowerShell.cs similarity index 75% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlFilter.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlFilter.PowerShell.cs index 798100976076..5d8d1e9557d0 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlFilter.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlFilter.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -65,27 +65,27 @@ public partial class SqlFilter partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SqlFilter(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SqlFilter(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +113,21 @@ internal SqlFilter(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("SqlExpression")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)this).SqlExpression = (string) content.GetValueForProperty("SqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)this).SqlExpression, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)this).SqlExpression = (string) content.GetValueForProperty("SqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)this).SqlExpression, global::System.Convert.ToString); } if (content.Contains("CompatibilityLevel")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)this).CompatibilityLevel = (int?) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)this).CompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)this).CompatibilityLevel = (int?) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)this).CompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("RequiresPreprocessing")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)this).RequiresPreprocessing = (bool?) content.GetValueForProperty("RequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)this).RequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)this).RequiresPreprocessing = (bool?) content.GetValueForProperty("RequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)this).RequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -142,15 +142,15 @@ internal SqlFilter(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("SqlExpression")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)this).SqlExpression = (string) content.GetValueForProperty("SqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)this).SqlExpression, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)this).SqlExpression = (string) content.GetValueForProperty("SqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)this).SqlExpression, global::System.Convert.ToString); } if (content.Contains("CompatibilityLevel")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)this).CompatibilityLevel = (int?) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)this).CompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)this).CompatibilityLevel = (int?) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)this).CompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("RequiresPreprocessing")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)this).RequiresPreprocessing = (bool?) content.GetValueForProperty("RequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal)this).RequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)this).RequiresPreprocessing = (bool?) content.GetValueForProperty("RequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal)this).RequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlFilter.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlFilter.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlFilter.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlFilter.TypeConverter.cs index de4437da6d97..ed0cb4bef388 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlFilter.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlFilter.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlFilter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlFilter.cs similarity index 91% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlFilter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlFilter.cs index 22b267f20d55..cf97612924a2 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlFilter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlFilter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -12,8 +12,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Previe /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SqlFilter : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilterInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilterInternal { /// Backing field for property. @@ -55,6 +55,9 @@ public partial interface ISqlFilter : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.", SerializedName = @"compatibilityLevel", PossibleTypes = new [] { typeof(int) })] @@ -63,6 +66,9 @@ public partial interface ISqlFilter : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether the rule action requires preprocessing.", SerializedName = @"requiresPreprocessing", PossibleTypes = new [] { typeof(bool) })] @@ -71,6 +77,9 @@ public partial interface ISqlFilter : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The SQL expression. e.g. MyProperty='ABC'", SerializedName = @"sqlExpression", PossibleTypes = new [] { typeof(string) })] diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlFilter.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlFilter.json.cs similarity index 92% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlFilter.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlFilter.json.cs index 560255a50930..a7e0049e2bbc 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlFilter.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlFilter.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -56,13 +56,11 @@ public partial class SqlFilter partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SqlFilter(json) : null; } @@ -79,9 +77,9 @@ internal SqlFilter(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.Js { return; } - {_sqlExpression = If( json?.PropertyT("sqlExpression"), out var __jsonSqlExpression) ? (string)__jsonSqlExpression : (string)SqlExpression;} - {_compatibilityLevel = If( json?.PropertyT("compatibilityLevel"), out var __jsonCompatibilityLevel) ? (int?)__jsonCompatibilityLevel : CompatibilityLevel;} - {_requiresPreprocessing = If( json?.PropertyT("requiresPreprocessing"), out var __jsonRequiresPreprocessing) ? (bool?)__jsonRequiresPreprocessing : RequiresPreprocessing;} + {_sqlExpression = If( json?.PropertyT("sqlExpression"), out var __jsonSqlExpression) ? (string)__jsonSqlExpression : (string)_sqlExpression;} + {_compatibilityLevel = If( json?.PropertyT("compatibilityLevel"), out var __jsonCompatibilityLevel) ? (int?)__jsonCompatibilityLevel : _compatibilityLevel;} + {_requiresPreprocessing = If( json?.PropertyT("requiresPreprocessing"), out var __jsonRequiresPreprocessing) ? (bool?)__jsonRequiresPreprocessing : _requiresPreprocessing;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlRuleAction.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlRuleAction.PowerShell.cs similarity index 76% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlRuleAction.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlRuleAction.PowerShell.cs index 471ded5f7501..0ea445abd03e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlRuleAction.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlRuleAction.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -65,27 +65,27 @@ public partial class SqlRuleAction partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlRuleAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlRuleAction DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SqlRuleAction(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlRuleAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlRuleAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SqlRuleAction(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlRuleAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlRuleAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +113,21 @@ internal SqlRuleAction(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("SqlExpression")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).SqlExpression = (string) content.GetValueForProperty("SqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).SqlExpression, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).SqlExpression = (string) content.GetValueForProperty("SqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).SqlExpression, global::System.Convert.ToString); } if (content.Contains("CompatibilityLevel")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).CompatibilityLevel = (int?) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).CompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).CompatibilityLevel = (int?) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).CompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("RequiresPreprocessing")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).RequiresPreprocessing = (bool?) content.GetValueForProperty("RequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).RequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).RequiresPreprocessing = (bool?) content.GetValueForProperty("RequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).RequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -142,15 +142,15 @@ internal SqlRuleAction(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("SqlExpression")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).SqlExpression = (string) content.GetValueForProperty("SqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).SqlExpression, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).SqlExpression = (string) content.GetValueForProperty("SqlExpression",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).SqlExpression, global::System.Convert.ToString); } if (content.Contains("CompatibilityLevel")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).CompatibilityLevel = (int?) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).CompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).CompatibilityLevel = (int?) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).CompatibilityLevel, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("RequiresPreprocessing")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).RequiresPreprocessing = (bool?) content.GetValueForProperty("RequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)this).RequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).RequiresPreprocessing = (bool?) content.GetValueForProperty("RequiresPreprocessing",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)this).RequiresPreprocessing, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlRuleAction.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlRuleAction.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlRuleAction.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlRuleAction.TypeConverter.cs index 765073cc8abe..1a41d087a688 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlRuleAction.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlRuleAction.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlRuleAction ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlRuleAction ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlRuleAction).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlRuleAction).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlRuleAction.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlRuleAction.cs similarity index 69% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlRuleAction.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlRuleAction.cs index 72827e7e0295..128ed5398330 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlRuleAction.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlRuleAction.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -12,29 +12,28 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Previe /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SqlRuleAction : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlRuleAction, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlRuleActionInternal, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlRuleAction, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlRuleActionInternal, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction __action = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Action(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction __action = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Action(); /// /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. /// [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public int? CompatibilityLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)__action).CompatibilityLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)__action).CompatibilityLevel = value ?? default(int); } + public int? CompatibilityLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)__action).CompatibilityLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)__action).CompatibilityLevel = value ?? default(int); } /// Value that indicates whether the rule action requires preprocessing. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public bool? RequiresPreprocessing { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)__action).RequiresPreprocessing; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)__action).RequiresPreprocessing = value ?? default(bool); } + public bool? RequiresPreprocessing { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)__action).RequiresPreprocessing; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)__action).RequiresPreprocessing = value ?? default(bool); } /// SQL expression. e.g. MyProperty='ABC' [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string SqlExpression { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)__action).SqlExpression; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal)__action).SqlExpression = value ?? null; } + public string SqlExpression { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)__action).SqlExpression; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal)__action).SqlExpression = value ?? null; } /// Creates an new instance. public SqlRuleAction() @@ -57,13 +56,13 @@ public SqlRuleAction() /// Represents set of actions written in SQL language-based syntax that is performed against a ServiceBus.Messaging.BrokeredMessage public partial interface ISqlRuleAction : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAction + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAction { } /// Represents set of actions written in SQL language-based syntax that is performed against a ServiceBus.Messaging.BrokeredMessage internal partial interface ISqlRuleActionInternal : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IActionInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IActionInternal { } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlRuleAction.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlRuleAction.json.cs similarity index 94% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlRuleAction.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlRuleAction.json.cs index 446bbe75d2a1..90d635eb3a1c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/SqlRuleAction.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SqlRuleAction.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class SqlRuleAction partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlRuleAction. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlRuleAction. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlRuleAction. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlRuleAction. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISqlRuleAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISqlRuleAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SqlRuleAction(json) : null; } @@ -79,7 +79,7 @@ internal SqlRuleAction(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Jso { return; } - __action = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Action(json); + __action = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Action(json); AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Subnet.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Subnet.PowerShell.cs similarity index 85% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Subnet.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Subnet.PowerShell.cs index f5cc2b4e0ed2..4bfe8db81340 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Subnet.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Subnet.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Subnet partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnet DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnet DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Subnet(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnet DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnet DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Subnet(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnet FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnet FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,13 +111,13 @@ internal Subnet(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnetInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnetInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnetInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnetInternal)this).Id, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -132,7 +132,7 @@ internal Subnet(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnetInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnetInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnetInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnetInternal)this).Id, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Subnet.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Subnet.TypeConverter.cs similarity index 97% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Subnet.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Subnet.TypeConverter.cs index aaf323f3d156..436408934935 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Subnet.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Subnet.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnet ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnet ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnet).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnet).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Subnet.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Subnet.cs similarity index 86% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Subnet.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Subnet.cs index a3707b6473fb..9705a6b2b160 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Subnet.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Subnet.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Properties supplied for Subnet [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class Subnet : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnetInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnetInternal { /// Backing field for property. @@ -35,6 +35,9 @@ public partial interface ISubnet : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource ID of Virtual Network Subnet", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Subnet.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Subnet.json.cs similarity index 93% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Subnet.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Subnet.json.cs index bcfd2331c9cd..e91c3ec524bc 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/Subnet.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Subnet.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class Subnet partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnet. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnet. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnet. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISubnet FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnet. + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISubnet FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new Subnet(json) : null; } @@ -77,7 +75,7 @@ internal Subnet(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonO { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/SystemData.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SystemData.PowerShell.cs similarity index 66% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/SystemData.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SystemData.PowerShell.cs index 9454c556ceb0..80503b79d0e1 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/SystemData.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SystemData.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class SystemData partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SystemData(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SystemData(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystem /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,33 +111,33 @@ internal SystemData(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("CreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); } if (content.Contains("CreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); } if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("LastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); } if (content.Contains("LastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); } if (content.Contains("LastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -152,27 +152,27 @@ internal SystemData(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("CreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); } if (content.Contains("CreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); } if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("LastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); } if (content.Contains("LastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); } if (content.Contains("LastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/SystemData.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SystemData.TypeConverter.cs similarity index 97% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/SystemData.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SystemData.TypeConverter.cs index e85b30a5e406..2da8c7da5be0 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/SystemData.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SystemData.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/SystemData.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SystemData.cs similarity index 78% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/SystemData.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SystemData.cs index b4e3507b1714..d16b0366fe41 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/SystemData.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SystemData.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Metadata pertaining to creation and last modification of the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class SystemData : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemDataInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemDataInternal { /// Backing field for property. @@ -29,11 +29,11 @@ public partial class SystemData : public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? _createdByType; + private string _createdByType; /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? CreatedByType { get => this._createdByType; set => this._createdByType = value; } + public string CreatedByType { get => this._createdByType; set => this._createdByType = value; } /// Backing field for property. private global::System.DateTime? _lastModifiedAt; @@ -50,11 +50,11 @@ public partial class SystemData : public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? _lastModifiedByType; + private string _lastModifiedByType; /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } + public string LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } /// Creates an new instance. public SystemData() @@ -70,6 +70,9 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -78,6 +81,9 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] @@ -86,14 +92,21 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? CreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -102,6 +115,9 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] @@ -110,10 +126,14 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? LastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } } /// Metadata pertaining to creation and last modification of the resource. @@ -125,13 +145,15 @@ internal partial interface ISystemDataInternal /// The identity that created the resource. string CreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? CreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? LastModifiedAt { get; set; } /// The identity that last modified the resource. string LastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType? LastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/SystemData.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SystemData.json.cs similarity index 94% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/SystemData.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SystemData.json.cs index 93838a4a2262..4964c120d955 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/SystemData.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/SystemData.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SystemData partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new SystemData(json) : null; } @@ -77,12 +77,12 @@ internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.J { return; } - {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy;} - {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType;} - {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} - {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy;} - {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType;} - {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt;} + {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)_createdBy;} + {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)_createdByType;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : _createdAt : _createdAt;} + {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)_lastModifiedBy;} + {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)_lastModifiedByType;} + {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : _lastModifiedAt : _lastModifiedAt;} AfterFromJson(json); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResource.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResource.PowerShell.cs similarity index 72% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResource.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResource.PowerShell.cs index 98d98c3660d1..86b9a28fa920 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResource.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class TrackedResource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TrackedResource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TrackedResource(content); } @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITracke /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -128,29 +128,29 @@ internal TrackedResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -165,23 +165,23 @@ internal TrackedResource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResource.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs similarity index 97% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResource.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs index 4af0a8c5fa73..72cd1b27166c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResource.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResource.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResource.cs similarity index 69% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResource.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResource.cs index 2ba8cbfb4d00..d8f4f207e482 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResource.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResource.cs @@ -3,25 +3,25 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// The Resource definition. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class TrackedResource : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResource, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResource, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Resource(); /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Id; } /// Backing field for property. private string _location; @@ -31,28 +31,28 @@ public partial class TrackedResource : public string Location { get => this._location; set => this._location = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Type = value; } /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags _tag; /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.TrackedResourceTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.TrackedResourceTags()); set => this._tag = value; } /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Origin(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal)__resource).Type; } /// Creates an new instance. public TrackedResource() @@ -75,12 +75,15 @@ public TrackedResource() /// The Resource definition. public partial interface ITrackedResource : Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResource + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResource { /// The Geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = false, Description = @"The Geo-location where the resource lives", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] @@ -89,20 +92,23 @@ public partial interface ITrackedResource : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource tags", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags) })] - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags) })] + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags Tag { get; set; } } /// The Resource definition. internal partial interface ITrackedResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IResourceInternal { /// The Geo-location where the resource lives string Location { get; set; } /// Resource tags - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags Tag { get; set; } } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResource.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResource.json.cs similarity index 87% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResource.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResource.json.cs index ca73ce3d7e0b..f05315f7c589 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResource.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TrackedResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new TrackedResource(json) : null; } @@ -85,7 +85,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso return container; } __resource?.ToJson(container, serializationMode); - AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + } AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); AfterToJson(ref container); return container; @@ -103,9 +106,9 @@ internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.J { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.Resource(json); - {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.TrackedResourceTags.FromJson(__jsonTags) : Tag;} + __resource = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Resource(json); + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.TrackedResourceTags.FromJson(__jsonTags) : _tag;} AfterFromJson(json); } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResourceTags.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs similarity index 90% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResourceTags.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs index 5cc3b1419386..3a831a21fa3c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResourceTags.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class TrackedResourceTags partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TrackedResourceTags(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TrackedResourceTags(content); } @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITracke /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -132,7 +132,7 @@ internal TrackedResourceTags(global::System.Collections.IDictionary content) } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResourceTags.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs similarity index 97% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResourceTags.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs index ddad1d1932b3..abc78076976d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResourceTags.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResourceTags.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResourceTags.cs similarity index 79% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResourceTags.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResourceTags.cs index 3d70825cab52..1bc18b65c577 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResourceTags.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResourceTags.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Resource tags public partial class TrackedResourceTags : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTagsInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTagsInternal { /// Creates an new instance. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResourceTags.dictionary.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs similarity index 95% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResourceTags.dictionary.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs index 0badff38b497..6cec2adeddc7 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResourceTags.dictionary.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.TrackedResourceTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.TrackedResourceTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResourceTags.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResourceTags.json.cs similarity index 95% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResourceTags.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResourceTags.json.cs index 297c3b3ab509..cea72c160521 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api10/TrackedResourceTags.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/TrackedResourceTags.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TrackedResourceTags partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentity.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentity.PowerShell.cs similarity index 79% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentity.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentity.PowerShell.cs index 76377eb032a7..75b0670c6419 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentity.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentity.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class UserAssignedIdentity partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UserAssignedIdentity(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UserAssignedIdentity(content); } @@ -95,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -115,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -130,17 +128,17 @@ internal UserAssignedIdentity(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -155,11 +153,11 @@ internal UserAssignedIdentity(global::System.Management.Automation.PSObject cont // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentity.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentity.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentity.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentity.TypeConverter.cs index aff3264e1a5c..19e9b3c6bae0 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentity.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentity.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentity.cs similarity index 83% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentity.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentity.cs index e8e2393070a0..660e719420db 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentity.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; /// Recognized Dictionary value. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class UserAssignedIdentity : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentity, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentity, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityInternal { /// Backing field for property. @@ -22,10 +22,10 @@ public partial class UserAssignedIdentity : public string ClientId { get => this._clientId; } /// Internal Acessors for ClientId - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityInternal.ClientId { get => this._clientId; set { {_clientId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityInternal.ClientId { get => this._clientId; set { {_clientId = value;} } } /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } /// Backing field for property. private string _principalId; @@ -48,6 +48,9 @@ public partial interface IUserAssignedIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Client Id of user assigned identity", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -56,6 +59,9 @@ public partial interface IUserAssignedIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Principal Id of user assigned identity", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentity.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentity.json.cs similarity index 92% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentity.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentity.json.cs index aa69e15d2b52..dfab769c5b11 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentity.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentity.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class UserAssignedIdentity partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new UserAssignedIdentity(json) : null; } @@ -84,11 +84,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode ToJso { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._clientId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonString(this._clientId.ToString()) : null, "clientId" ,container.Add ); } @@ -108,8 +108,8 @@ internal UserAssignedIdentity(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runt { return; } - {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)PrincipalId;} - {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)ClientId;} + {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)_principalId;} + {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)_clientId;} AfterFromJson(json); } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentityProperties.PowerShell.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentityProperties.PowerShell.cs similarity index 81% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentityProperties.PowerShell.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentityProperties.PowerShell.cs index c2b9a1370fd6..b70e5b2a5bcb 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentityProperties.PowerShell.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentityProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -62,29 +62,27 @@ public partial class UserAssignedIdentityProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UserAssignedIdentityProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UserAssignedIdentityProperties(content); } @@ -94,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Pr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -114,7 +112,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -129,13 +127,13 @@ internal UserAssignedIdentityProperties(global::System.Collections.IDictionary c // actually deserialize if (content.Contains("UserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityPropertiesInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityPropertiesInternal)this).UserAssignedIdentity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityPropertiesInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityPropertiesInternal)this).UserAssignedIdentity, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -150,7 +148,7 @@ internal UserAssignedIdentityProperties(global::System.Management.Automation.PSO // actually deserialize if (content.Contains("UserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityPropertiesInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityPropertiesInternal)this).UserAssignedIdentity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityPropertiesInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityPropertiesInternal)this).UserAssignedIdentity, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentityProperties.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentityProperties.TypeConverter.cs similarity index 96% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentityProperties.TypeConverter.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentityProperties.TypeConverter.cs index e6d012dfae98..4a5dca5fb6d9 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentityProperties.TypeConverter.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentityProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentityProperties.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentityProperties.cs similarity index 85% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentityProperties.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentityProperties.cs index 572cbdd4973f..5e226f513dd2 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentityProperties.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentityProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotFormat] public partial class UserAssignedIdentityProperties : - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityProperties, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityProperties, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityPropertiesInternal { /// Backing field for property. @@ -33,6 +33,9 @@ public partial interface IUserAssignedIdentityProperties : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ARM ID of user Identity selected for encryption", SerializedName = @"userAssignedIdentity", PossibleTypes = new [] { typeof(string) })] diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentityProperties.json.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentityProperties.json.cs similarity index 93% rename from src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentityProperties.json.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentityProperties.json.cs index 3f63dc53e0eb..8aaad1861e26 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/Api20221001Preview/UserAssignedIdentityProperties.json.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/Models/UserAssignedIdentityProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; @@ -53,13 +53,13 @@ public partial class UserAssignedIdentityProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IUserAssignedIdentityProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IUserAssignedIdentityProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json ? new UserAssignedIdentityProperties(json) : null; } @@ -100,7 +100,7 @@ internal UserAssignedIdentityProperties(Microsoft.Azure.PowerShell.Cmdlets.Servi { return; } - {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentity"), out var __jsonUserAssignedIdentity) ? (string)__jsonUserAssignedIdentity : (string)UserAssignedIdentity;} + {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentity"), out var __jsonUserAssignedIdentity) ? (string)__jsonUserAssignedIdentity : (string)_userAssignedIdentity;} AfterFromJson(json); } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/ServiceBus.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/ServiceBus.cs index 54b64d2d791e..84b5b0f24a18 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/ServiceBus.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/api/ServiceBus.cs @@ -17,11 +17,11 @@ public partial class ServiceBus /// /// This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The Disaster Recovery configuration name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -30,7 +30,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsBreakPairing(string resourceGroupName, string namespaceName, string alias, string subscriptionId, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsBreakPairing(string subscriptionId, string resourceGroupName, string namespaceName, string alias, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -60,7 +60,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsBreakPairing_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsBreakPairing_Call (request, onOk,onDefault,eventListener,sender); } } @@ -76,7 +76,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsBreakPairingViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsBreakPairingViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -87,14 +87,14 @@ public partial class ServiceBus var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var alias = _match.Groups["alias"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -119,11 +119,13 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsBreakPairing_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsBreakPairing_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -133,7 +135,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsBreakPairing_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsBreakPairing_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -144,6 +146,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -157,7 +160,7 @@ public partial class ServiceBus default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -176,19 +179,20 @@ public partial class ServiceBus /// Validation method for method. Call this like the actual call, but you /// will get validation events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The Disaster Recovery configuration name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsBreakPairing_Validate(string resourceGroupName, string namespaceName, string alias, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsBreakPairing_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -198,25 +202,25 @@ public partial class ServiceBus await eventListener.AssertNotNull(nameof(alias),alias); await eventListener.AssertMinimumLength(nameof(alias),alias,1); await eventListener.AssertMaximumLength(nameof(alias),alias,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); } } /// Check the give namespace name availability. - /// Name of the Resource group within the Azure subscription. - /// The namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name /// Parameters to check availability of the given namespace name /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCheckNameAvailability(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCheckNameAvailability(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -244,11 +248,11 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsCheckNameAvailability_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsCheckNameAvailability_Call (request, onOk,onDefault,eventListener,sender); } } @@ -260,10 +264,11 @@ public partial class ServiceBus /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCheckNameAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCheckNameAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -274,13 +279,71 @@ public partial class ServiceBus var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/disasterRecoveryConfigs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/CheckNameAvailability'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/CheckNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsCheckNameAvailability_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Check the give namespace name availability. + /// + /// Parameters to check availability of the given namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCheckNameAvailabilityViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/disasterRecoveryConfigs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs'"); + } + + // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -294,6 +357,56 @@ public partial class ServiceBus + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsCheckNameAvailabilityWithResult_Call (request, eventListener,sender); + } + } + + /// Check the give namespace name availability. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Json string supplied to the DisasterRecoveryConfigsCheckNameAvailability operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCheckNameAvailabilityViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/CheckNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object @@ -303,16 +416,175 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsCheckNameAvailability_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsCheckNameAvailability_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Check the give namespace name availability. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Json string supplied to the DisasterRecoveryConfigsCheckNameAvailability operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCheckNameAvailabilityViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/CheckNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsCheckNameAvailabilityWithResult_Call (request, eventListener,sender); + } + } + + /// Check the give namespace name availability. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Parameters to check availability of the given namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCheckNameAvailabilityWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/CheckNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsCheckNameAvailabilityWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCheckNameAvailabilityWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CheckNameAvailabilityResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). @@ -323,7 +595,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCheckNameAvailability_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCheckNameAvailability_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -334,6 +606,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -341,13 +614,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CheckNameAvailabilityResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CheckNameAvailabilityResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -366,37 +639,37 @@ public partial class ServiceBus /// Validation method for method. Call this like the actual call, /// but you will get validation events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name /// Parameters to check availability of the given namespace name /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCheckNameAvailability_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCheckNameAvailability_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Creates or updates a new Alias(Disaster Recovery configuration) + /// Update a new Alias(Disaster Recovery configuration) + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The Disaster Recovery configuration name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// Parameters required to create an Alias(Disaster Recovery configuration) /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 201 (Created). @@ -404,10 +677,11 @@ public partial class ServiceBus /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCreateOrUpdate(string resourceGroupName, string namespaceName, string alias, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -436,15 +710,15 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); } } - /// Creates or updates a new Alias(Disaster Recovery configuration) + /// Update a new Alias(Disaster Recovery configuration) /// /// Parameters required to create an Alias(Disaster Recovery configuration) /// a delegate that is called when the remote service returns 200 (OK). @@ -453,10 +727,11 @@ public partial class ServiceBus /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -471,10 +746,10 @@ public partial class ServiceBus } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var alias = _match.Groups["alias"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -498,38 +773,320 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); } } - /// - /// Actual wire call for method. - /// - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Update a new Alias(Disaster Recovery configuration) + /// + /// Parameters required to create an Alias(Disaster Recovery configuration) /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a new Alias(Disaster Recovery configuration) + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The Disaster Recovery configuration name + /// Json string supplied to the DisasterRecoveryConfigsCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string alias, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Update a new Alias(Disaster Recovery configuration) + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The Disaster Recovery configuration name + /// Json string supplied to the DisasterRecoveryConfigsCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string alias, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a new Alias(Disaster Recovery configuration) + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The Disaster Recovery configuration name + /// Parameters required to create an Alias(Disaster Recovery configuration) + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ArmDisasterRecovery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + throw new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException(_response); + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try { var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -537,7 +1094,7 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ArmDisasterRecovery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ArmDisasterRecovery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } case global::System.Net.HttpStatusCode.Created: @@ -549,7 +1106,7 @@ public partial class ServiceBus default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -568,20 +1125,21 @@ public partial class ServiceBus /// Validation method for method. Call this like the actual call, but /// you will get validation events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The Disaster Recovery configuration name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// Parameters required to create an Alias(Disaster Recovery configuration) /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCreateOrUpdate_Validate(string resourceGroupName, string namespaceName, string alias, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -591,18 +1149,17 @@ public partial class ServiceBus await eventListener.AssertNotNull(nameof(alias),alias); await eventListener.AssertMinimumLength(nameof(alias),alias,1); await eventListener.AssertMaximumLength(nameof(alias),alias,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } /// Deletes an Alias(Disaster Recovery configuration) + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The Disaster Recovery configuration name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled @@ -612,7 +1169,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsDelete(string resourceGroupName, string namespaceName, string alias, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsDelete(string subscriptionId, string resourceGroupName, string namespaceName, string alias, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -641,7 +1198,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } @@ -656,7 +1213,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -671,10 +1228,10 @@ public partial class ServiceBus } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var alias = _match.Groups["alias"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -698,11 +1255,11 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). @@ -713,7 +1270,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -724,6 +1281,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -743,7 +1301,7 @@ public partial class ServiceBus default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -762,19 +1320,20 @@ public partial class ServiceBus /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The Disaster Recovery configuration name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsDelete_Validate(string resourceGroupName, string namespaceName, string alias, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsDelete_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -784,28 +1343,28 @@ public partial class ServiceBus await eventListener.AssertNotNull(nameof(alias),alias); await eventListener.AssertMinimumLength(nameof(alias),alias,1); await eventListener.AssertMaximumLength(nameof(alias),alias,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); } } /// /// Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The Disaster Recovery configuration name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// Parameters required to create an Alias(Disaster Recovery configuration) /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsFailOver(string resourceGroupName, string namespaceName, string alias, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsFailOver(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -835,11 +1394,11 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsFailOver_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsFailOver_Call (request, onOk,onDefault,eventListener,sender); } } @@ -853,10 +1412,11 @@ public partial class ServiceBus /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsFailOverViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsFailOverViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -867,14 +1427,14 @@ public partial class ServiceBus var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var alias = _match.Groups["alias"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -899,25 +1459,80 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsFailOver_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsFailOver_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. - /// + /// + /// Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The Disaster Recovery configuration name + /// Json string supplied to the DisasterRecoveryConfigsFailOver operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsFailOverViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string alias, global::System.String jsonString, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "/failover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsFailOver_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsFailOver_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsFailOver_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -928,6 +1543,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -941,7 +1557,7 @@ public partial class ServiceBus default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -960,20 +1576,21 @@ public partial class ServiceBus /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The Disaster Recovery configuration name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// Parameters required to create an Alias(Disaster Recovery configuration) /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsFailOver_Validate(string resourceGroupName, string namespaceName, string alias, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsFailOver_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -983,7 +1600,6 @@ public partial class ServiceBus await eventListener.AssertNotNull(nameof(alias),alias); await eventListener.AssertMinimumLength(nameof(alias),alias,1); await eventListener.AssertMaximumLength(nameof(alias),alias,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } @@ -992,11 +1608,11 @@ public partial class ServiceBus /// /// Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The Disaster Recovery configuration name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1005,7 +1621,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGet(string resourceGroupName, string namespaceName, string alias, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGet(string subscriptionId, string resourceGroupName, string namespaceName, string alias, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -1034,17 +1650,17 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsGet_Call (request, onOk,onDefault,eventListener,sender); } } /// Gets an authorization rule for a namespace by rule name. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The Disaster Recovery configuration name /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1053,7 +1669,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetAuthorizationRule(string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -1084,7 +1700,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsGetAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsGetAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); } } @@ -1098,7 +1714,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetAuthorizationRuleViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetAuthorizationRuleViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -1113,11 +1729,11 @@ public partial class ServiceBus } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var alias = _match.Groups["alias"].Value; var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -1143,12 +1759,179 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsGetAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsGetAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets an authorization rule for a namespace by rule name. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetAuthorizationRuleViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "/authorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsGetAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// Gets an authorization rule for a namespace by rule name. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The Disaster Recovery configuration name + /// The authorization rule name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetAuthorizationRuleWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsGetAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetAuthorizationRuleWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). @@ -1159,7 +1942,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1170,6 +1953,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1177,13 +1961,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1202,20 +1986,21 @@ public partial class ServiceBus /// Validation method for method. Call this like the actual call, /// but you will get validation events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The Disaster Recovery configuration name /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -1228,7 +2013,6 @@ public partial class ServiceBus await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); } } @@ -1244,7 +2028,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -1259,10 +2043,10 @@ public partial class ServiceBus } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var alias = _match.Groups["alias"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -1286,149 +2070,81 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// + /// Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace + /// + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ArmDisasterRecovery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'"); } - } - } - /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The Disaster Recovery configuration name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGet_Validate(string resourceGroupName, string namespaceName, string alias, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(alias),alias); - await eventListener.AssertMinimumLength(nameof(alias),alias,1); - await eventListener.AssertMaximumLength(nameof(alias),alias,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// Gets all Alias(Disaster Recovery configurations) - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsList(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-10-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/disasterRecoveryConfigs" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.DisasterRecoveryConfigsList_Call(request,onOk,onDefault,eventListener,sender); + return await this.DisasterRecoveryConfigsGetWithResult_Call (request, eventListener,sender); } } - /// Gets the authorization rules for a namespace. + /// + /// Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The Disaster Recovery configuration name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListAuthorizationRules(string resourceGroupName, string namespaceName, string alias, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -1444,84 +2160,86 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(namespaceName) + "/disasterRecoveryConfigs/" + global::System.Uri.EscapeDataString(alias) - + "/authorizationRules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.DisasterRecoveryConfigsListAuthorizationRules_Call(request,onOk,onDefault,eventListener,sender); + return await this.DisasterRecoveryConfigsGetWithResult_Call (request, eventListener,sender); } } - /// Gets the authorization rules for a namespace. - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListAuthorizationRulesViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { - var apiVersion = @"2022-10-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/authorizationRules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ArmDisasterRecovery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules'"); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var alias = _match.Groups["alias"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName - + "/disasterRecoveryConfigs/" - + alias - + "/authorizationRules" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.DisasterRecoveryConfigsListAuthorizationRules_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -1531,7 +2249,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListAuthorizationRules_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1542,6 +2260,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1549,13 +2268,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ArmDisasterRecovery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1571,22 +2290,23 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The Disaster Recovery configuration name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListAuthorizationRules_Validate(string resourceGroupName, string namespaceName, string alias, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -1596,17 +2316,60 @@ public partial class ServiceBus await eventListener.AssertNotNull(nameof(alias),alias); await eventListener.AssertMinimumLength(nameof(alias),alias,1); await eventListener.AssertMaximumLength(nameof(alias),alias,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); } } - /// Gets the primary and secondary connection strings for the namespace. + /// Gets all Alias(Disaster Recovery configurations) + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name - /// The Disaster Recovery configuration name - /// The authorization rule name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsList(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the authorization rules for a namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The Disaster Recovery configuration name /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1615,7 +2378,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListKeys(string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListAuthorizationRules(string subscriptionId, string resourceGroupName, string namespaceName, string alias, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -1631,9 +2394,7 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(namespaceName) + "/disasterRecoveryConfigs/" + global::System.Uri.EscapeDataString(alias) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) - + "/listKeys" + + "/authorizationRules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1642,16 +2403,16 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsListKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsListAuthorizationRules_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets the primary and secondary connection strings for the namespace. + /// Gets the authorization rules for a namespace. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -1661,7 +2422,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListKeysViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListAuthorizationRulesViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -1669,18 +2430,17 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/authorizationRules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}/listKeys'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var alias = _match.Groups["alias"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -1691,9 +2451,7 @@ public partial class ServiceBus + namespaceName + "/disasterRecoveryConfigs/" + alias - + "/authorizationRules/" - + authorizationRuleName - + "/listKeys" + + "/authorizationRules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1702,153 +2460,181 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsListKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsListAuthorizationRules_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Gets the authorization rules for a namespace. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListAuthorizationRulesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/authorizationRules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules'"); + } - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "/authorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsListAuthorizationRulesWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. - /// + /// Gets the authorization rules for a namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The Disaster Recovery configuration name - /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListKeys_Validate(string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(alias),alias); - await eventListener.AssertMinimumLength(nameof(alias),alias,1); - await eventListener.AssertMaximumLength(nameof(alias),alias,50); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// Gets all Alias(Disaster Recovery configurations) - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListAuthorizationRulesWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/disasterRecoveryConfigs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName - + "/disasterRecoveryConfigs" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "/authorizationRules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.DisasterRecoveryConfigsList_Call(request,onOk,onDefault,eventListener,sender); + return await this.DisasterRecoveryConfigsListAuthorizationRulesWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListAuthorizationRulesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -1858,7 +2644,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListAuthorizationRules_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1869,6 +2655,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1876,13 +2663,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ArmDisasterRecoveryListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1898,40 +2685,42 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The Disaster Recovery configuration name /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsList_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListAuthorizationRules_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(alias),alias); + await eventListener.AssertMinimumLength(nameof(alias),alias,1); + await eventListener.AssertMaximumLength(nameof(alias),alias,50); } } - /// - /// This operation Completes Migration of entities by pointing the connection strings to Premium namespace and any entities - /// created after the operation will be under Premium Namespace. CompleteMigration operation will fail when entity migration - /// is in-progress. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name + /// Gets the primary and secondary connection strings for the namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The Disaster Recovery configuration name + /// The authorization rule name. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1940,9 +2729,8 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MigrationConfigsCompleteMigration(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListKeys(string subscriptionId, string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { - var configName = @"$default"; var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) @@ -1955,9 +2743,11 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/migrationConfigurations/" - + global::System.Uri.EscapeDataString(configName) - + "/upgrade" + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/listKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1971,15 +2761,11 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.MigrationConfigsCompleteMigration_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsListKeys_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// This operation Completes Migration of entities by pointing the connection strings to Premium namespace and any entities - /// created after the operation will be under Premium Namespace. CompleteMigration operation will fail when entity migration - /// is in-progress. - /// + /// Gets the primary and secondary connection strings for the namespace. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -1989,7 +2775,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MigrationConfigsCompleteMigrationViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListKeysViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -1997,17 +2783,18 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/migrationConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}/upgrade'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var configName = _match.Groups["configName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var alias = _match.Groups["alias"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -2016,9 +2803,11 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/migrationConfigurations/" - + configName - + "/upgrade" + + "/disasterRecoveryConfigs/" + + alias + + "/authorizationRules/" + + authorizationRuleName + + "/listKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2032,104 +2821,83 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.MigrationConfigsCompleteMigration_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsListKeys_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Gets the primary and secondary connection strings for the namespace. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MigrationConfigsCompleteMigration_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListKeysViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}'"); } - } - } - /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task MigrationConfigsCompleteMigration_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "/authorizationRules/" + + authorizationRuleName + + "/listKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsListKeysWithResult_Call (request, eventListener,sender); } } - /// - /// Creates Migration configuration and starts migration of entities from Standard to Premium namespace - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name + /// Gets the primary and secondary connection strings for the namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters required to create Migration Configuration - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The Disaster Recovery configuration name + /// The authorization rule name. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MigrationConfigsCreateAndStartMigration(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListKeysWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { - var configName = @"$default"; var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) @@ -2142,95 +2910,91 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/migrationConfigurations/" - + global::System.Uri.EscapeDataString(configName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/listKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.MigrationConfigsCreateAndStartMigration_Call(request,onOk,onDefault,eventListener,sender); + return await this.DisasterRecoveryConfigsListKeysWithResult_Call (request, eventListener,sender); } } /// - /// Creates Migration configuration and starts migration of entities from Standard to Premium namespace + /// Actual wire call for method. /// - /// - /// Parameters required to create Migration Configuration - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MigrationConfigsCreateAndStartMigrationViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListKeysWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { - var apiVersion = @"2022-10-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/migrationConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}'"); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var configName = _match.Groups["configName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName - + "/migrationConfigurations/" - + configName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.MigrationConfigsCreateAndStartMigration_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -2240,7 +3004,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MigrationConfigsCreateAndStartMigration_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2251,105 +3015,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_originalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2357,13 +3023,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.MigrationConfigProperties.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2379,41 +3045,42 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but - /// you will get validation events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters required to create Migration Configuration + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The Disaster Recovery configuration name + /// The authorization rule name. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MigrationConfigsCreateAndStartMigration_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListKeys_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(alias),alias); + await eventListener.AssertMinimumLength(nameof(alias),alias,1); + await eventListener.AssertMaximumLength(nameof(alias),alias,50); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); } } - /// Deletes a MigrationConfiguration - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// Gets all Alias(Disaster Recovery configurations) + /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -2421,23 +3088,33 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MigrationConfigsDelete(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { - var configName = @"$default"; var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/disasterRecoveryConfigs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/migrationConfigurations/" - + global::System.Uri.EscapeDataString(configName) + + namespaceName + + "/disasterRecoveryConfigs" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2446,27 +3123,24 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.MigrationConfigsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes a MigrationConfiguration + /// Gets all Alias(Disaster Recovery configurations) /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MigrationConfigsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -2474,17 +3148,16 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/migrationConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/disasterRecoveryConfigs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var configName = _match.Groups["configName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -2493,123 +3166,37 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/migrationConfigurations/" - + configName + + "/disasterRecoveryConfigs" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.MigrationConfigsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task MigrationConfigsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + return await this.DisasterRecoveryConfigsListWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name + /// Gets all Alias(Disaster Recovery configurations) /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task MigrationConfigsDelete_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// Retrieves Migration Config /// Name of the Resource group within the Azure subscription. /// The namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MigrationConfigsGet(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { - var configName = @"$default"; var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) @@ -2622,82 +3209,87 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/migrationConfigurations/" - + global::System.Uri.EscapeDataString(configName) + + "/disasterRecoveryConfigs" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.MigrationConfigsGet_Call(request,onOk,onDefault,eventListener,sender); + return await this.DisasterRecoveryConfigsListWithResult_Call (request, eventListener,sender); } } - /// Retrieves Migration Config - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MigrationConfigsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { - var apiVersion = @"2022-10-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/migrationConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ArmDisasterRecoveryListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}'"); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var configName = _match.Groups["configName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName - + "/migrationConfigurations/" - + configName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.MigrationConfigsGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -2707,7 +3299,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MigrationConfigsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2718,6 +3310,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2725,13 +3318,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.MigrationConfigProperties.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ArmDisasterRecoveryListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2747,36 +3340,40 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MigrationConfigsGet_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsList_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); } } - /// Gets all migrationConfigurations - /// Name of the Resource group within the Azure subscription. - /// The namespace name + /// + /// This operation Completes Migration of entities by pointing the connection strings to Premium namespace and any entities + /// created after the operation will be under Premium Namespace. CompleteMigration operation will fail when entity migration + /// is in-progress. + /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -2785,8 +3382,9 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MigrationConfigsList(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MigrationConfigsCompleteMigration(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var configName = @"$default"; var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) @@ -2799,7 +3397,9 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/migrationConfigurations" + + "/migrationConfigurations/" + + global::System.Uri.EscapeDataString(configName) + + "/upgrade" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2808,16 +3408,20 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.MigrationConfigsList_Call(request,onOk,onDefault,eventListener,sender); + await this.MigrationConfigsCompleteMigration_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets all migrationConfigurations + /// + /// This operation Completes Migration of entities by pointing the connection strings to Premium namespace and any entities + /// created after the operation will be under Premium Namespace. CompleteMigration operation will fail when entity migration + /// is in-progress. + /// /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -2827,7 +3431,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MigrationConfigsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MigrationConfigsCompleteMigrationViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -2835,16 +3439,17 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/migrationConfigurations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/migrationConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var configName = _match.Groups["configName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -2853,7 +3458,9 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/migrationConfigurations" + + "/migrationConfigurations/" + + configName + + "/upgrade" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2862,16 +3469,16 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.MigrationConfigsList_Call(request,onOk,onDefault,eventListener,sender); + await this.MigrationConfigsCompleteMigration_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -2881,7 +3488,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MigrationConfigsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MigrationConfigsCompleteMigration_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2892,6 +3499,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2899,13 +3507,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.MigrationConfigListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2921,45 +3529,49 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MigrationConfigsList_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MigrationConfigsCompleteMigration_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); } } - /// This operation reverts Migration - /// Name of the Resource group within the Azure subscription. - /// The namespace name + /// + /// Update Migration configuration and starts migration of entities from Standard to Premium namespace + /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Parameters required to create Migration Configuration /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MigrationConfigsRevert(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MigrationConfigsCreateAndStartMigration(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var configName = @"$default"; var apiVersion = @"2022-10-01-preview"; @@ -2976,7 +3588,6 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(namespaceName) + "/migrationConfigurations/" + global::System.Uri.EscapeDataString(configName) - + "/revert" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2985,26 +3596,34 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.MigrationConfigsRevert_Call(request,onOk,onDefault,eventListener,sender); + await this.MigrationConfigsCreateAndStartMigration_Call (request, onOk,onDefault,eventListener,sender); } } - /// This operation reverts Migration + /// + /// Update Migration configuration and starts migration of entities from Standard to Premium namespace + /// /// + /// Parameters required to create Migration Configuration /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MigrationConfigsRevertViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MigrationConfigsCreateAndStartMigrationViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -3015,14 +3634,14 @@ public partial class ServiceBus var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/migrationConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}/revert'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var configName = _match.Groups["configName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3033,7 +3652,6 @@ public partial class ServiceBus + namespaceName + "/migrationConfigurations/" + configName - + "/revert" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3042,137 +3660,89 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.MigrationConfigsRevert_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task MigrationConfigsRevert_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MigrationConfigsCreateAndStartMigration_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Update Migration configuration and starts migration of entities from Standard to Premium namespace /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task MigrationConfigsRevert_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// Check the give namespace name availability. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Parameters to check availability of the given namespace name - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// + /// Parameters required to create Migration Configuration /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesCheckNameAvailability(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MigrationConfigsCreateAndStartMigrationViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/migrationConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var configName = _match.Groups["configName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.ServiceBus/CheckNameAvailability" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/migrationConfigurations/" + + configName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesCheckNameAvailability_Call(request,onOk,onDefault,eventListener,sender); + return await this.MigrationConfigsCreateAndStartMigrationWithResult_Call (request, eventListener,sender); } } - /// Check the give namespace name availability. - /// - /// Parameters to check availability of the given namespace name + /// + /// Update Migration configuration and starts migration of entities from Standard to Premium namespace + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Json string supplied to the MigrationConfigsCreateAndStartMigration operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -3181,27 +3751,23 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesCheckNameAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MigrationConfigsCreateAndStartMigrationViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var configName = @"$default"; var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ServiceBus$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/CheckNameAvailability'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId - + "/providers/Microsoft.ServiceBus/CheckNameAvailability" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/migrationConfigurations/" + + global::System.Uri.EscapeDataString(configName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3210,108 +3776,36 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesCheckNameAvailability_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task NamespacesCheckNameAvailability_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CheckNameAvailabilityResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + await this.MigrationConfigsCreateAndStartMigration_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Update Migration configuration and starts migration of entities from Standard to Premium namespace /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters to check availability of the given namespace name - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task NamespacesCheckNameAvailability_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - - /// - /// Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation - /// is idempotent. - /// /// Name of the Resource group within the Azure subscription. - /// The namespace name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Parameters supplied to create a namespace resource. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// The namespace name + /// Json string supplied to the MigrationConfigsCreateAndStartMigration operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MigrationConfigsCreateAndStartMigrationViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var configName = @"$default"; var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) @@ -3324,44 +3818,47 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) + + "/migrationConfigurations/" + + global::System.Uri.EscapeDataString(configName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + return await this.MigrationConfigsCreateAndStartMigrationWithResult_Call (request, eventListener,sender); } } - /// Creates or updates an authorization rule for a namespace. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The authorization rule name. + /// + /// Update Migration configuration and starts migration of entities from Standard to Premium namespace + /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The shared access authorization rule. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Parameters required to create Migration Configuration /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateAuthorizationRule(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MigrationConfigsCreateAndStartMigrationWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { + var configName = @"$default"; var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) @@ -3374,92 +3871,184 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/AuthorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/migrationConfigurations/" + + global::System.Uri.EscapeDataString(configName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesCreateOrUpdateAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + return await this.MigrationConfigsCreateAndStartMigrationWithResult_Call (request, eventListener,sender); } } - /// Creates or updates an authorization rule for a namespace. - /// - /// The shared access authorization rule. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateAuthorizationRuleViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MigrationConfigsCreateAndStartMigrationWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { - var apiVersion = @"2022-10-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + global::System.Net.Http.HttpResponseMessage _response = null; + try { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'"); - } + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName - + "/AuthorizationRules/" - + authorizationRuleName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // drop the old response + _response?.Dispose(); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.NamespacesCreateOrUpdateAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MigrationConfigProperties.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). @@ -3470,7 +4059,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MigrationConfigsCreateAndStartMigration_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3479,8 +4068,100 @@ public partial class ServiceBus { var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3488,13 +4169,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MigrationConfigProperties.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3510,45 +4191,41 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The authorization rule name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The shared access authorization rule. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Parameters required to create Migration Configuration /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MigrationConfigsCreateAndStartMigration_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Create or update NetworkRuleSet for a Namespace. - /// Name of the Resource group within the Azure subscription. - /// The namespace name + /// Deletes a MigrationConfiguration /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The Namespace IpFilterRule. + /// Name of the Resource group within the Azure subscription. + /// The namespace name /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -3556,8 +4233,9 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateNetworkRuleSet(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MigrationConfigsDelete(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var configName = @"$default"; var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) @@ -3570,7 +4248,8 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/networkRuleSets/default" + + "/migrationConfigurations/" + + global::System.Uri.EscapeDataString(configName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3579,23 +4258,19 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesCreateOrUpdateNetworkRuleSet_Call(request,onOk,onDefault,eventListener,sender); + await this.MigrationConfigsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Create or update NetworkRuleSet for a Namespace. + /// Deletes a MigrationConfiguration /// - /// The Namespace IpFilterRule. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -3603,7 +4278,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateNetworkRuleSetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MigrationConfigsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -3611,16 +4286,17 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/networkRuleSets/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/migrationConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var configName = _match.Groups["configName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3629,7 +4305,8 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/networkRuleSets/default" + + "/migrationConfigurations/" + + configName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3638,24 +4315,19 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesCreateOrUpdateNetworkRuleSet_Call(request,onOk,onDefault,eventListener,sender); + await this.MigrationConfigsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -3663,7 +4335,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateNetworkRuleSet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MigrationConfigsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3674,6 +4346,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3681,13 +4354,19 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NetworkRuleSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3703,40 +4382,36 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but - /// you will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The Namespace IpFilterRule. + /// Name of the Resource group within the Azure subscription. + /// The namespace name /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateNetworkRuleSet_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MigrationConfigsDelete_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation - /// is idempotent. - /// - /// - /// Parameters supplied to create a namespace resource. + /// Retrieves Migration Config + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -3745,32 +4420,23 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MigrationConfigsGet(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var configName = @"$default"; var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName + + global::System.Uri.EscapeDataString(namespaceName) + + "/migrationConfigurations/" + + global::System.Uri.EscapeDataString(configName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3779,21 +4445,17 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.MigrationConfigsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. + /// Retrieves Migration Config + /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -3802,116 +4464,233 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MigrationConfigsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/migrationConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}'"); + } - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var configName = _match.Groups["configName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/migrationConfigurations/" + + configName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - await waiting; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MigrationConfigsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } + /// Retrieves Migration Config + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MigrationConfigsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri - // drop the old response - _response?.Dispose(); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/migrationConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}'"); + } - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var configName = _match.Groups["configName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/migrationConfigurations/" + + configName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException(_response); - } - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.MigrationConfigsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Retrieves Migration Config + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MigrationConfigsGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var configName = @"$default"; + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/migrationConfigurations/" + + global::System.Uri.EscapeDataString(configName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.MigrationConfigsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MigrationConfigsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: { - continue; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MigrationConfigProperties.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } - // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_originalUri)) + default: { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } } } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MigrationConfigsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3919,13 +4698,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MigrationConfigProperties.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3941,41 +4720,37 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters supplied to create a namespace resource. + /// Name of the Resource group within the Azure subscription. + /// The namespace name /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdate_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MigrationConfigsGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); } } - /// - /// Deletes an existing namespace. This operation also removes all associated resources under the namespace. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name + /// Gets all migrationConfigurations /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -3983,7 +4758,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesDelete(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MigrationConfigsList(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -3997,6 +4772,7 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) + + "/migrationConfigurations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4005,23 +4781,8291 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.MigrationConfigsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets all migrationConfigurations + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MigrationConfigsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/migrationConfigurations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/migrationConfigurations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MigrationConfigsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets all migrationConfigurations + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MigrationConfigsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/migrationConfigurations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/migrationConfigurations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.MigrationConfigsListWithResult_Call (request, eventListener,sender); + } + } + + /// Gets all migrationConfigurations + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MigrationConfigsListWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/migrationConfigurations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.MigrationConfigsListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MigrationConfigsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MigrationConfigListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MigrationConfigsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MigrationConfigListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MigrationConfigsList_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + } + } + + /// This operation reverts Migration + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MigrationConfigsRevert(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var configName = @"$default"; + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/migrationConfigurations/" + + global::System.Uri.EscapeDataString(configName) + + "/revert" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MigrationConfigsRevert_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// This operation reverts Migration + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MigrationConfigsRevertViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/migrationConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var configName = _match.Groups["configName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/migrationConfigurations/" + + configName + + "/revert" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MigrationConfigsRevert_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MigrationConfigsRevert_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MigrationConfigsRevert_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + } + } + + /// Check the give namespace name availability. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Parameters to check availability of the given namespace name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCheckNameAvailability(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.ServiceBus/CheckNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCheckNameAvailability_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Check the give namespace name availability. + /// + /// Parameters to check availability of the given namespace name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCheckNameAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ServiceBus$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.ServiceBus/CheckNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCheckNameAvailability_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Check the give namespace name availability. + /// + /// Parameters to check availability of the given namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCheckNameAvailabilityViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ServiceBus$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.ServiceBus/CheckNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCheckNameAvailabilityWithResult_Call (request, eventListener,sender); + } + } + + /// Check the give namespace name availability. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Json string supplied to the NamespacesCheckNameAvailability operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCheckNameAvailabilityViaJsonString(string subscriptionId, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.ServiceBus/CheckNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCheckNameAvailability_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Check the give namespace name availability. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Json string supplied to the NamespacesCheckNameAvailability operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCheckNameAvailabilityViaJsonStringWithResult(string subscriptionId, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.ServiceBus/CheckNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCheckNameAvailabilityWithResult_Call (request, eventListener,sender); + } + } + + /// Check the give namespace name availability. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Parameters to check availability of the given namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCheckNameAvailabilityWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.ServiceBus/CheckNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCheckNameAvailabilityWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesCheckNameAvailabilityWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CheckNameAvailabilityResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesCheckNameAvailability_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CheckNameAvailabilityResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Parameters to check availability of the given namespace name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesCheckNameAvailability_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Update a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name. + /// Parameters supplied to create a namespace resource. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update an authorization rule for a namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// The shared access authorization rule. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/AuthorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdateAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update an authorization rule for a namespace. + /// + /// The shared access authorization rule. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateAuthorizationRuleViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/AuthorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdateAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update an authorization rule for a namespace. + /// + /// The shared access authorization rule. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateAuthorizationRuleViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/AuthorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// Update an authorization rule for a namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// Json string supplied to the NamespacesCreateOrUpdateAuthorizationRule operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateAuthorizationRuleViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/AuthorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdateAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update an authorization rule for a namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// Json string supplied to the NamespacesCreateOrUpdateAuthorizationRule operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateAuthorizationRuleViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/AuthorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// Update an authorization rule for a namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// The shared access authorization rule. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateAuthorizationRuleWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/AuthorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateAuthorizationRuleWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// The shared access authorization rule. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Update NetworkRuleSet for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The Namespace IpFilterRule. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateNetworkRuleSet(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdateNetworkRuleSet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update NetworkRuleSet for a Namespace. + /// + /// The Namespace IpFilterRule. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateNetworkRuleSetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/networkRuleSets/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdateNetworkRuleSet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update NetworkRuleSet for a Namespace. + /// + /// The Namespace IpFilterRule. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateNetworkRuleSetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/networkRuleSets/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateNetworkRuleSetWithResult_Call (request, eventListener,sender); + } + } + + /// Update NetworkRuleSet for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Json string supplied to the NamespacesCreateOrUpdateNetworkRuleSet operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateNetworkRuleSetViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdateNetworkRuleSet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update NetworkRuleSet for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Json string supplied to the NamespacesCreateOrUpdateNetworkRuleSet operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateNetworkRuleSetViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateNetworkRuleSetWithResult_Call (request, eventListener,sender); + } + } + + /// Update NetworkRuleSet for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The Namespace IpFilterRule. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateNetworkRuleSetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateNetworkRuleSetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateNetworkRuleSetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NetworkRuleSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateNetworkRuleSet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NetworkRuleSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The Namespace IpFilterRule. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateNetworkRuleSet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Update a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// + /// Parameters supplied to create a namespace resource. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// + /// Parameters supplied to create a namespace resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Update a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name. + /// Json string supplied to the NamespacesCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name. + /// Json string supplied to the NamespacesCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Update a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name. + /// Parameters supplied to create a namespace resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name. + /// Parameters supplied to create a namespace resource. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Deletes an existing namespace. This operation also removes all associated resources under the namespace. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesDelete(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a namespace authorization rule. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesDeleteAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/AuthorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesDeleteAuthorizationRule_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a namespace authorization rule. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesDeleteAuthorizationRuleViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/AuthorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesDeleteAuthorizationRule_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesDeleteAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesDeleteAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); + } + } + + /// + /// Deletes an existing namespace. This operation also removes all associated resources under the namespace. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesDelete_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + } + } + + /// Gets a description for the specified namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesGet(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets an authorization rule for a namespace by rule name. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/AuthorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesGetAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets an authorization rule for a namespace by rule name. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRuleViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/AuthorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesGetAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets an authorization rule for a namespace by rule name. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRuleViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/AuthorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesGetAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// Gets an authorization rule for a namespace by rule name. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRuleWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/AuthorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesGetAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRuleWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); + } + } + + /// Gets NetworkRuleSet for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesGetNetworkRuleSet(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesGetNetworkRuleSet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets NetworkRuleSet for a Namespace. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesGetNetworkRuleSetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/networkRuleSets/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesGetNetworkRuleSet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets NetworkRuleSet for a Namespace. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesGetNetworkRuleSetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/networkRuleSets/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesGetNetworkRuleSetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets NetworkRuleSet for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesGetNetworkRuleSetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesGetNetworkRuleSetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesGetNetworkRuleSetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NetworkRuleSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesGetNetworkRuleSet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NetworkRuleSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesGetNetworkRuleSet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + } + } + + /// Gets a description for the specified namespace. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets a description for the specified namespace. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets a description for the specified namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + } + } + + /// + /// Gets all the available namespaces within the subscription, irrespective of the resource groups. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.ServiceBus/namespaces" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the authorization rules for a namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListAuthorizationRules(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/AuthorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesListAuthorizationRules_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the authorization rules for a namespace. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListAuthorizationRulesViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/AuthorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesListAuthorizationRules_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the authorization rules for a namespace. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListAuthorizationRulesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/AuthorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListAuthorizationRulesWithResult_Call (request, eventListener,sender); + } + } + + /// Gets the authorization rules for a namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListAuthorizationRulesWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/AuthorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListAuthorizationRulesWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesListAuthorizationRulesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesListAuthorizationRules_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesListAuthorizationRules_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + } + } + + /// Gets the available namespaces within a resource group. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the available namespaces within a resource group. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the available namespaces within a resource group. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// Gets the available namespaces within a resource group. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespaceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespaceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + } + } + + /// Gets the primary and secondary connection strings for the namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListKeys(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/AuthorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/listKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesListKeys_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the primary and secondary connection strings for the namespace. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListKeysViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/AuthorizationRules/" + + authorizationRuleName + + "/listKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesListKeys_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the primary and secondary connection strings for the namespace. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListKeysViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/AuthorizationRules/" + + authorizationRuleName + + "/listKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListKeysWithResult_Call (request, eventListener,sender); + } + } + + /// Gets the primary and secondary connection strings for the namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListKeysWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/AuthorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/listKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListKeysWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesListKeysWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesListKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesListKeys_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); + } + } + + /// Gets list of NetworkRuleSet for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSets(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/networkRuleSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesListNetworkRuleSets_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets list of NetworkRuleSet for a Namespace. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSetsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/networkRuleSets$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/networkRuleSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesListNetworkRuleSets_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets list of NetworkRuleSet for a Namespace. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSetsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/networkRuleSets$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/networkRuleSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListNetworkRuleSetsWithResult_Call (request, eventListener,sender); + } + } + + /// Gets list of NetworkRuleSet for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSetsWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/networkRuleSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListNetworkRuleSetsWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSetsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NetworkRuleSetListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSets_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NetworkRuleSetListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSets_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + } + } + + /// + /// Gets all the available namespaces within the subscription, irrespective of the resource groups. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/namespaces'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.ServiceBus/namespaces" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Gets all the available namespaces within the subscription, irrespective of the resource groups. + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/namespaces'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.ServiceBus/namespaces" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Gets all the available namespaces within the subscription, irrespective of the resource groups. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesListWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.ServiceBus/namespaces" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespaceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespaceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Regenerates the primary or secondary connection strings for the namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// Parameters supplied to regenerate the authorization rule. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesRegenerateKeys(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/AuthorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesRegenerateKeys_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Regenerates the primary or secondary connection strings for the namespace. + /// + /// Parameters supplied to regenerate the authorization rule. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesRegenerateKeysViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/AuthorizationRules/" + + authorizationRuleName + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesRegenerateKeys_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Regenerates the primary or secondary connection strings for the namespace. + /// + /// Parameters supplied to regenerate the authorization rule. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesRegenerateKeysViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/AuthorizationRules/" + + authorizationRuleName + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesRegenerateKeysWithResult_Call (request, eventListener,sender); + } + } + + /// Regenerates the primary or secondary connection strings for the namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// Json string supplied to the NamespacesRegenerateKeys operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesRegenerateKeysViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/AuthorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesRegenerateKeys_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Regenerates the primary or secondary connection strings for the namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// Json string supplied to the NamespacesRegenerateKeys operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesRegenerateKeysViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/AuthorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesRegenerateKeysWithResult_Call (request, eventListener,sender); + } + } + + /// Regenerates the primary or secondary connection strings for the namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// Parameters supplied to regenerate the authorization rule. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesRegenerateKeysWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/AuthorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesRegenerateKeysWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesRegenerateKeysWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesRegenerateKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The authorization rule name. + /// Parameters supplied to regenerate the authorization rule. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesRegenerateKeys_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Update a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Parameters supplied to update a namespace resource. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesUpdate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesUpdate_Call (request, onOk,onCreated,onAccepted,onDefault,eventListener,sender); + } + } + + /// + /// Update a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// + /// Parameters supplied to update a namespace resource. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesUpdate_Call (request, onOk,onCreated,onAccepted,onDefault,eventListener,sender); + } + } + + /// + /// Update a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// + /// Parameters supplied to update a namespace resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Update a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Json string supplied to the NamespacesUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesUpdateViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesUpdate_Call (request, onOk,onCreated,onAccepted,onDefault,eventListener,sender); + } + } + + /// + /// Update a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Json string supplied to the NamespacesUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Update a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Parameters supplied to update a namespace resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task NamespacesUpdateWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + throw new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException(_response); + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Parameters supplied to update a namespace resource. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task NamespacesUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Lists all of the available ServiceBus REST API operations. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.ServiceBus/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the available ServiceBus REST API operations. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.ServiceBus/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.ServiceBus/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.ServiceBus/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the available ServiceBus REST API operations. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.ServiceBus/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.ServiceBus/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.ServiceBus/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all of the available ServiceBus REST API operations. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.ServiceBus/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + + } + } + + /// Update PrivateEndpointConnections of service namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The PrivateEndpointConnection name + /// Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsCreateOrUpdate_Call (request, onOk,onCreated,onAccepted,onDefault,eventListener,sender); + } + } + + /// Update PrivateEndpointConnections of service namespace. + /// + /// Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/privateEndpointConnections/" + + privateEndpointConnectionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsCreateOrUpdate_Call (request, onOk,onCreated,onAccepted,onDefault,eventListener,sender); + } + } + + /// Update PrivateEndpointConnections of service namespace. + /// + /// Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/privateEndpointConnections/" + + privateEndpointConnectionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateEndpointConnectionsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update PrivateEndpointConnections of service namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The PrivateEndpointConnection name + /// Json string supplied to the PrivateEndpointConnectionsCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsCreateOrUpdate_Call (request, onOk,onCreated,onAccepted,onDefault,eventListener,sender); + } + } + + /// Update PrivateEndpointConnections of service namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The PrivateEndpointConnection name + /// Json string supplied to the PrivateEndpointConnectionsCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateEndpointConnectionsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update PrivateEndpointConnections of service namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The PrivateEndpointConnection name + /// Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateEndpointConnectionsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The PrivateEndpointConnection name + /// Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes an existing Private Endpoint Connection. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The PrivateEndpointConnection name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an existing Private Endpoint Connection. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/privateEndpointConnections/" + + privateEndpointConnectionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The PrivateEndpointConnection name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); + } + } + + /// Gets a description for the specified Private Endpoint Connection. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The PrivateEndpointConnection name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets a description for the specified Private Endpoint Connection. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/privateEndpointConnections/" + + privateEndpointConnectionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets a description for the specified Private Endpoint Connection. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/privateEndpointConnections/" + + privateEndpointConnectionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateEndpointConnectionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets a description for the specified Private Endpoint Connection. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The PrivateEndpointConnection name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateEndpointConnectionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The PrivateEndpointConnection name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); + } + } + + /// Gets the available PrivateEndpointConnections within a namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/privateEndpointConnections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the available PrivateEndpointConnections within a namespace. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/privateEndpointConnections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/privateEndpointConnections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the available PrivateEndpointConnections within a namespace. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/privateEndpointConnections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/privateEndpointConnections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateEndpointConnectionsListWithResult_Call (request, eventListener,sender); + } + } + + /// Gets the available PrivateEndpointConnections within a namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/privateEndpointConnections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateEndpointConnectionsListWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); } } - /// Deletes a namespace authorization rule. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The authorization rule name. + /// Gets lists of resources that supports Privatelinks. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -4029,7 +13073,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesDeleteAuthorizationRule(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateLinkResourcesGet(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -4043,8 +13087,7 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/AuthorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/privateLinkResources" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4053,19 +13096,18 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesDeleteAuthorizationRule_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.PrivateLinkResourcesGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes a namespace authorization rule. + /// Gets lists of resources that supports Privatelinks. /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -4073,7 +13115,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesDeleteAuthorizationRuleViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateLinkResourcesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -4081,17 +13123,16 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/privateLinkResources$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateLinkResources'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4100,8 +13141,7 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/AuthorizationRules/" - + authorizationRuleName + + "/privateLinkResources" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4110,169 +13150,119 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesDeleteAuthorizationRule_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.PrivateLinkResourcesGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Gets lists of resources that supports Privatelinks. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesDeleteAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateLinkResourcesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/privateLinkResources$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateLinkResources'"); } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/privateLinkResources" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateLinkResourcesGetWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The authorization rule name. + /// Gets lists of resources that supports Privatelinks. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task NamespacesDeleteAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// - /// Deletes an existing namespace. This operation also removes all associated resources under the namespace. - /// - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Name of the Resource group within the Azure subscription. + /// The namespace name /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateLinkResourcesGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName + + global::System.Uri.EscapeDataString(namespaceName) + + "/privateLinkResources" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + return await this.PrivateLinkResourcesGetWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PrivateLinkResourcesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4280,109 +13270,72 @@ public partial class ServiceBus try { var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException(_response); - } - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: { - continue; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateLinkResourcesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } - // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_finalUri)) + default: { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } } } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateLinkResourcesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -4390,19 +13343,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateLinkResourcesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4418,45 +13365,48 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesDelete_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PrivateLinkResourcesGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); } } - /// Gets a description for the specified namespace. - /// Name of the Resource group within the Azure subscription. - /// The namespace name + /// Update a Service Bus queue. This operation is idempotent. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// Parameters supplied to create or update a queue resource. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesGet(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -4470,6 +13420,8 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4478,30 +13430,37 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.QueuesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets an authorization rule for a namespace by rule name. + /// Update an authorization rule for a queue. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name + /// The queue name. /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// The shared access authorization rule. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRule(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesCreateOrUpdateAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -4515,7 +13474,9 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/AuthorizationRules/" + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "/authorizationRules/" + global::System.Uri.EscapeDataString(authorizationRuleName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) @@ -4525,26 +13486,32 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesGetAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + await this.QueuesCreateOrUpdateAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets an authorization rule for a namespace by rule name. + /// Update an authorization rule for a queue. /// + /// The shared access authorization rule. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRuleViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesCreateOrUpdateAuthorizationRuleViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -4552,17 +13519,81 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; + var queueName = _match.Groups["queueName"].Value; var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/queues/" + + queueName + + "/authorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.QueuesCreateOrUpdateAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update an authorization rule for a queue. + /// + /// The shared access authorization rule. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task QueuesCreateOrUpdateAuthorizationRuleViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var queueName = _match.Groups["queueName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4571,26 +13602,258 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/AuthorizationRules/" + + "/queues/" + + queueName + + "/authorizationRules/" + authorizationRuleName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.QueuesCreateOrUpdateAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// Update an authorization rule for a queue. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// The authorization rule name. + /// Json string supplied to the QueuesCreateOrUpdateAuthorizationRule operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task QueuesCreateOrUpdateAuthorizationRuleViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.QueuesCreateOrUpdateAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update an authorization rule for a queue. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// The authorization rule name. + /// Json string supplied to the QueuesCreateOrUpdateAuthorizationRule operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task QueuesCreateOrUpdateAuthorizationRuleViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.QueuesCreateOrUpdateAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// Update an authorization rule for a queue. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// The authorization rule name. + /// The shared access authorization rule. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task QueuesCreateOrUpdateAuthorizationRuleWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesGetAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + return await this.QueuesCreateOrUpdateAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task QueuesCreateOrUpdateAuthorizationRuleWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -4600,7 +13863,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task QueuesCreateOrUpdateAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4611,6 +13874,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -4618,13 +13882,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4640,63 +13904,82 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name + /// The queue name. /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// The shared access authorization rule. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task QueuesCreateOrUpdateAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertNotNull(nameof(queueName),queueName); + await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Gets NetworkRuleSet for a Namespace. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// Update a Service Bus queue. This operation is idempotent. + /// + /// Parameters supplied to create or update a queue resource. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesGetNetworkRuleSet(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var queueName = _match.Groups["queueName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/networkRuleSets/default" + + namespaceName + + "/queues/" + + queueName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4705,26 +13988,30 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesGetNetworkRuleSet_Call(request,onOk,onDefault,eventListener,sender); + await this.QueuesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets NetworkRuleSet for a Namespace. + /// Update a Service Bus queue. This operation is idempotent. /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Parameters supplied to create or update a queue resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesGetNetworkRuleSetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -4732,16 +14019,17 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/networkRuleSets/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var queueName = _match.Groups["queueName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4750,26 +14038,36 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/networkRuleSets/default" + + "/queues/" + + queueName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesGetNetworkRuleSet_Call(request,onOk,onDefault,eventListener,sender); + return await this.QueuesCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. + /// Update a Service Bus queue. This operation is idempotent. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// Json string supplied to the QueuesCreateOrUpdate operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -4778,125 +14076,205 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesGetNetworkRuleSet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NetworkRuleSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.QueuesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name + /// Update a Service Bus queue. This operation is idempotent. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// Json string supplied to the QueuesCreateOrUpdate operation /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesGetNetworkRuleSet_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task QueuesCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.QueuesCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Gets a description for the specified namespace. - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Update a Service Bus queue. This operation is idempotent. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// Parameters supplied to create or update a queue resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName + + global::System.Uri.EscapeDataString(namespaceName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesGet_Call(request,onOk,onDefault,eventListener,sender); + return await this.QueuesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task QueuesCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbQueue.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -4906,7 +14284,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task QueuesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4917,6 +14295,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -4924,13 +14303,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbQueue.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4946,37 +14325,45 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// Parameters supplied to create or update a queue resource. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesGet_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task QueuesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(queueName),queueName); + await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// Gets all the available namespaces within the subscription, irrespective of the resource groups. - /// + /// Deletes a queue from the specified namespace in a resource group. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -4984,7 +14371,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesDelete(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -4994,7 +14381,12 @@ public partial class ServiceBus var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.ServiceBus/namespaces" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5003,21 +14395,24 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesList_Call(request,onOk,onDefault,eventListener,sender); + await this.QueuesDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Gets the authorization rules for a namespace. - /// Name of the Resource group within the Azure subscription. - /// The namespace name + /// Deletes a queue authorization rule. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// The authorization rule name. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -5025,7 +14420,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesListAuthorizationRules(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesDeleteAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -5039,7 +14434,10 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/AuthorizationRules" + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5048,18 +14446,19 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesListAuthorizationRules_Call(request,onOk,onDefault,eventListener,sender); + await this.QueuesDeleteAuthorizationRule_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Gets the authorization rules for a namespace. + /// Deletes a queue authorization rule. /// /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -5067,7 +14466,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesListAuthorizationRulesViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesDeleteAuthorizationRuleViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -5075,16 +14474,18 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var queueName = _match.Groups["queueName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -5093,7 +14494,10 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/AuthorizationRules" + + "/queues/" + + queueName + + "/authorizationRules/" + + authorizationRuleName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5102,18 +14506,19 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesListAuthorizationRules_Call(request,onOk,onDefault,eventListener,sender); + await this.QueuesDeleteAuthorizationRule_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -5121,7 +14526,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesListAuthorizationRules_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task QueuesDeleteAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5132,6 +14537,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5139,13 +14545,19 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5161,76 +14573,42 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// The authorization rule name. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesListAuthorizationRules_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task QueuesDeleteAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// Gets the available namespaces within a resource group. - /// Name of the Resource group within the Azure subscription. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task NamespacesListByResourceGroup(string resourceGroupName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-10-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ServiceBus/namespaces" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.NamespacesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + await eventListener.AssertNotNull(nameof(queueName),queueName); + await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); } } - /// Gets the available namespaces within a resource group. + /// Deletes a queue from the specified namespace in a resource group. /// /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -5238,7 +14616,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -5246,22 +14624,27 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}'"); } // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var queueName = _match.Groups["queueName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ServiceBus/namespaces" + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/queues/" + + queueName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5270,18 +14653,19 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.QueuesDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -5289,7 +14673,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task QueuesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5300,6 +14684,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5307,13 +14692,19 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespaceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5329,33 +14720,88 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// Name of the Resource group within the Azure subscription. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesListByResourceGroup_Validate(string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task QueuesDelete_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertNotNull(nameof(queueName),queueName); + await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); + } + } + + /// Returns a description for the specified queue. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task QueuesGet(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.QueuesGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets the primary and secondary connection strings for the namespace. + /// Gets an authorization rule for a queue by rule name. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name + /// The queue name. /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -5364,7 +14810,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesListKeys(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesGetAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -5378,9 +14824,10 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/AuthorizationRules/" + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "/authorizationRules/" + global::System.Uri.EscapeDataString(authorizationRuleName) - + "/listKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5389,16 +14836,16 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesListKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.QueuesGetAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets the primary and secondary connection strings for the namespace. + /// Gets an authorization rule for a queue by rule name. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -5408,7 +14855,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesListKeysViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesGetAuthorizationRuleViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -5416,17 +14863,18 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; + var queueName = _match.Groups["queueName"].Value; var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -5435,9 +14883,10 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/AuthorizationRules/" + + "/queues/" + + queueName + + "/authorizationRules/" + authorizationRuleName - + "/listKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5446,16 +14895,183 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesListKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.QueuesGetAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets an authorization rule for a queue by rule name. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task QueuesGetAuthorizationRuleViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var queueName = _match.Groups["queueName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/queues/" + + queueName + + "/authorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.QueuesGetAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// Gets an authorization rule for a queue by rule name. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// The authorization rule name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task QueuesGetAuthorizationRuleWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.QueuesGetAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task QueuesGetAuthorizationRuleWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -5465,7 +15081,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesListKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task QueuesGetAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5476,6 +15092,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5483,13 +15100,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5505,40 +15122,40 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name + /// The queue name. /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesListKeys_Validate(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task QueuesGetAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertNotNull(nameof(queueName),queueName); + await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); } } - /// Gets list of NetworkRuleSet for a Namespace. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// Returns a description for the specified queue. + /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -5547,21 +15164,35 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSets(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var queueName = _match.Groups["queueName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/networkRuleSets" + + namespaceName + + "/queues/" + + queueName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5575,21 +15206,19 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesListNetworkRuleSets_Call(request,onOk,onDefault,eventListener,sender); + await this.QueuesGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets list of NetworkRuleSet for a Namespace. + /// Returns a description for the specified queue. /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSetsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -5597,16 +15226,17 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/networkRuleSets$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var queueName = _match.Groups["queueName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -5615,35 +15245,79 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/networkRuleSets" + + "/queues/" + + queueName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.QueuesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Returns a description for the specified queue. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task QueuesGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesListNetworkRuleSets_Call(request,onOk,onDefault,eventListener,sender); + return await this.QueuesGetWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSets_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task QueuesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5651,24 +15325,37 @@ public partial class ServiceBus try { var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) { case global::System.Net.HttpStatusCode.OK: { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NetworkRuleSetListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbQueue.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } default: { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } } } } @@ -5682,83 +15369,7 @@ public partial class ServiceBus } } - /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSets_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// - /// Gets all the available namespaces within the subscription, irrespective of the resource groups. - /// - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task NamespacesListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-10-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/namespaces'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/providers/Microsoft.ServiceBus/namespaces" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.NamespacesList_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -5768,7 +15379,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task QueuesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5779,6 +15390,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5786,13 +15398,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespaceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbQueue.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5808,30 +15420,40 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task QueuesGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertNotNull(nameof(queueName),queueName); + await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); } } - /// Regenerates the primary or secondary connection strings for the namespace. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The authorization rule name. + /// Gets all authorization rules for a queue. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters supplied to regenerate the authorization rule. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -5840,7 +15462,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesRegenerateKeys(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesListAuthorizationRules(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -5854,9 +15476,9 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/AuthorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) - + "/regenerateKeys" + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "/authorizationRules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5865,22 +15487,17 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesRegenerateKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.QueuesListAuthorizationRules_Call (request, onOk,onDefault,eventListener,sender); } } - /// Regenerates the primary or secondary connection strings for the namespace. + /// Gets all authorization rules for a queue. /// - /// Parameters supplied to regenerate the authorization rule. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -5889,7 +15506,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesRegenerateKeysViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesListAuthorizationRulesViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -5897,17 +15514,17 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/AuthorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var queueName = _match.Groups["queueName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -5916,9 +15533,9 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/AuthorizationRules/" - + authorizationRuleName - + "/regenerateKeys" + + "/queues/" + + queueName + + "/authorizationRules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5927,20 +15544,179 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesRegenerateKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.QueuesListAuthorizationRules_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets all authorization rules for a queue. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task QueuesListAuthorizationRulesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var queueName = _match.Groups["queueName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/queues/" + + queueName + + "/authorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.QueuesListAuthorizationRulesWithResult_Call (request, eventListener,sender); + } + } + + /// Gets all authorization rules for a queue. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task QueuesListAuthorizationRulesWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "/authorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.QueuesListAuthorizationRulesWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task QueuesListAuthorizationRulesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -5950,7 +15726,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesRegenerateKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task QueuesListAuthorizationRules_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5961,6 +15737,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5968,13 +15745,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5990,49 +15767,44 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The authorization rule name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters supplied to regenerate the authorization rule. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesRegenerateKeys_Validate(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task QueuesListAuthorizationRules_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(queueName),queueName); + await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); } } - /// - /// Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name + /// Gets the queues within a namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters supplied to update a namespace resource. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). - /// a delegate that is called when the remote service returns 202 (Accepted). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -6040,7 +15812,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesUpdate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesListByNamespace(string subscriptionId, string resourceGroupName, string namespaceName, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -6054,35 +15826,35 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) + + "/queues" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesUpdate_Call(request,onOk,onCreated,onAccepted,onDefault,eventListener,sender); + await this.QueuesListByNamespace_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. - /// + /// Gets the queues within a namespace. /// - /// Parameters supplied to update a namespace resource. + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). - /// a delegate that is called when the remote service returns 202 (Accepted). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -6090,7 +15862,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesListByNamespaceViaIdentity(global::System.String viaIdentity, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -6098,16 +15870,16 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -6116,129 +15888,104 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName + + "/queues" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesUpdate_Call(request,onOk,onCreated,onAccepted,onDefault,eventListener,sender); + await this.QueuesListByNamespace_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). - /// a delegate that is called when the remote service returns 202 (Accepted). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Gets the queues within a namespace. + /// + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesListByNamespaceViaIdentityWithResult(global::System.String viaIdentity, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - case global::System.Net.HttpStatusCode.Created: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - case global::System.Net.HttpStatusCode.Accepted: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues'"); } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/queues" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.QueuesListByNamespaceWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name + /// Gets the queues within a namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters supplied to update a namespace resource. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task NamespacesUpdate_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - - /// Lists all of the available ServiceBus REST API operations. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesListByNamespaceWithResult(string subscriptionId, string resourceGroupName, string namespaceName, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -6246,70 +15993,95 @@ public partial class ServiceBus { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.ServiceBus/operations" + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/queues" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + return await this.QueuesListByNamespaceWithResult_Call (request, eventListener,sender); } } - /// Lists all of the available ServiceBus REST API operations. - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task QueuesListByNamespaceWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { - var apiVersion = @"2022-10-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.ServiceBus/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbQueueListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally { - throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.ServiceBus/operations'"); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } - - // replace URI parameters with values from identity - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.ServiceBus/operations" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -6319,7 +16091,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task QueuesListByNamespace_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6330,6 +16102,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -6337,13 +16110,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbQueueListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6359,31 +16132,46 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task QueuesListByNamespace_Validate(string subscriptionId, string resourceGroupName, string namespaceName, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertIsLessThanOrEqual(nameof(Skip),Skip,1000); + await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); + await eventListener.AssertIsLessThanOrEqual(nameof(Top),Top,1000); } } - /// Creates or updates PrivateEndpointConnections of service namespace. + /// Primary and secondary connection strings to the queue. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name - /// The PrivateEndpointConnection name - /// Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. + /// The queue name. + /// The authorization rule name. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). - /// a delegate that is called when the remote service returns 202 (Accepted). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -6391,7 +16179,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesListKeys(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -6405,8 +16193,11 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/privateEndpointConnections/" - + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/ListKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6415,25 +16206,18 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateEndpointConnectionsCreateOrUpdate_Call(request,onOk,onCreated,onAccepted,onDefault,eventListener,sender); + await this.QueuesListKeys_Call (request, onOk,onDefault,eventListener,sender); } } - /// Creates or updates PrivateEndpointConnections of service namespace. + /// Primary and secondary connection strings to the queue. /// - /// Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). - /// a delegate that is called when the remote service returns 202 (Accepted). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -6441,7 +16225,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesListKeysViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -6449,17 +16233,18 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; + var queueName = _match.Groups["queueName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -6468,8 +16253,11 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/privateEndpointConnections/" - + privateEndpointConnectionName + + "/queues/" + + queueName + + "/authorizationRules/" + + authorizationRuleName + + "/ListKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6478,131 +16266,87 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateEndpointConnectionsCreateOrUpdate_Call(request,onOk,onCreated,onAccepted,onDefault,eventListener,sender); + await this.QueuesListKeys_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Actual wire call for method. - /// - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). - /// a delegate that is called when the remote service returns 202 (Accepted). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Primary and secondary connection strings to the queue. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesListKeysViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - case global::System.Net.HttpStatusCode.Created: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - case global::System.Net.HttpStatusCode.Accepted: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}'"); } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var queueName = _match.Groups["queueName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/queues/" + + queueName + + "/authorizationRules/" + + authorizationRuleName + + "/ListKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.QueuesListKeysWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. - /// + /// Primary and secondary connection strings to the queue. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name - /// The PrivateEndpointConnection name - /// Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - - /// Deletes an existing Private Endpoint Connection. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The PrivateEndpointConnection name - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// The queue name. + /// The authorization rule name. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete(string resourceGroupName, string namespaceName, string subscriptionId, string privateEndpointConnectionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesListKeysWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -6616,86 +16360,91 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/privateEndpointConnections/" - + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/ListKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.PrivateEndpointConnectionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + return await this.QueuesListKeysWithResult_Call (request, eventListener,sender); } } - /// Deletes an existing Private Endpoint Connection. - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task QueuesListKeysWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { - var apiVersion = @"2022-10-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; - var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName - + "/privateEndpointConnections/" - + privateEndpointConnectionName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.PrivateEndpointConnectionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -6703,7 +16452,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task QueuesListKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6714,106 +16463,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_finalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -6821,19 +16471,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6849,48 +16493,56 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The PrivateEndpointConnection name + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// The authorization rule name. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete_Validate(string resourceGroupName, string namespaceName, string subscriptionId, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task QueuesListKeys_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); + await eventListener.AssertNotNull(nameof(queueName),queueName); + await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); } } - /// Gets a description for the specified Private Endpoint Connection. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The PrivateEndpointConnection name + /// Regenerates the primary or secondary connection strings to the queue. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// The authorization rule name. + /// Parameters supplied to regenerate the authorization rule. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet(string resourceGroupName, string namespaceName, string privateEndpointConnectionName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesRegenerateKeys(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -6904,8 +16556,11 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/privateEndpointConnections/" - + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6914,26 +16569,32 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateEndpointConnectionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.QueuesRegenerateKeys_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets a description for the specified Private Endpoint Connection. + /// Regenerates the primary or secondary connection strings to the queue. /// + /// Parameters supplied to regenerate the authorization rule. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesRegenerateKeysViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -6941,17 +16602,18 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var queueName = _match.Groups["queueName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -6960,8 +16622,11 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/privateEndpointConnections/" - + privateEndpointConnectionName + + "/queues/" + + queueName + + "/authorizationRules/" + + authorizationRuleName + + "/regenerateKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6970,97 +16635,91 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateEndpointConnectionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.QueuesRegenerateKeys_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Regenerates the primary or secondary connection strings to the queue. + /// + /// Parameters supplied to regenerate the authorization rule. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesRegenerateKeysViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}'"); } - } - } - /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The PrivateEndpointConnection name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet_Validate(string resourceGroupName, string namespaceName, string privateEndpointConnectionName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var queueName = _match.Groups["queueName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/queues/" + + queueName + + "/authorizationRules/" + + authorizationRuleName + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.QueuesRegenerateKeysWithResult_Call (request, eventListener,sender); } } - /// Gets the available PrivateEndpointConnections within a namespace. - /// Name of the Resource group within the Azure subscription. - /// The namespace name + /// Regenerates the primary or secondary connection strings to the queue. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// The authorization rule name. + /// Json string supplied to the QueuesRegenerateKeys operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -7069,7 +16728,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesRegenerateKeysViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -7083,7 +16742,11 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/privateEndpointConnections" + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7092,70 +16755,189 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateEndpointConnectionsList_Call(request,onOk,onDefault,eventListener,sender); + await this.QueuesRegenerateKeys_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets the available PrivateEndpointConnections within a namespace. - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Regenerates the primary or secondary connection strings to the queue. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// The authorization rule name. + /// Json string supplied to the QueuesRegenerateKeys operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task QueuesRegenerateKeysViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/privateEndpointConnections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections'"); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.QueuesRegenerateKeysWithResult_Call (request, eventListener,sender); + } + } + + /// Regenerates the primary or secondary connection strings to the queue. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// The authorization rule name. + /// Parameters supplied to regenerate the authorization rule. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task QueuesRegenerateKeysWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName - + "/privateEndpointConnections" + + global::System.Uri.EscapeDataString(namespaceName) + + "/queues/" + + global::System.Uri.EscapeDataString(queueName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.PrivateEndpointConnectionsList_Call(request,onOk,onDefault,eventListener,sender); + return await this.QueuesRegenerateKeysWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task QueuesRegenerateKeysWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -7165,7 +16947,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task QueuesRegenerateKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7176,6 +16958,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -7183,13 +16966,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7205,45 +16988,60 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The queue name. + /// The authorization rule name. + /// Parameters supplied to regenerate the authorization rule. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task QueuesRegenerateKeys_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(queueName),queueName); + await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Gets lists of resources that supports Privatelinks. - /// Name of the Resource group within the Azure subscription. - /// The namespace name + /// Update a new rule and updates an existing rule /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// The rule name. + /// Parameters supplied to create a rule. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateLinkResourcesGet(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task RulesCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -7257,7 +17055,12 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/privateLinkResources" + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionName) + + "/rules/" + + global::System.Uri.EscapeDataString(ruleName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7266,26 +17069,32 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateLinkResourcesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.RulesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets lists of resources that supports Privatelinks. + /// Update a new rule and updates an existing rule /// + /// Parameters supplied to create a rule. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateLinkResourcesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task RulesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -7293,16 +17102,19 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/privateLinkResources$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)/rules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateLinkResources'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var topicName = _match.Groups["topicName"].Value; + var subscriptionName = _match.Groups["subscriptionName"].Value; + var ruleName = _match.Groups["ruleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -7311,7 +17123,12 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/privateLinkResources" + + "/topics/" + + topicName + + "/subscriptions/" + + subscriptionName + + "/rules/" + + ruleName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7320,97 +17137,94 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.PrivateLinkResourcesGet_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task PrivateLinkResourcesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateLinkResourcesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RulesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// Update a new rule and updates an existing rule + /// + /// Parameters supplied to create a rule. /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateLinkResourcesGet_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task RulesCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)/rules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var topicName = _match.Groups["topicName"].Value; + var subscriptionName = _match.Groups["subscriptionName"].Value; + var ruleName = _match.Groups["ruleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/topics/" + + topicName + + "/subscriptions/" + + subscriptionName + + "/rules/" + + ruleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.RulesCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Creates or updates a Service Bus queue. This operation is idempotent. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. + /// Update a new rule and updates an existing rule /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters supplied to create or update a queue resource. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// The rule name. + /// Json string supplied to the RulesCreateOrUpdate operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -7419,7 +17233,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesCreateOrUpdate(string resourceGroupName, string namespaceName, string queueName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task RulesCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -7433,8 +17247,12 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/queues/" - + global::System.Uri.EscapeDataString(queueName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionName) + + "/rules/" + + global::System.Uri.EscapeDataString(ruleName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7448,31 +17266,30 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.QueuesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.RulesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Creates an authorization rule for a queue. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. - /// The authorization rule name. + /// Update a new rule and updates an existing rule /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The shared access authorization rule. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// The rule name. + /// Json string supplied to the RulesCreateOrUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesCreateOrUpdateAuthorizationRule(string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task RulesCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -7486,98 +17303,151 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/queues/" - + global::System.Uri.EscapeDataString(queueName) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionName) + + "/rules/" + + global::System.Uri.EscapeDataString(ruleName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.QueuesCreateOrUpdateAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + return await this.RulesCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Creates an authorization rule for a queue. - /// - /// The shared access authorization rule. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Update a new rule and updates an existing rule + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// The rule name. + /// Parameters supplied to create a rule. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesCreateOrUpdateAuthorizationRuleViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task RulesCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var queueName = _match.Groups["queueName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName - + "/queues/" - + queueName - + "/authorizationRules/" - + authorizationRuleName + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionName) + + "/rules/" + + global::System.Uri.EscapeDataString(ruleName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.QueuesCreateOrUpdateAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + return await this.RulesCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RulesCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Rule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -7587,7 +17457,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesCreateOrUpdateAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task RulesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7598,6 +17468,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -7605,13 +17476,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Rule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7627,45 +17498,103 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but - /// you will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. - /// The authorization rule name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The shared access authorization rule. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// The rule name. + /// Parameters supplied to create a rule. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesCreateOrUpdateAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task RulesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(queueName),queueName); - await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(topicName),topicName); + await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); + await eventListener.AssertNotNull(nameof(subscriptionName),subscriptionName); + await eventListener.AssertMinimumLength(nameof(subscriptionName),subscriptionName,1); + await eventListener.AssertMaximumLength(nameof(subscriptionName),subscriptionName,50); + await eventListener.AssertNotNull(nameof(ruleName),ruleName); + await eventListener.AssertMinimumLength(nameof(ruleName),ruleName,1); + await eventListener.AssertMaximumLength(nameof(ruleName),ruleName,50); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Creates or updates a Service Bus queue. This operation is idempotent. + /// Deletes an existing rule. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// The rule name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RulesDelete(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionName) + + "/rules/" + + global::System.Uri.EscapeDataString(ruleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RulesDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an existing rule. /// - /// Parameters supplied to create or update a queue resource. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -7673,7 +17602,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task RulesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -7681,17 +17610,19 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)/rules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var queueName = _match.Groups["queueName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var topicName = _match.Groups["topicName"].Value; + var subscriptionName = _match.Groups["subscriptionName"].Value; + var ruleName = _match.Groups["ruleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -7700,8 +17631,12 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/queues/" - + queueName + + "/topics/" + + topicName + + "/subscriptions/" + + subscriptionName + + "/rules/" + + ruleName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7710,22 +17645,19 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.QueuesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.RulesDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -7733,7 +17665,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task RulesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7744,6 +17676,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -7751,13 +17684,19 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbQueue.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7773,45 +17712,51 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters supplied to create or update a queue resource. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// The rule name. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesCreateOrUpdate_Validate(string resourceGroupName, string namespaceName, string queueName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task RulesDelete_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(queueName),queueName); - await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(topicName),topicName); + await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); + await eventListener.AssertNotNull(nameof(subscriptionName),subscriptionName); + await eventListener.AssertMinimumLength(nameof(subscriptionName),subscriptionName,1); + await eventListener.AssertMaximumLength(nameof(subscriptionName),subscriptionName,50); + await eventListener.AssertNotNull(nameof(ruleName),ruleName); + await eventListener.AssertMinimumLength(nameof(ruleName),ruleName,1); + await eventListener.AssertMaximumLength(nameof(ruleName),ruleName,50); } } - /// Deletes a queue from the specified namespace in a resource group. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. + /// Retrieves the description for the specified rule. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// The rule name. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -7819,7 +17764,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesDelete(string resourceGroupName, string namespaceName, string queueName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task RulesGet(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -7833,8 +17778,12 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/queues/" - + global::System.Uri.EscapeDataString(queueName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionName) + + "/rules/" + + global::System.Uri.EscapeDataString(ruleName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7843,24 +17792,18 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.QueuesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.RulesGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes a queue authorization rule. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. - /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// Retrieves the description for the specified rule. + /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -7868,24 +17811,41 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesDeleteAuthorizationRule(string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task RulesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)/rules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var topicName = _match.Groups["topicName"].Value; + var subscriptionName = _match.Groups["subscriptionName"].Value; + var ruleName = _match.Groups["ruleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/queues/" - + global::System.Uri.EscapeDataString(queueName) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) + + namespaceName + + "/topics/" + + topicName + + "/subscriptions/" + + subscriptionName + + "/rules/" + + ruleName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7894,27 +17854,24 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.QueuesDeleteAuthorizationRule_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.RulesGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes a queue authorization rule. + /// Retrieves the description for the specified rule. /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesDeleteAuthorizationRuleViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task RulesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -7922,18 +17879,19 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)/rules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var queueName = _match.Groups["queueName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var topicName = _match.Groups["topicName"].Value; + var subscriptionName = _match.Groups["subscriptionName"].Value; + var ruleName = _match.Groups["ruleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -7942,31 +17900,143 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/queues/" - + queueName - + "/authorizationRules/" - + authorizationRuleName + + "/topics/" + + topicName + + "/subscriptions/" + + subscriptionName + + "/rules/" + + ruleName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.RulesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Retrieves the description for the specified rule. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// The rule name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RulesGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionName) + + "/rules/" + + global::System.Uri.EscapeDataString(ruleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.QueuesDeleteAuthorizationRule_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + return await this.RulesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RulesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Rule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -7974,7 +18044,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesDeleteAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task RulesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7985,6 +18055,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -7992,19 +18063,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Rule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8020,42 +18085,54 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. - /// The authorization rule name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// The rule name. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesDeleteAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task RulesGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(queueName),queueName); - await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(topicName),topicName); + await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); + await eventListener.AssertNotNull(nameof(subscriptionName),subscriptionName); + await eventListener.AssertMinimumLength(nameof(subscriptionName),subscriptionName,1); + await eventListener.AssertMaximumLength(nameof(subscriptionName),subscriptionName,50); + await eventListener.AssertNotNull(nameof(ruleName),ruleName); + await eventListener.AssertMinimumLength(nameof(ruleName),ruleName,1); + await eventListener.AssertMaximumLength(nameof(ruleName),ruleName,50); } } - /// Deletes a queue from the specified namespace in a resource group. - /// + /// List all the rules within given topic-subscription + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -8063,56 +18140,53 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task RulesListBySubscriptions(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var queueName = _match.Groups["queueName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName - + "/queues/" - + queueName + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionName) + + "/rules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.QueuesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.RulesListBySubscriptions_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. + /// List all the rules within given topic-subscription + /// + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -8120,143 +18194,144 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task RulesListBySubscriptionsViaIdentity(global::System.String viaIdentity, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)/rules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules'"); } - } - } - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task QueuesDelete_Validate(string resourceGroupName, string namespaceName, string queueName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(queueName),queueName); - await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var topicName = _match.Groups["topicName"].Value; + var subscriptionName = _match.Groups["subscriptionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/topics/" + + topicName + + "/subscriptions/" + + subscriptionName + + "/rules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RulesListBySubscriptions_Call (request, onOk,onDefault,eventListener,sender); } } - /// Returns a description for the specified queue. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// List all the rules within given topic-subscription + /// + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesGet(string resourceGroupName, string namespaceName, string queueName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task RulesListBySubscriptionsViaIdentityWithResult(global::System.String viaIdentity, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)/rules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var topicName = _match.Groups["topicName"].Value; + var subscriptionName = _match.Groups["subscriptionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/queues/" - + global::System.Uri.EscapeDataString(queueName) + + namespaceName + + "/topics/" + + topicName + + "/subscriptions/" + + subscriptionName + + "/rules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.QueuesGet_Call(request,onOk,onDefault,eventListener,sender); + return await this.RulesListBySubscriptionsWithResult_Call (request, eventListener,sender); } - } - - /// Gets an authorization rule for a queue by rule name. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. - /// The authorization rule name. + } + + /// List all the rules within given topic-subscription /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesGetAuthorizationRule(string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task RulesListBySubscriptionsWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -8270,87 +18345,93 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/queues/" - + global::System.Uri.EscapeDataString(queueName) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionName) + + "/rules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.QueuesGetAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + return await this.RulesListBySubscriptionsWithResult_Call (request, eventListener,sender); } } - /// Gets an authorization rule for a queue by rule name. - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesGetAuthorizationRuleViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task RulesListBySubscriptionsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { - var apiVersion = @"2022-10-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.RuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}'"); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var queueName = _match.Groups["queueName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName - + "/queues/" - + queueName - + "/authorizationRules/" - + authorizationRuleName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.QueuesGetAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -8360,7 +18441,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesGetAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task RulesListBySubscriptions_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8371,6 +18452,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -8378,13 +18460,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.RuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8400,77 +18482,80 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get + /// Validation method for method. Call this like the actual call, but you will get /// validation events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. - /// The authorization rule name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesGetAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task RulesListBySubscriptions_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(queueName),queueName); - await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(topicName),topicName); + await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); + await eventListener.AssertNotNull(nameof(subscriptionName),subscriptionName); + await eventListener.AssertMinimumLength(nameof(subscriptionName),subscriptionName,1); + await eventListener.AssertMaximumLength(nameof(subscriptionName),subscriptionName,50); + await eventListener.AssertIsLessThanOrEqual(nameof(Skip),Skip,1000); + await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); + await eventListener.AssertIsLessThanOrEqual(nameof(Top),Top,1000); } } - /// Returns a description for the specified queue. - /// + /// Update a topic subscription. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// Parameters supplied to create a subscription resource. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SubscriptionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var queueName = _match.Groups["queueName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName - + "/queues/" - + queueName + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -8479,124 +18564,63 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.QueuesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.SubscriptionsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. + /// Update a topic subscription. + /// + /// Parameters supplied to create a subscription resource. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SubscriptionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbQueue.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'"); } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will get validation events - /// back. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task QueuesGet_Validate(string resourceGroupName, string namespaceName, string queueName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(queueName),queueName); - await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - /// Gets all authorization rules for a queue. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task QueuesListAuthorizationRules(string resourceGroupName, string namespaceName, string queueName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-10-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var topicName = _match.Groups["topicName"].Value; + var subscriptionName = _match.Groups["subscriptionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/queues/" - + global::System.Uri.EscapeDataString(queueName) - + "/authorizationRules" + + namespaceName + + "/topics/" + + topicName + + "/subscriptions/" + + subscriptionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -8605,26 +18629,30 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.QueuesListAuthorizationRules_Call(request,onOk,onDefault,eventListener,sender); + await this.SubscriptionsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets all authorization rules for a queue. + /// Update a topic subscription. /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Parameters supplied to create a subscription resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesListAuthorizationRulesViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SubscriptionsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -8632,17 +18660,18 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var queueName = _match.Groups["queueName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var topicName = _match.Groups["topicName"].Value; + var subscriptionName = _match.Groups["subscriptionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -8651,28 +18680,39 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/queues/" - + queueName - + "/authorizationRules" + + "/topics/" + + topicName + + "/subscriptions/" + + subscriptionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.QueuesListAuthorizationRules_Call(request,onOk,onDefault,eventListener,sender); + return await this.SubscriptionsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. + /// Update a topic subscription. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// Json string supplied to the SubscriptionsCreateOrUpdate operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -8681,92 +18721,60 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesListAuthorizationRules_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SubscriptionsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SubscriptionsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. + /// Update a topic subscription. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task QueuesListAuthorizationRules_Validate(string resourceGroupName, string namespaceName, string queueName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(queueName),queueName); - await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// Gets the queues within a namespace. /// Name of the Resource group within the Azure subscription. /// The namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// The topic name. + /// The subscription name. + /// Json string supplied to the SubscriptionsCreateOrUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesListByNamespace(string resourceGroupName, string namespaceName, string subscriptionId, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SubscriptionsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -8780,91 +18788,148 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/queues" + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.QueuesListByNamespace_Call(request,onOk,onDefault,eventListener,sender); + return await this.SubscriptionsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Gets the queues within a namespace. - /// - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Update a topic subscription. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// Parameters supplied to create a subscription resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesListByNamespaceViaIdentity(global::System.String viaIdentity, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SubscriptionsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName - + "/queues" + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.QueuesListByNamespace_Call(request,onOk,onDefault,eventListener,sender); + return await this.SubscriptionsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SubscriptionsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscription.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -8874,7 +18939,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesListByNamespace_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SubscriptionsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8885,6 +18950,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -8892,13 +18958,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbQueueListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscription.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8914,46 +18980,50 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// Parameters supplied to create a subscription resource. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesListByNamespace_Validate(string resourceGroupName, string namespaceName, string subscriptionId, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SubscriptionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertIsLessThanOrEqual(nameof(Skip),Skip,1000); - await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); - await eventListener.AssertIsLessThanOrEqual(nameof(Top),Top,1000); + await eventListener.AssertNotNull(nameof(topicName),topicName); + await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); + await eventListener.AssertNotNull(nameof(subscriptionName),subscriptionName); + await eventListener.AssertMinimumLength(nameof(subscriptionName),subscriptionName,1); + await eventListener.AssertMaximumLength(nameof(subscriptionName),subscriptionName,50); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Primary and secondary connection strings to the queue. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. - /// The authorization rule name. + /// Deletes a subscription from the specified topic. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -8961,7 +19031,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesListKeys(string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SubscriptionsDelete(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -8975,11 +19045,10 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/queues/" - + global::System.Uri.EscapeDataString(queueName) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) - + "/ListKeys" + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -8988,18 +19057,19 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.QueuesListKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.SubscriptionsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Primary and secondary connection strings to the queue. + /// Deletes a subscription from the specified topic. /// /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -9007,7 +19077,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesListKeysViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SubscriptionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -9015,18 +19085,18 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/ListKeys'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var queueName = _match.Groups["queueName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var topicName = _match.Groups["topicName"].Value; + var subscriptionName = _match.Groups["subscriptionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -9035,11 +19105,10 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/queues/" - + queueName - + "/authorizationRules/" - + authorizationRuleName - + "/ListKeys" + + "/topics/" + + topicName + + "/subscriptions/" + + subscriptionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9048,18 +19117,19 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.QueuesListKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.SubscriptionsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -9067,7 +19137,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesListKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SubscriptionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9078,6 +19148,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -9085,13 +19156,19 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9107,46 +19184,45 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. - /// The authorization rule name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesListKeys_Validate(string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SubscriptionsDelete_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(queueName),queueName); - await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(topicName),topicName); + await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); + await eventListener.AssertNotNull(nameof(subscriptionName),subscriptionName); + await eventListener.AssertMinimumLength(nameof(subscriptionName),subscriptionName,1); + await eventListener.AssertMaximumLength(nameof(subscriptionName),subscriptionName,50); } } - /// Regenerates the primary or secondary connection strings to the queue. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. - /// The authorization rule name. + /// Returns a subscription description for the specified topic. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters supplied to regenerate the authorization rule. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -9155,7 +19231,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesRegenerateKeys(string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SubscriptionsGet(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -9169,11 +19245,10 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/queues/" - + global::System.Uri.EscapeDataString(queueName) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) - + "/regenerateKeys" + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9182,22 +19257,17 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.QueuesRegenerateKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.SubscriptionsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Regenerates the primary or secondary connection strings to the queue. + /// Returns a subscription description for the specified topic. /// - /// Parameters supplied to regenerate the authorization rule. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -9206,7 +19276,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task QueuesRegenerateKeysViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SubscriptionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -9214,18 +19284,18 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/queues/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/regenerateKeys'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var queueName = _match.Groups["queueName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var topicName = _match.Groups["topicName"].Value; + var subscriptionName = _match.Groups["subscriptionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -9234,11 +19304,10 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/queues/" - + queueName - + "/authorizationRules/" - + authorizationRuleName - + "/regenerateKeys" + + "/topics/" + + topicName + + "/subscriptions/" + + subscriptionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9247,20 +19316,181 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.QueuesRegenerateKeys_Call(request,onOk,onDefault,eventListener,sender); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SubscriptionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Returns a subscription description for the specified topic. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SubscriptionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var topicName = _match.Groups["topicName"].Value; + var subscriptionName = _match.Groups["subscriptionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/topics/" + + topicName + + "/subscriptions/" + + subscriptionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SubscriptionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Returns a subscription description for the specified topic. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SubscriptionsGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SubscriptionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SubscriptionsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscription.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -9270,7 +19500,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesRegenerateKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SubscriptionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9281,6 +19511,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -9288,13 +19519,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscription.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9310,50 +19541,48 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The queue name. - /// The authorization rule name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters supplied to regenerate the authorization rule. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The subscription name. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task QueuesRegenerateKeys_Validate(string resourceGroupName, string namespaceName, string queueName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SubscriptionsGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(queueName),queueName); - await eventListener.AssertMinimumLength(nameof(queueName),queueName,1); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(topicName),topicName); + await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); + await eventListener.AssertNotNull(nameof(subscriptionName),subscriptionName); + await eventListener.AssertMinimumLength(nameof(subscriptionName),subscriptionName,1); + await eventListener.AssertMaximumLength(nameof(subscriptionName),subscriptionName,50); } } - /// Creates a new rule and updates an existing rule + /// List all the subscriptions under a specified topic. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. - /// The subscription name. - /// The rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Parameters supplied to create a rule. + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -9362,7 +19591,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task RulesCreateOrUpdate(string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SubscriptionsListByTopic(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -9378,34 +19607,34 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(namespaceName) + "/topics/" + global::System.Uri.EscapeDataString(topicName) - + "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionName) - + "/rules/" - + global::System.Uri.EscapeDataString(ruleName) + + "/subscriptions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.RulesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.SubscriptionsListByTopic_Call (request, onOk,onDefault,eventListener,sender); } } - /// Creates a new rule and updates an existing rule + /// List all the subscriptions under a specified topic. /// - /// Parameters supplied to create a rule. + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -9414,7 +19643,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task RulesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SubscriptionsListByTopicViaIdentity(global::System.String viaIdentity, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -9422,19 +19651,17 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)/rules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var topicName = _match.Groups["topicName"].Value; - var subscriptionName = _match.Groups["subscriptionName"].Value; - var ruleName = _match.Groups["ruleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -9445,241 +19672,208 @@ public partial class ServiceBus + namespaceName + "/topics/" + topicName - + "/subscriptions/" - + subscriptionName - + "/rules/" - + ruleName + + "/subscriptions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.RulesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.SubscriptionsListByTopic_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// List all the subscriptions under a specified topic. + /// + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task RulesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SubscriptionsListByTopicViaIdentityWithResult(global::System.String viaIdentity, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Rule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions'"); } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The topic name. - /// The subscription name. - /// The rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Parameters supplied to create a rule. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task RulesCreateOrUpdate_Validate(string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(topicName),topicName); - await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); - await eventListener.AssertNotNull(nameof(subscriptionName),subscriptionName); - await eventListener.AssertMinimumLength(nameof(subscriptionName),subscriptionName,1); - await eventListener.AssertMaximumLength(nameof(subscriptionName),subscriptionName,50); - await eventListener.AssertNotNull(nameof(ruleName),ruleName); - await eventListener.AssertMinimumLength(nameof(ruleName),ruleName,1); - await eventListener.AssertMaximumLength(nameof(ruleName),ruleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - /// Deletes an existing rule. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The topic name. - /// The subscription name. - /// The rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task RulesDelete(string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-10-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var topicName = _match.Groups["topicName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) + + namespaceName + "/topics/" - + global::System.Uri.EscapeDataString(topicName) - + "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionName) - + "/rules/" - + global::System.Uri.EscapeDataString(ruleName) + + topicName + + "/subscriptions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.RulesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + return await this.SubscriptionsListByTopicWithResult_Call (request, eventListener,sender); } } - /// Deletes an existing rule. - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// List all the subscriptions under a specified topic. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task RulesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SubscriptionsListByTopicWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)/rules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var topicName = _match.Groups["topicName"].Value; - var subscriptionName = _match.Groups["subscriptionName"].Value; - var ruleName = _match.Groups["ruleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName + + global::System.Uri.EscapeDataString(namespaceName) + "/topics/" - + topicName - + "/subscriptions/" - + subscriptionName - + "/rules/" - + ruleName + + global::System.Uri.EscapeDataString(topicName) + + "/subscriptions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.RulesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + return await this.SubscriptionsListByTopicWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SubscriptionsListByTopicWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscriptionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -9687,7 +19881,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task RulesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SubscriptionsListByTopic_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9698,6 +19892,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -9705,19 +19900,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscriptionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9733,24 +19922,27 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation events - /// back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. - /// The subscription name. - /// The rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task RulesDelete_Validate(string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SubscriptionsListByTopic_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -9759,33 +19951,83 @@ public partial class ServiceBus await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); await eventListener.AssertNotNull(nameof(topicName),topicName); await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); - await eventListener.AssertNotNull(nameof(subscriptionName),subscriptionName); - await eventListener.AssertMinimumLength(nameof(subscriptionName),subscriptionName,1); - await eventListener.AssertMaximumLength(nameof(subscriptionName),subscriptionName,50); - await eventListener.AssertNotNull(nameof(ruleName),ruleName); - await eventListener.AssertMinimumLength(nameof(ruleName),ruleName,1); - await eventListener.AssertMaximumLength(nameof(ruleName),ruleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertIsLessThanOrEqual(nameof(Skip),Skip,1000); + await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); + await eventListener.AssertIsLessThanOrEqual(nameof(Top),Top,1000); } } - /// Retrieves the description for the specified rule. + /// Update a topic in the specified namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. - /// The subscription name. - /// The rule name. + /// Parameters supplied to create a topic resource. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TopicsCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TopicsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update an authorization rule for the specified topic. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The authorization rule name. + /// The shared access authorization rule. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task RulesGet(string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsCreateOrUpdateAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -9801,10 +20043,8 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(namespaceName) + "/topics/" + global::System.Uri.EscapeDataString(topicName) - + "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionName) - + "/rules/" - + global::System.Uri.EscapeDataString(ruleName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9813,26 +20053,32 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.RulesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.TopicsCreateOrUpdateAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); } } - /// Retrieves the description for the specified rule. + /// Update an authorization rule for the specified topic. /// + /// The shared access authorization rule. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task RulesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsCreateOrUpdateAuthorizationRuleViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -9840,19 +20086,18 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)/rules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var topicName = _match.Groups["topicName"].Value; - var subscriptionName = _match.Groups["subscriptionName"].Value; - var ruleName = _match.Groups["ruleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -9863,10 +20108,8 @@ public partial class ServiceBus + namespaceName + "/topics/" + topicName - + "/subscriptions/" - + subscriptionName - + "/rules/" - + ruleName + + "/authorizationRules/" + + authorizationRuleName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9875,121 +20118,152 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.RulesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.TopicsCreateOrUpdateAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Update an authorization rule for the specified topic. + /// + /// The shared access authorization rule. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task RulesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsCreateOrUpdateAuthorizationRuleViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Rule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}'"); } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var topicName = _match.Groups["topicName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/topics/" + + topicName + + "/authorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TopicsCreateOrUpdateAuthorizationRuleWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will get validation events - /// back. - /// + /// Update an authorization rule for the specified topic. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. - /// The subscription name. - /// The rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// The authorization rule name. + /// Json string supplied to the TopicsCreateOrUpdateAuthorizationRule operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task RulesGet_Validate(string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task TopicsCreateOrUpdateAuthorizationRuleViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(topicName),topicName); - await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); - await eventListener.AssertNotNull(nameof(subscriptionName),subscriptionName); - await eventListener.AssertMinimumLength(nameof(subscriptionName),subscriptionName,1); - await eventListener.AssertMaximumLength(nameof(subscriptionName),subscriptionName,50); - await eventListener.AssertNotNull(nameof(ruleName),ruleName); - await eventListener.AssertMinimumLength(nameof(ruleName),ruleName,1); - await eventListener.AssertMaximumLength(nameof(ruleName),ruleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TopicsCreateOrUpdateAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); } } - /// List all the rules within given topic-subscription + /// Update an authorization rule for the specified topic. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. - /// The subscription name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// The authorization rule name. + /// Json string supplied to the TopicsCreateOrUpdateAuthorizationRule operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task RulesListBySubscriptions(string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string subscriptionId, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsCreateOrUpdateAuthorizationRuleViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -10005,99 +20279,148 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(namespaceName) + "/topics/" + global::System.Uri.EscapeDataString(topicName) - + "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionName) - + "/rules" + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.RulesListBySubscriptions_Call(request,onOk,onDefault,eventListener,sender); + return await this.TopicsCreateOrUpdateAuthorizationRuleWithResult_Call (request, eventListener,sender); } } - /// List all the rules within given topic-subscription - /// - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Update an authorization rule for the specified topic. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The authorization rule name. + /// The shared access authorization rule. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task RulesListBySubscriptionsViaIdentity(global::System.String viaIdentity, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsCreateOrUpdateAuthorizationRuleWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)/rules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var topicName = _match.Groups["topicName"].Value; - var subscriptionName = _match.Groups["subscriptionName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName + + global::System.Uri.EscapeDataString(namespaceName) + "/topics/" - + topicName - + "/subscriptions/" - + subscriptionName - + "/rules" + + global::System.Uri.EscapeDataString(topicName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.RulesListBySubscriptions_Call(request,onOk,onDefault,eventListener,sender); + return await this.TopicsCreateOrUpdateAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TopicsCreateOrUpdateAuthorizationRuleWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -10107,7 +20430,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task RulesListBySubscriptions_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TopicsCreateOrUpdateAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10118,6 +20441,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -10125,13 +20449,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.RuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10147,27 +20471,25 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. - /// The subscription name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. + /// The authorization rule name. + /// The shared access authorization rule. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task RulesListBySubscriptions_Validate(string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string subscriptionId, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TopicsCreateOrUpdateAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -10176,50 +20498,55 @@ public partial class ServiceBus await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); await eventListener.AssertNotNull(nameof(topicName),topicName); await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); - await eventListener.AssertNotNull(nameof(subscriptionName),subscriptionName); - await eventListener.AssertMinimumLength(nameof(subscriptionName),subscriptionName,1); - await eventListener.AssertMaximumLength(nameof(subscriptionName),subscriptionName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertIsLessThanOrEqual(nameof(Skip),Skip,1000); - await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); - await eventListener.AssertIsLessThanOrEqual(nameof(Top),Top,1000); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Creates a topic subscription. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The topic name. - /// The subscription name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Parameters supplied to create a subscription resource. + /// Update a topic in the specified namespace. + /// + /// Parameters supplied to create a topic resource. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SubscriptionsCreateOrUpdate(string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var topicName = _match.Groups["topicName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) + + namespaceName + "/topics/" - + global::System.Uri.EscapeDataString(topicName) - + "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionName) + + topicName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10233,26 +20560,25 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SubscriptionsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.TopicsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Creates a topic subscription. + /// Update a topic in the specified namespace. /// - /// Parameters supplied to create a subscription resource. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Parameters supplied to create a topic resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SubscriptionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -10260,18 +20586,17 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var topicName = _match.Groups["topicName"].Value; - var subscriptionName = _match.Groups["subscriptionName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -10282,31 +20607,34 @@ public partial class ServiceBus + namespaceName + "/topics/" + topicName - + "/subscriptions/" - + subscriptionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.SubscriptionsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + return await this.TopicsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. + /// Update a topic in the specified namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// Json string supplied to the TopicsCreateOrUpdate operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -10315,98 +20643,57 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SubscriptionsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSubscription.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TopicsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The topic name. - /// The subscription name. + /// Update a topic in the specified namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters supplied to create a subscription resource. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task SubscriptionsCreateOrUpdate_Validate(string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(topicName),topicName); - await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); - await eventListener.AssertNotNull(nameof(subscriptionName),subscriptionName); - await eventListener.AssertMinimumLength(nameof(subscriptionName),subscriptionName,1); - await eventListener.AssertMaximumLength(nameof(subscriptionName),subscriptionName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - - /// Deletes a subscription from the specified topic. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. - /// The subscription name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Json string supplied to the TopicsCreateOrUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SubscriptionsDelete(string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -10422,89 +20709,141 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(namespaceName) + "/topics/" + global::System.Uri.EscapeDataString(topicName) - + "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.SubscriptionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + return await this.TopicsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Deletes a subscription from the specified topic. - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Update a topic in the specified namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// Parameters supplied to create a topic resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SubscriptionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var topicName = _match.Groups["topicName"].Value; - var subscriptionName = _match.Groups["subscriptionName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName + + global::System.Uri.EscapeDataString(namespaceName) + "/topics/" - + topicName - + "/subscriptions/" - + subscriptionName + + global::System.Uri.EscapeDataString(topicName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.SubscriptionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + return await this.TopicsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TopicsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbTopic.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -10512,7 +20851,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SubscriptionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TopicsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10523,6 +20862,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -10530,19 +20870,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbTopic.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10558,46 +20892,94 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. - /// The subscription name. + /// Parameters supplied to create a topic resource. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TopicsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertNotNull(nameof(topicName),topicName); + await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes a topic from the specified namespace and resource group. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SubscriptionsDelete_Validate(string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task TopicsDelete(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(topicName),topicName); - await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); - await eventListener.AssertNotNull(nameof(subscriptionName),subscriptionName); - await eventListener.AssertMinimumLength(nameof(subscriptionName),subscriptionName,1); - await eventListener.AssertMaximumLength(nameof(subscriptionName),subscriptionName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TopicsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Returns a subscription description for the specified topic. + /// Deletes a topic authorization rule. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. - /// The subscription name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// The authorization rule name. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -10605,7 +20987,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SubscriptionsGet(string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsDeleteAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -10621,8 +21003,8 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(namespaceName) + "/topics/" + global::System.Uri.EscapeDataString(topicName) - + "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10631,18 +21013,19 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SubscriptionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.TopicsDeleteAuthorizationRule_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Returns a subscription description for the specified topic. + /// Deletes a topic authorization rule. /// /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -10650,7 +21033,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SubscriptionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsDeleteAuthorizationRuleViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -10658,18 +21041,18 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var topicName = _match.Groups["topicName"].Value; - var subscriptionName = _match.Groups["subscriptionName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -10680,8 +21063,8 @@ public partial class ServiceBus + namespaceName + "/topics/" + topicName - + "/subscriptions/" - + subscriptionName + + "/authorizationRules/" + + authorizationRuleName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10690,18 +21073,19 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SubscriptionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.TopicsDeleteAuthorizationRule_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -10709,7 +21093,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SubscriptionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TopicsDeleteAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10720,6 +21104,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -10727,13 +21112,19 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSubscription.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10749,23 +21140,24 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. - /// The subscription name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// The authorization rule name. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SubscriptionsGet_Validate(string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TopicsDeleteAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -10774,76 +21166,16 @@ public partial class ServiceBus await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); await eventListener.AssertNotNull(nameof(topicName),topicName); await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); - await eventListener.AssertNotNull(nameof(subscriptionName),subscriptionName); - await eventListener.AssertMinimumLength(nameof(subscriptionName),subscriptionName,1); - await eventListener.AssertMaximumLength(nameof(subscriptionName),subscriptionName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// List all the subscriptions under a specified topic. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The topic name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task SubscriptionsListByTopic(string resourceGroupName, string namespaceName, string topicName, string subscriptionId, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-10-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ServiceBus/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/topics/" - + global::System.Uri.EscapeDataString(topicName) - + "/subscriptions" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.SubscriptionsListByTopic_Call(request,onOk,onDefault,eventListener,sender); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); } } - /// List all the subscriptions under a specified topic. + /// Deletes a topic from the specified namespace and resource group. /// - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -10851,7 +21183,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SubscriptionsListByTopicViaIdentity(global::System.String viaIdentity, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -10859,17 +21191,17 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/subscriptions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var topicName = _match.Groups["topicName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -10880,31 +21212,27 @@ public partial class ServiceBus + namespaceName + "/topics/" + topicName - + "/subscriptions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SubscriptionsListByTopic_Call(request,onOk,onDefault,eventListener,sender); + await this.TopicsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -10912,7 +21240,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SubscriptionsListByTopic_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TopicsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10923,6 +21251,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -10930,13 +21259,19 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSubscriptionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10952,26 +21287,23 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SubscriptionsListByTopic_Validate(string resourceGroupName, string namespaceName, string topicName, string subscriptionId, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TopicsDelete_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -10980,20 +21312,63 @@ public partial class ServiceBus await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); await eventListener.AssertNotNull(nameof(topicName),topicName); await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertIsLessThanOrEqual(nameof(Skip),Skip,1000); - await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); - await eventListener.AssertIsLessThanOrEqual(nameof(Top),Top,1000); } } - /// Creates a topic in the specified namespace. + /// Returns a description for the specified topic. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TopicsGet(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TopicsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Returns the specified authorization rule. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters supplied to create a topic resource. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The authorization rule name. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -11002,7 +21377,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsCreateOrUpdate(string resourceGroupName, string namespaceName, string topicName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsGetAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -11018,6 +21393,8 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(namespaceName) + "/topics/" + global::System.Uri.EscapeDataString(topicName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -11026,27 +21403,17 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TopicsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.TopicsGetAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); } } - /// Creates an authorization rule for the specified topic. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The topic name. - /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The shared access authorization rule. + /// Returns the specified authorization rule. + /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -11055,24 +21422,38 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsCreateOrUpdateAuthorizationRule(string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsGetAuthorizationRuleViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var topicName = _match.Groups["topicName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) + + namespaceName + "/topics/" - + global::System.Uri.EscapeDataString(topicName) + + topicName + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) + + authorizationRuleName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -11081,31 +21462,24 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TopicsCreateOrUpdateAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + await this.TopicsGetAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); } } - /// Creates an authorization rule for the specified topic. + /// Returns the specified authorization rule. /// - /// The shared access authorization rule. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsCreateOrUpdateAuthorizationRuleViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsGetAuthorizationRuleViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -11120,11 +21494,11 @@ public partial class ServiceBus } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var topicName = _match.Groups["topicName"].Value; var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -11141,27 +21515,131 @@ public partial class ServiceBus + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TopicsGetAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// Returns the specified authorization rule. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The authorization rule name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TopicsGetAuthorizationRuleWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.TopicsCreateOrUpdateAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + return await this.TopicsGetAuthorizationRuleWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TopicsGetAuthorizationRuleWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -11170,7 +21648,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TopicsCreateOrUpdateAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TopicsGetAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -11181,6 +21659,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -11188,13 +21667,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -11210,24 +21689,24 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but - /// you will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The shared access authorization rule. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TopicsCreateOrUpdateAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TopicsGetAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -11239,15 +21718,11 @@ public partial class ServiceBus await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Creates a topic in the specified namespace. + /// Returns a description for the specified topic. /// - /// Parameters supplied to create a topic resource. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -11256,7 +21731,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -11271,10 +21746,10 @@ public partial class ServiceBus } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var topicName = _match.Groups["topicName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -11293,20 +21768,175 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.TopicsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TopicsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Returns a description for the specified topic. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TopicsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var topicName = _match.Groups["topicName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/topics/" + + topicName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TopicsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Returns a description for the specified topic. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TopicsGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TopicsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TopicsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbTopic.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -11316,7 +21946,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TopicsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TopicsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -11327,6 +21957,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -11334,13 +21965,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbTopic.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbTopic.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -11356,23 +21987,23 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Parameters supplied to create a topic resource. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TopicsCreateOrUpdate_Validate(string resourceGroupName, string namespaceName, string topicName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TopicsGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -11381,20 +22012,16 @@ public partial class ServiceBus await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); await eventListener.AssertNotNull(nameof(topicName),topicName); await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Deletes a topic from the specified namespace and resource group. + /// Gets authorization rules for a topic. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -11402,7 +22029,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsDelete(string resourceGroupName, string namespaceName, string topicName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsListAuthorizationRules(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -11418,6 +22045,7 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(namespaceName) + "/topics/" + global::System.Uri.EscapeDataString(topicName) + + "/authorizationRules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -11426,24 +22054,18 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TopicsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.TopicsListAuthorizationRules_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes a topic authorization rule. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The topic name. - /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// Gets authorization rules for a topic. + /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -11451,24 +22073,36 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsDeleteAuthorizationRule(string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsListAuthorizationRulesViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/authorizationRules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var topicName = _match.Groups["topicName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) + + namespaceName + "/topics/" - + global::System.Uri.EscapeDataString(topicName) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) + + topicName + + "/authorizationRules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -11477,27 +22111,24 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TopicsDeleteAuthorizationRule_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.TopicsListAuthorizationRules_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes a topic authorization rule. + /// Gets authorization rules for a topic. /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsDeleteAuthorizationRuleViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsListAuthorizationRulesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -11505,18 +22136,17 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/authorizationRules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var topicName = _match.Groups["topicName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -11527,175 +22157,135 @@ public partial class ServiceBus + namespaceName + "/topics/" + topicName - + "/authorizationRules/" - + authorizationRuleName + + "/authorizationRules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.TopicsDeleteAuthorizationRule_Call(request,onOk,onNoContent,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task TopicsDeleteAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + return await this.TopicsListAuthorizationRulesWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. - /// + /// Gets authorization rules for a topic. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. - /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task TopicsDeleteAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(topicName),topicName); - await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// Deletes a topic from the specified namespace and resource group. - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsListAuthorizationRulesWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var topicName = _match.Groups["topicName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName + + global::System.Uri.EscapeDataString(namespaceName) + "/topics/" - + topicName + + global::System.Uri.EscapeDataString(topicName) + + "/authorizationRules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.TopicsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + return await this.TopicsListAuthorizationRulesWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TopicsListAuthorizationRulesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -11703,7 +22293,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TopicsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TopicsListAuthorizationRules_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -11714,6 +22304,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -11721,19 +22312,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -11749,22 +22334,23 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TopicsDelete_Validate(string resourceGroupName, string namespaceName, string topicName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TopicsListAuthorizationRules_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -11773,16 +22359,18 @@ public partial class ServiceBus await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); await eventListener.AssertNotNull(nameof(topicName),topicName); await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); } } - /// Returns a description for the specified topic. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The topic name. + /// Gets all the topics in a namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -11791,7 +22379,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsGet(string resourceGroupName, string namespaceName, string topicName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsListByNamespace(string subscriptionId, string resourceGroupName, string namespaceName, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -11805,10 +22393,13 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/topics/" - + global::System.Uri.EscapeDataString(topicName) + + "/topics" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -11820,17 +22411,16 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TopicsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.TopicsListByNamespace_Call (request, onOk,onDefault,eventListener,sender); } } - /// Returns the specified authorization rule. - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The topic name. - /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// Gets all the topics in a namespace. + /// + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -11839,26 +22429,39 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsGetAuthorizationRule(string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsListByNamespaceViaIdentity(global::System.String viaIdentity, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/topics/" - + global::System.Uri.EscapeDataString(topicName) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) + + namespaceName + + "/topics" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -11870,21 +22473,23 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TopicsGetAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + await this.TopicsListByNamespace_Call (request, onOk,onDefault,eventListener,sender); } } - /// Returns the specified authorization rule. + /// Gets all the topics in a namespace. /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsGetAuthorizationRuleViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsListByNamespaceViaIdentityWithResult(global::System.String viaIdentity, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -11892,18 +22497,16 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var topicName = _match.Groups["topicName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -11912,38 +22515,88 @@ public partial class ServiceBus + resourceGroupName + "/providers/Microsoft.ServiceBus/namespaces/" + namespaceName - + "/topics/" - + topicName - + "/authorizationRules/" - + authorizationRuleName + + "/topics" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TopicsListByNamespaceWithResult_Call (request, eventListener,sender); + } + } + + /// Gets all the topics in a namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TopicsListByNamespaceWithResult(string subscriptionId, string resourceGroupName, string namespaceName, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.TopicsGetAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + return await this.TopicsListByNamespaceWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TopicsGetAuthorizationRule_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TopicsListByNamespaceWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -11951,24 +22604,37 @@ public partial class ServiceBus try { var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) { case global::System.Net.HttpStatusCode.OK: { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbTopicListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } default: { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } } } } @@ -11982,96 +22648,7 @@ public partial class ServiceBus } } - /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The topic name. - /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task TopicsGetAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(topicName),topicName); - await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// Returns a description for the specified topic. - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task TopicsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-10-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var topicName = _match.Groups["topicName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName - + "/topics/" - + topicName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.TopicsGet_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -12081,7 +22658,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TopicsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TopicsListByNamespace_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -12092,6 +22669,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -12099,13 +22677,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbTopic.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbTopicListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -12121,40 +22699,45 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation events - /// back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The topic name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TopicsGet_Validate(string resourceGroupName, string namespaceName, string topicName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TopicsListByNamespace_Validate(string subscriptionId, string resourceGroupName, string namespaceName, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(topicName),topicName); - await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertIsLessThanOrEqual(nameof(Skip),Skip,1000); + await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); + await eventListener.AssertIsLessThanOrEqual(nameof(Top),Top,1000); } } - /// Gets authorization rules for a topic. + /// Gets the primary and secondary connection strings for the topic. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// The authorization rule name. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -12163,7 +22746,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsListAuthorizationRules(string resourceGroupName, string namespaceName, string topicName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsListKeys(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -12179,7 +22762,9 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(namespaceName) + "/topics/" + global::System.Uri.EscapeDataString(topicName) - + "/authorizationRules" + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/ListKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -12188,16 +22773,16 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TopicsListAuthorizationRules_Call(request,onOk,onDefault,eventListener,sender); + await this.TopicsListKeys_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets authorization rules for a topic. + /// Gets the primary and secondary connection strings for the topic. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -12207,7 +22792,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsListAuthorizationRulesViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsListKeysViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -12215,17 +22800,18 @@ public partial class ServiceBus { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/authorizationRules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var topicName = _match.Groups["topicName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -12236,7 +22822,9 @@ public partial class ServiceBus + namespaceName + "/topics/" + topicName - + "/authorizationRules" + + "/authorizationRules/" + + authorizationRuleName + + "/ListKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -12245,111 +22833,87 @@ public partial class ServiceBus // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TopicsListAuthorizationRules_Call(request,onOk,onDefault,eventListener,sender); + await this.TopicsListKeys_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Gets the primary and secondary connection strings for the topic. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TopicsListAuthorizationRules_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsListKeysViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}'"); } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var topicName = _match.Groups["topicName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/topics/" + + topicName + + "/authorizationRules/" + + authorizationRuleName + + "/ListKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TopicsListKeysWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. - /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name - /// The topic name. + /// Gets the primary and secondary connection strings for the topic. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task TopicsListAuthorizationRules_Validate(string resourceGroupName, string namespaceName, string topicName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(topicName),topicName); - await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// Gets all the topics in a namespace. /// Name of the Resource group within the Azure subscription. /// The namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// The topic name. + /// The authorization rule name. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsListByNamespace(string resourceGroupName, string namespaceName, string subscriptionId, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsListKeysWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -12363,91 +22927,89 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/topics" + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/ListKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.TopicsListByNamespace_Call(request,onOk,onDefault,eventListener,sender); + return await this.TopicsListKeysWithResult_Call (request, eventListener,sender); } } - /// Gets all the topics in a namespace. - /// - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsListByNamespaceViaIdentity(global::System.String viaIdentity, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TopicsListKeysWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { - var apiVersion = @"2022-10-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics'"); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName - + "/topics" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.TopicsListByNamespace_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -12457,7 +23019,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TopicsListByNamespace_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TopicsListKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -12468,6 +23030,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -12475,13 +23038,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbTopicListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -12497,54 +23060,56 @@ public partial class ServiceBus } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// Name of the Resource group within the Azure subscription. - /// The namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The authorization rule name. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TopicsListByNamespace_Validate(string resourceGroupName, string namespaceName, string subscriptionId, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TopicsListKeys_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertIsLessThanOrEqual(nameof(Skip),Skip,1000); - await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); - await eventListener.AssertIsLessThanOrEqual(nameof(Top),Top,1000); + await eventListener.AssertNotNull(nameof(topicName),topicName); + await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); } } - /// Gets the primary and secondary connection strings for the topic. + /// Regenerates primary or secondary connection strings for the topic. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// Parameters supplied to regenerate the authorization rule. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsListKeys(string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsRegenerateKeys(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -12562,7 +23127,7 @@ public partial class ServiceBus + global::System.Uri.EscapeDataString(topicName) + "/authorizationRules/" + global::System.Uri.EscapeDataString(authorizationRuleName) - + "/ListKeys" + + "/regenerateKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -12575,22 +23140,28 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TopicsListKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.TopicsRegenerateKeys_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets the primary and secondary connection strings for the topic. + /// Regenerates primary or secondary connection strings for the topic. /// + /// Parameters supplied to regenerate the authorization rule. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsListKeysViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsRegenerateKeysViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -12601,15 +23172,15 @@ public partial class ServiceBus var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/ListKeys'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var topicName = _match.Groups["topicName"].Value; var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -12622,7 +23193,7 @@ public partial class ServiceBus + topicName + "/authorizationRules/" + authorizationRuleName - + "/ListKeys" + + "/regenerateKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -12635,110 +23206,150 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TopicsListKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.TopicsRegenerateKeys_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Regenerates primary or secondary connection strings for the topic. + /// + /// Parameters supplied to regenerate the authorization rule. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TopicsListKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsRegenerateKeysViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}'"); } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var topicName = _match.Groups["topicName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ServiceBus/namespaces/" + + namespaceName + + "/topics/" + + topicName + + "/authorizationRules/" + + authorizationRuleName + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TopicsRegenerateKeysWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// + /// Regenerates primary or secondary connection strings for the topic. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// Json string supplied to the TopicsRegenerateKeys operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TopicsListKeys_Validate(string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task TopicsRegenerateKeysViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { + var apiVersion = @"2022-10-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertNotNull(nameof(topicName),topicName); - await eventListener.AssertMinimumLength(nameof(topicName),topicName,1); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ServiceBus/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/topics/" + + global::System.Uri.EscapeDataString(topicName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TopicsRegenerateKeys_Call (request, onOk,onDefault,eventListener,sender); } } /// Regenerates primary or secondary connection strings for the topic. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Parameters supplied to regenerate the authorization rule. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Json string supplied to the TopicsRegenerateKeys operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsRegenerateKeys(string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsRegenerateKeysViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters @@ -12761,89 +23372,139 @@ public partial class ServiceBus + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.TopicsRegenerateKeys_Call(request,onOk,onDefault,eventListener,sender); + return await this.TopicsRegenerateKeysWithResult_Call (request, eventListener,sender); } } /// Regenerates primary or secondary connection strings for the topic. - /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the Resource group within the Azure subscription. + /// The namespace name + /// The topic name. + /// The authorization rule name. /// Parameters supplied to regenerate the authorization rule. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TopicsRegenerateKeysViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TopicsRegenerateKeysWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-10-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceBus/namespaces/(?[^/]+)/topics/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/regenerateKeys'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var topicName = _match.Groups["topicName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ServiceBus/namespaces/" - + namespaceName + + global::System.Uri.EscapeDataString(namespaceName) + "/topics/" - + topicName + + global::System.Uri.EscapeDataString(topicName) + "/authorizationRules/" - + authorizationRuleName + + global::System.Uri.EscapeDataString(authorizationRuleName) + "/regenerateKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.TopicsRegenerateKeys_Call(request,onOk,onDefault,eventListener,sender); + return await this.TopicsRegenerateKeysWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TopicsRegenerateKeysWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -12853,7 +23514,7 @@ public partial class ServiceBus /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TopicsRegenerateKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TopicsRegenerateKeys_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -12864,6 +23525,7 @@ public partial class ServiceBus await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -12871,13 +23533,13 @@ public partial class ServiceBus case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -12896,21 +23558,22 @@ public partial class ServiceBus /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the Resource group within the Azure subscription. /// The namespace name /// The topic name. /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// Parameters supplied to regenerate the authorization rule. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TopicsRegenerateKeys_Validate(string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TopicsRegenerateKeys_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); @@ -12922,7 +23585,6 @@ public partial class ServiceBus await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); await eventListener.AssertMaximumLength(nameof(authorizationRuleName),authorizationRuleName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/AccessRights.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/AccessRights.Completer.cs deleted file mode 100644 index c2a2bc749364..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/AccessRights.Completer.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Argument completer implementation for AccessRights. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRightsTypeConverter))] - public partial struct AccessRights : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Manage".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Manage'", "Manage", global::System.Management.Automation.CompletionResultType.ParameterValue, "Manage"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Send".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Send'", "Send", global::System.Management.Automation.CompletionResultType.ParameterValue, "Send"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Listen".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Listen'", "Listen", global::System.Management.Automation.CompletionResultType.ParameterValue, "Listen"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/AccessRights.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/AccessRights.TypeConverter.cs deleted file mode 100644 index 45eceb69e26a..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/AccessRights.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// TypeConverter implementation for AccessRights. - public partial class AccessRightsTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => AccessRights.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/AccessRights.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/AccessRights.cs deleted file mode 100644 index 321362755e46..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/AccessRights.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - public partial struct AccessRights : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights Listen = @"Listen"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights Manage = @"Manage"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights Send = @"Send"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private AccessRights(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to AccessRights - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new AccessRights(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type AccessRights - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type AccessRights (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is AccessRights && Equals((AccessRights)obj); - } - - /// Returns hashCode for enum AccessRights - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for AccessRights - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to AccessRights - /// the value to convert to an instance of . - - public static implicit operator AccessRights(string value) - { - return new AccessRights(value); - } - - /// Implicit operator to convert AccessRights to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights e) - { - return e._value; - } - - /// Overriding != operator for enum AccessRights - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum AccessRights - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/CreatedByType.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/CreatedByType.Completer.cs deleted file mode 100644 index e6b6a10e16e8..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/CreatedByType.Completer.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// The type of identity that created the resource. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByTypeTypeConverter))] - public partial struct CreatedByType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "User".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'User'", "User", global::System.Management.Automation.CompletionResultType.ParameterValue, "User"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Application".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Application'", "Application", global::System.Management.Automation.CompletionResultType.ParameterValue, "Application"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "ManagedIdentity".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'ManagedIdentity'", "ManagedIdentity", global::System.Management.Automation.CompletionResultType.ParameterValue, "ManagedIdentity"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Key".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Key'", "Key", global::System.Management.Automation.CompletionResultType.ParameterValue, "Key"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs deleted file mode 100644 index 1b748e4f4140..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// The type of identity that created the resource. - public partial class CreatedByTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CreatedByType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/CreatedByType.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/CreatedByType.cs deleted file mode 100644 index 5b1c8fa2614c..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/CreatedByType.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// The type of identity that created the resource. - public partial struct CreatedByType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType Application = @"Application"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType Key = @"Key"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType ManagedIdentity = @"ManagedIdentity"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType User = @"User"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to CreatedByType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new CreatedByType(global::System.Convert.ToString(value)); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private CreatedByType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Compares values of enum type CreatedByType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type CreatedByType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is CreatedByType && Equals((CreatedByType)obj); - } - - /// Returns hashCode for enum CreatedByType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for CreatedByType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to CreatedByType - /// the value to convert to an instance of . - - public static implicit operator CreatedByType(string value) - { - return new CreatedByType(value); - } - - /// Implicit operator to convert CreatedByType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType e) - { - return e._value; - } - - /// Overriding != operator for enum CreatedByType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum CreatedByType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/DefaultAction.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/DefaultAction.Completer.cs deleted file mode 100644 index 92e237e9fde3..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/DefaultAction.Completer.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Default Action for Network Rule Set - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultActionTypeConverter))] - public partial struct DefaultAction : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Allow".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Allow'", "Allow", global::System.Management.Automation.CompletionResultType.ParameterValue, "Allow"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deny".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Deny'", "Deny", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deny"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/DefaultAction.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/DefaultAction.TypeConverter.cs deleted file mode 100644 index 42b96c891313..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/DefaultAction.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Default Action for Network Rule Set - public partial class DefaultActionTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DefaultAction.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/DefaultAction.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/DefaultAction.cs deleted file mode 100644 index 5f89ebbecc26..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/DefaultAction.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Default Action for Network Rule Set - public partial struct DefaultAction : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction Allow = @"Allow"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction Deny = @"Deny"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to DefaultAction - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new DefaultAction(global::System.Convert.ToString(value)); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private DefaultAction(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Compares values of enum type DefaultAction - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type DefaultAction (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is DefaultAction && Equals((DefaultAction)obj); - } - - /// Returns hashCode for enum DefaultAction - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for DefaultAction - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to DefaultAction - /// the value to convert to an instance of . - - public static implicit operator DefaultAction(string value) - { - return new DefaultAction(value); - } - - /// Implicit operator to convert DefaultAction to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction e) - { - return e._value; - } - - /// Overriding != operator for enum DefaultAction - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum DefaultAction - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EndPointProvisioningState.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EndPointProvisioningState.Completer.cs deleted file mode 100644 index a385692fd790..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EndPointProvisioningState.Completer.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Provisioning state of the Private Endpoint Connection. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningStateTypeConverter))] - public partial struct EndPointProvisioningState : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EndPointProvisioningState.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EndPointProvisioningState.TypeConverter.cs deleted file mode 100644 index 76a680f12eed..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EndPointProvisioningState.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Provisioning state of the Private Endpoint Connection. - public partial class EndPointProvisioningStateTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => EndPointProvisioningState.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EndPointProvisioningState.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EndPointProvisioningState.cs deleted file mode 100644 index f8360a7db660..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EndPointProvisioningState.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Provisioning state of the Private Endpoint Connection. - public partial struct EndPointProvisioningState : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState Canceled = @"Canceled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState Creating = @"Creating"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState Deleting = @"Deleting"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState Failed = @"Failed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState Succeeded = @"Succeeded"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState Updating = @"Updating"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to EndPointProvisioningState - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new EndPointProvisioningState(global::System.Convert.ToString(value)); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private EndPointProvisioningState(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Compares values of enum type EndPointProvisioningState - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type EndPointProvisioningState (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is EndPointProvisioningState && Equals((EndPointProvisioningState)obj); - } - - /// Returns hashCode for enum EndPointProvisioningState - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for EndPointProvisioningState - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to EndPointProvisioningState - /// the value to convert to an instance of . - - public static implicit operator EndPointProvisioningState(string value) - { - return new EndPointProvisioningState(value); - } - - /// Implicit operator to convert EndPointProvisioningState to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState e) - { - return e._value; - } - - /// Overriding != operator for enum EndPointProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum EndPointProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EntityStatus.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EntityStatus.Completer.cs deleted file mode 100644 index 09a12027fec6..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EntityStatus.Completer.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Entity status. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatusTypeConverter))] - public partial struct EntityStatus : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Active".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Active'", "Active", global::System.Management.Automation.CompletionResultType.ParameterValue, "Active"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Restoring".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Restoring'", "Restoring", global::System.Management.Automation.CompletionResultType.ParameterValue, "Restoring"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SendDisabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SendDisabled'", "SendDisabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "SendDisabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "ReceiveDisabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'ReceiveDisabled'", "ReceiveDisabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "ReceiveDisabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Renaming".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Renaming'", "Renaming", global::System.Management.Automation.CompletionResultType.ParameterValue, "Renaming"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unknown".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Unknown'", "Unknown", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unknown"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EntityStatus.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EntityStatus.TypeConverter.cs deleted file mode 100644 index c2725a42e3b6..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EntityStatus.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Entity status. - public partial class EntityStatusTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => EntityStatus.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EntityStatus.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EntityStatus.cs deleted file mode 100644 index bc6fdda4c4d8..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/EntityStatus.cs +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Entity status. - public partial struct EntityStatus : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus Active = @"Active"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus Creating = @"Creating"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus Deleting = @"Deleting"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus Disabled = @"Disabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus ReceiveDisabled = @"ReceiveDisabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus Renaming = @"Renaming"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus Restoring = @"Restoring"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus SendDisabled = @"SendDisabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus Unknown = @"Unknown"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to EntityStatus - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new EntityStatus(global::System.Convert.ToString(value)); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private EntityStatus(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Compares values of enum type EntityStatus - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type EntityStatus (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is EntityStatus && Equals((EntityStatus)obj); - } - - /// Returns hashCode for enum EntityStatus - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for EntityStatus - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to EntityStatus - /// the value to convert to an instance of . - - public static implicit operator EntityStatus(string value) - { - return new EntityStatus(value); - } - - /// Implicit operator to convert EntityStatus to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus e) - { - return e._value; - } - - /// Overriding != operator for enum EntityStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum EntityStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/FilterType.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/FilterType.Completer.cs deleted file mode 100644 index ab3cf7704427..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/FilterType.Completer.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Rule filter types - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterTypeTypeConverter))] - public partial struct FilterType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SqlFilter".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SqlFilter'", "SqlFilter", global::System.Management.Automation.CompletionResultType.ParameterValue, "SqlFilter"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "CorrelationFilter".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'CorrelationFilter'", "CorrelationFilter", global::System.Management.Automation.CompletionResultType.ParameterValue, "CorrelationFilter"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/FilterType.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/FilterType.TypeConverter.cs deleted file mode 100644 index 978a12ca843e..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/FilterType.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Rule filter types - public partial class FilterTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => FilterType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/FilterType.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/FilterType.cs deleted file mode 100644 index b16247982538..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/FilterType.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Rule filter types - public partial struct FilterType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType CorrelationFilter = @"CorrelationFilter"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType SqlFilter = @"SqlFilter"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to FilterType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new FilterType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type FilterType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type FilterType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is FilterType && Equals((FilterType)obj); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private FilterType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns hashCode for enum FilterType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for FilterType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to FilterType - /// the value to convert to an instance of . - - public static implicit operator FilterType(string value) - { - return new FilterType(value); - } - - /// Implicit operator to convert FilterType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType e) - { - return e._value; - } - - /// Overriding != operator for enum FilterType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum FilterType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeySource.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeySource.Completer.cs deleted file mode 100644 index 21f51bb621ac..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeySource.Completer.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Enumerates the possible value of keySource for Encryption - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySourceTypeConverter))] - public partial struct KeySource : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Microsoft.KeyVault".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Microsoft.KeyVault'", "Microsoft.KeyVault", global::System.Management.Automation.CompletionResultType.ParameterValue, "Microsoft.KeyVault"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeySource.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeySource.TypeConverter.cs deleted file mode 100644 index b17f7b52ec5a..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeySource.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Enumerates the possible value of keySource for Encryption - public partial class KeySourceTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => KeySource.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeySource.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeySource.cs deleted file mode 100644 index e453220d1f3c..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeySource.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Enumerates the possible value of keySource for Encryption - public partial struct KeySource : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource MicrosoftKeyVault = @"Microsoft.KeyVault"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to KeySource - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new KeySource(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type KeySource - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type KeySource (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is KeySource && Equals((KeySource)obj); - } - - /// Returns hashCode for enum KeySource - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private KeySource(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for KeySource - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to KeySource - /// the value to convert to an instance of . - - public static implicit operator KeySource(string value) - { - return new KeySource(value); - } - - /// Implicit operator to convert KeySource to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource e) - { - return e._value; - } - - /// Overriding != operator for enum KeySource - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum KeySource - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeyType.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeyType.Completer.cs deleted file mode 100644 index 1c41d45ec39d..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeyType.Completer.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// The access key to regenerate. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyTypeTypeConverter))] - public partial struct KeyType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "PrimaryKey".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'PrimaryKey'", "PrimaryKey", global::System.Management.Automation.CompletionResultType.ParameterValue, "PrimaryKey"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SecondaryKey".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SecondaryKey'", "SecondaryKey", global::System.Management.Automation.CompletionResultType.ParameterValue, "SecondaryKey"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeyType.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeyType.TypeConverter.cs deleted file mode 100644 index e2f7de753a4b..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeyType.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// The access key to regenerate. - public partial class KeyTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => KeyType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeyType.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeyType.cs deleted file mode 100644 index a9899e59b6c6..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/KeyType.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// The access key to regenerate. - public partial struct KeyType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType PrimaryKey = @"PrimaryKey"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType SecondaryKey = @"SecondaryKey"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to KeyType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new KeyType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type KeyType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type KeyType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is KeyType && Equals((KeyType)obj); - } - - /// Returns hashCode for enum KeyType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private KeyType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for KeyType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to KeyType - /// the value to convert to an instance of . - - public static implicit operator KeyType(string value) - { - return new KeyType(value); - } - - /// Implicit operator to convert KeyType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType e) - { - return e._value; - } - - /// Overriding != operator for enum KeyType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum KeyType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ManagedServiceIdentityType.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ManagedServiceIdentityType.Completer.cs deleted file mode 100644 index ef066d160061..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ManagedServiceIdentityType.Completer.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Type of managed service identity. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityTypeTypeConverter))] - public partial struct ManagedServiceIdentityType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SystemAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SystemAssigned'", "SystemAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "SystemAssigned"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "UserAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'UserAssigned'", "UserAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "UserAssigned"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SystemAssigned, UserAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SystemAssigned, UserAssigned'", "SystemAssigned, UserAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "SystemAssigned, UserAssigned"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "None".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'None'", "None", global::System.Management.Automation.CompletionResultType.ParameterValue, "None"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ManagedServiceIdentityType.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ManagedServiceIdentityType.TypeConverter.cs deleted file mode 100644 index 53e137233080..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ManagedServiceIdentityType.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Type of managed service identity. - public partial class ManagedServiceIdentityTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ManagedServiceIdentityType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ManagedServiceIdentityType.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ManagedServiceIdentityType.cs deleted file mode 100644 index 2c37ec4648f6..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ManagedServiceIdentityType.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Type of managed service identity. - public partial struct ManagedServiceIdentityType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType None = @"None"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType SystemAssigned = @"SystemAssigned"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType SystemAssignedUserAssigned = @"SystemAssigned, UserAssigned"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType UserAssigned = @"UserAssigned"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// Conversion from arbitrary object to ManagedServiceIdentityType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ManagedServiceIdentityType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ManagedServiceIdentityType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ManagedServiceIdentityType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ManagedServiceIdentityType && Equals((ManagedServiceIdentityType)obj); - } - - /// Returns hashCode for enum ManagedServiceIdentityType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ManagedServiceIdentityType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for ManagedServiceIdentityType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ManagedServiceIdentityType - /// the value to convert to an instance of . - - public static implicit operator ManagedServiceIdentityType(string value) - { - return new ManagedServiceIdentityType(value); - } - - /// Implicit operator to convert ManagedServiceIdentityType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType e) - { - return e._value; - } - - /// Overriding != operator for enum ManagedServiceIdentityType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ManagedServiceIdentityType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/MigrationConfigurationName.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/MigrationConfigurationName.Completer.cs deleted file mode 100644 index 5617ede51d7b..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/MigrationConfigurationName.Completer.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Argument completer implementation for MigrationConfigurationName. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationNameTypeConverter))] - public partial struct MigrationConfigurationName : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "$default".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'$default'", "$default", global::System.Management.Automation.CompletionResultType.ParameterValue, "$default"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/MigrationConfigurationName.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/MigrationConfigurationName.TypeConverter.cs deleted file mode 100644 index 244a591ce340..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/MigrationConfigurationName.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// TypeConverter implementation for MigrationConfigurationName. - public partial class MigrationConfigurationNameTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => MigrationConfigurationName.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/MigrationConfigurationName.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/MigrationConfigurationName.cs deleted file mode 100644 index b4f5bd43679d..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/MigrationConfigurationName.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - public partial struct MigrationConfigurationName : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName Default = @"$default"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// Conversion from arbitrary object to MigrationConfigurationName - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new MigrationConfigurationName(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type MigrationConfigurationName - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type MigrationConfigurationName (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is MigrationConfigurationName && Equals((MigrationConfigurationName)obj); - } - - /// Returns hashCode for enum MigrationConfigurationName - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private MigrationConfigurationName(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for MigrationConfigurationName - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to MigrationConfigurationName - /// the value to convert to an instance of . - - public static implicit operator MigrationConfigurationName(string value) - { - return new MigrationConfigurationName(value); - } - - /// Implicit operator to convert MigrationConfigurationName to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName e) - { - return e._value; - } - - /// Overriding != operator for enum MigrationConfigurationName - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum MigrationConfigurationName - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/NetworkRuleIPAction.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/NetworkRuleIPAction.Completer.cs deleted file mode 100644 index e69c32b24474..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/NetworkRuleIPAction.Completer.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// The IP Filter Action - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPActionTypeConverter))] - public partial struct NetworkRuleIPAction : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Allow".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Allow'", "Allow", global::System.Management.Automation.CompletionResultType.ParameterValue, "Allow"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/NetworkRuleIPAction.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/NetworkRuleIPAction.TypeConverter.cs deleted file mode 100644 index b0528da4c3ec..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/NetworkRuleIPAction.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// The IP Filter Action - public partial class NetworkRuleIPActionTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => NetworkRuleIPAction.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/NetworkRuleIPAction.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/NetworkRuleIPAction.cs deleted file mode 100644 index b9a4ba67d7e7..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/NetworkRuleIPAction.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// The IP Filter Action - public partial struct NetworkRuleIPAction : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction Allow = @"Allow"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to NetworkRuleIPAction - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new NetworkRuleIPAction(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type NetworkRuleIPAction - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type NetworkRuleIPAction (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is NetworkRuleIPAction && Equals((NetworkRuleIPAction)obj); - } - - /// Returns hashCode for enum NetworkRuleIPAction - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private NetworkRuleIPAction(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for NetworkRuleIPAction - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to NetworkRuleIPAction - /// the value to convert to an instance of . - - public static implicit operator NetworkRuleIPAction(string value) - { - return new NetworkRuleIPAction(value); - } - - /// Implicit operator to convert NetworkRuleIPAction to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction e) - { - return e._value; - } - - /// Overriding != operator for enum NetworkRuleIPAction - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum NetworkRuleIPAction - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PrivateLinkConnectionStatus.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PrivateLinkConnectionStatus.Completer.cs deleted file mode 100644 index c74c6cbdd8b4..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PrivateLinkConnectionStatus.Completer.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Status of the connection. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatusTypeConverter))] - public partial struct PrivateLinkConnectionStatus : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Pending".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Pending'", "Pending", global::System.Management.Automation.CompletionResultType.ParameterValue, "Pending"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Approved".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Approved'", "Approved", global::System.Management.Automation.CompletionResultType.ParameterValue, "Approved"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Rejected".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Rejected'", "Rejected", global::System.Management.Automation.CompletionResultType.ParameterValue, "Rejected"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disconnected".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Disconnected'", "Disconnected", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disconnected"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PrivateLinkConnectionStatus.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PrivateLinkConnectionStatus.TypeConverter.cs deleted file mode 100644 index 3887a3dadf77..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PrivateLinkConnectionStatus.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Status of the connection. - public partial class PrivateLinkConnectionStatusTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => PrivateLinkConnectionStatus.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PrivateLinkConnectionStatus.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PrivateLinkConnectionStatus.cs deleted file mode 100644 index 0e27a98d6063..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PrivateLinkConnectionStatus.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Status of the connection. - public partial struct PrivateLinkConnectionStatus : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus Approved = @"Approved"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus Disconnected = @"Disconnected"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus Pending = @"Pending"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus Rejected = @"Rejected"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// Conversion from arbitrary object to PrivateLinkConnectionStatus - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new PrivateLinkConnectionStatus(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type PrivateLinkConnectionStatus - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type PrivateLinkConnectionStatus (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is PrivateLinkConnectionStatus && Equals((PrivateLinkConnectionStatus)obj); - } - - /// Returns hashCode for enum PrivateLinkConnectionStatus - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// - /// Creates an instance of the Enum class. - /// - /// the value to create an instance for. - private PrivateLinkConnectionStatus(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for PrivateLinkConnectionStatus - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to PrivateLinkConnectionStatus - /// the value to convert to an instance of . - - public static implicit operator PrivateLinkConnectionStatus(string value) - { - return new PrivateLinkConnectionStatus(value); - } - - /// Implicit operator to convert PrivateLinkConnectionStatus to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus e) - { - return e._value; - } - - /// Overriding != operator for enum PrivateLinkConnectionStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum PrivateLinkConnectionStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ProvisioningStateDr.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ProvisioningStateDr.Completer.cs deleted file mode 100644 index 08d3e923c815..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ProvisioningStateDr.Completer.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// - /// Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed' - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDrTypeConverter))] - public partial struct ProvisioningStateDr : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Accepted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Accepted'", "Accepted", global::System.Management.Automation.CompletionResultType.ParameterValue, "Accepted"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ProvisioningStateDr.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ProvisioningStateDr.TypeConverter.cs deleted file mode 100644 index 3e36330b949f..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ProvisioningStateDr.TypeConverter.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// - /// Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed' - /// - public partial class ProvisioningStateDrTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ProvisioningStateDr.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ProvisioningStateDr.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ProvisioningStateDr.cs deleted file mode 100644 index ada7632384cd..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/ProvisioningStateDr.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// - /// Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed' - /// - public partial struct ProvisioningStateDr : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr Accepted = @"Accepted"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr Failed = @"Failed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr Succeeded = @"Succeeded"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to ProvisioningStateDr - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ProvisioningStateDr(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ProvisioningStateDr - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ProvisioningStateDr (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ProvisioningStateDr && Equals((ProvisioningStateDr)obj); - } - - /// Returns hashCode for enum ProvisioningStateDr - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ProvisioningStateDr(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for ProvisioningStateDr - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ProvisioningStateDr - /// the value to convert to an instance of . - - public static implicit operator ProvisioningStateDr(string value) - { - return new ProvisioningStateDr(value); - } - - /// Implicit operator to convert ProvisioningStateDr to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr e) - { - return e._value; - } - - /// Overriding != operator for enum ProvisioningStateDr - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ProvisioningStateDr - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccess.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccess.Completer.cs deleted file mode 100644 index aba147ad1de0..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccess.Completer.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// - /// This determines if traffic is allowed over public network. By default it is enabled. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessTypeConverter))] - public partial struct PublicNetworkAccess : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SecuredByPerimeter".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SecuredByPerimeter'", "SecuredByPerimeter", global::System.Management.Automation.CompletionResultType.ParameterValue, "SecuredByPerimeter"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccess.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccess.TypeConverter.cs deleted file mode 100644 index 671079e93096..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccess.TypeConverter.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// - /// This determines if traffic is allowed over public network. By default it is enabled. - /// - public partial class PublicNetworkAccessTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => PublicNetworkAccess.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccess.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccess.cs deleted file mode 100644 index 02baff0debf3..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccess.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// - /// This determines if traffic is allowed over public network. By default it is enabled. - /// - public partial struct PublicNetworkAccess : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess Disabled = @"Disabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess Enabled = @"Enabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess SecuredByPerimeter = @"SecuredByPerimeter"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to PublicNetworkAccess - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new PublicNetworkAccess(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type PublicNetworkAccess - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type PublicNetworkAccess (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is PublicNetworkAccess && Equals((PublicNetworkAccess)obj); - } - - /// Returns hashCode for enum PublicNetworkAccess - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private PublicNetworkAccess(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for PublicNetworkAccess - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to PublicNetworkAccess - /// the value to convert to an instance of . - - public static implicit operator PublicNetworkAccess(string value) - { - return new PublicNetworkAccess(value); - } - - /// Implicit operator to convert PublicNetworkAccess to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess e) - { - return e._value; - } - - /// Overriding != operator for enum PublicNetworkAccess - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum PublicNetworkAccess - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccessFlag.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccessFlag.Completer.cs deleted file mode 100644 index 8090e96c4b61..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccessFlag.Completer.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// - /// This determines if traffic is allowed over public network. By default it is enabled. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlagTypeConverter))] - public partial struct PublicNetworkAccessFlag : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccessFlag.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccessFlag.TypeConverter.cs deleted file mode 100644 index 8bfe1364ca7f..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccessFlag.TypeConverter.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// - /// This determines if traffic is allowed over public network. By default it is enabled. - /// - public partial class PublicNetworkAccessFlagTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => PublicNetworkAccessFlag.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccessFlag.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccessFlag.cs deleted file mode 100644 index d43e95d7baf2..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/PublicNetworkAccessFlag.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// - /// This determines if traffic is allowed over public network. By default it is enabled. - /// - public partial struct PublicNetworkAccessFlag : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag Disabled = @"Disabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag Enabled = @"Enabled"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to PublicNetworkAccessFlag - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new PublicNetworkAccessFlag(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type PublicNetworkAccessFlag - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type PublicNetworkAccessFlag (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is PublicNetworkAccessFlag && Equals((PublicNetworkAccessFlag)obj); - } - - /// Returns hashCode for enum PublicNetworkAccessFlag - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private PublicNetworkAccessFlag(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for PublicNetworkAccessFlag - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to PublicNetworkAccessFlag - /// the value to convert to an instance of . - - public static implicit operator PublicNetworkAccessFlag(string value) - { - return new PublicNetworkAccessFlag(value); - } - - /// Implicit operator to convert PublicNetworkAccessFlag to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag e) - { - return e._value; - } - - /// Overriding != operator for enum PublicNetworkAccessFlag - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum PublicNetworkAccessFlag - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/RoleDisasterRecovery.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/RoleDisasterRecovery.Completer.cs deleted file mode 100644 index a198afa5ba04..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/RoleDisasterRecovery.Completer.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// - /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecoveryTypeConverter))] - public partial struct RoleDisasterRecovery : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Primary".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Primary'", "Primary", global::System.Management.Automation.CompletionResultType.ParameterValue, "Primary"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "PrimaryNotReplicating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'PrimaryNotReplicating'", "PrimaryNotReplicating", global::System.Management.Automation.CompletionResultType.ParameterValue, "PrimaryNotReplicating"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Secondary".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Secondary'", "Secondary", global::System.Management.Automation.CompletionResultType.ParameterValue, "Secondary"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/RoleDisasterRecovery.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/RoleDisasterRecovery.TypeConverter.cs deleted file mode 100644 index 8650d0eab688..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/RoleDisasterRecovery.TypeConverter.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// - /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' - /// - public partial class RoleDisasterRecoveryTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => RoleDisasterRecovery.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/RoleDisasterRecovery.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/RoleDisasterRecovery.cs deleted file mode 100644 index c62b5876beb2..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/RoleDisasterRecovery.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// - /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' - /// - public partial struct RoleDisasterRecovery : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery Primary = @"Primary"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery PrimaryNotReplicating = @"PrimaryNotReplicating"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery Secondary = @"Secondary"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to RoleDisasterRecovery - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new RoleDisasterRecovery(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type RoleDisasterRecovery - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type RoleDisasterRecovery (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is RoleDisasterRecovery && Equals((RoleDisasterRecovery)obj); - } - - /// Returns hashCode for enum RoleDisasterRecovery - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private RoleDisasterRecovery(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for RoleDisasterRecovery - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to RoleDisasterRecovery - /// the value to convert to an instance of . - - public static implicit operator RoleDisasterRecovery(string value) - { - return new RoleDisasterRecovery(value); - } - - /// Implicit operator to convert RoleDisasterRecovery to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery e) - { - return e._value; - } - - /// Overriding != operator for enum RoleDisasterRecovery - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum RoleDisasterRecovery - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuName.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuName.Completer.cs deleted file mode 100644 index b178e707caeb..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuName.Completer.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Name of this SKU. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuNameTypeConverter))] - public partial struct SkuName : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Basic".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Basic'", "Basic", global::System.Management.Automation.CompletionResultType.ParameterValue, "Basic"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard'", "Standard", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Premium".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Premium'", "Premium", global::System.Management.Automation.CompletionResultType.ParameterValue, "Premium"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuName.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuName.TypeConverter.cs deleted file mode 100644 index bcce0ddee280..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuName.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Name of this SKU. - public partial class SkuNameTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SkuName.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuName.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuName.cs deleted file mode 100644 index 3183c6eb4278..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuName.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Name of this SKU. - public partial struct SkuName : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName Basic = @"Basic"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName Premium = @"Premium"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName Standard = @"Standard"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to SkuName - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new SkuName(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type SkuName - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type SkuName (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is SkuName && Equals((SkuName)obj); - } - - /// Returns hashCode for enum SkuName - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private SkuName(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for SkuName - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to SkuName - /// the value to convert to an instance of . - - public static implicit operator SkuName(string value) - { - return new SkuName(value); - } - - /// Implicit operator to convert SkuName to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName e) - { - return e._value; - } - - /// Overriding != operator for enum SkuName - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum SkuName - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuTier.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuTier.Completer.cs deleted file mode 100644 index 37e6de4c1529..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuTier.Completer.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// The billing tier of this particular SKU. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTierTypeConverter))] - public partial struct SkuTier : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Basic".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Basic'", "Basic", global::System.Management.Automation.CompletionResultType.ParameterValue, "Basic"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard'", "Standard", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Premium".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Premium'", "Premium", global::System.Management.Automation.CompletionResultType.ParameterValue, "Premium"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuTier.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuTier.TypeConverter.cs deleted file mode 100644 index 8f726085e9bd..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuTier.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// The billing tier of this particular SKU. - public partial class SkuTierTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SkuTier.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuTier.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuTier.cs deleted file mode 100644 index 883509b0ff16..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/SkuTier.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// The billing tier of this particular SKU. - public partial struct SkuTier : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier Basic = @"Basic"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier Premium = @"Premium"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier Standard = @"Standard"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to SkuTier - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new SkuTier(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type SkuTier - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type SkuTier (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is SkuTier && Equals((SkuTier)obj); - } - - /// Returns hashCode for enum SkuTier - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private SkuTier(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for SkuTier - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to SkuTier - /// the value to convert to an instance of . - - public static implicit operator SkuTier(string value) - { - return new SkuTier(value); - } - - /// Implicit operator to convert SkuTier to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier e) - { - return e._value; - } - - /// Overriding != operator for enum SkuTier - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum SkuTier - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/TlsVersion.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/TlsVersion.Completer.cs deleted file mode 100644 index 3e7268761951..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/TlsVersion.Completer.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// The minimum TLS version for the cluster to support, e.g. '1.2' - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersionTypeConverter))] - public partial struct TlsVersion : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "1.0".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'1.0'", "1.0", global::System.Management.Automation.CompletionResultType.ParameterValue, "1.0"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "1.1".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'1.1'", "1.1", global::System.Management.Automation.CompletionResultType.ParameterValue, "1.1"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "1.2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'1.2'", "1.2", global::System.Management.Automation.CompletionResultType.ParameterValue, "1.2"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/TlsVersion.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/TlsVersion.TypeConverter.cs deleted file mode 100644 index 3362d551fdc9..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/TlsVersion.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// The minimum TLS version for the cluster to support, e.g. '1.2' - public partial class TlsVersionTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => TlsVersion.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/TlsVersion.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/TlsVersion.cs deleted file mode 100644 index b786e4021aea..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/TlsVersion.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// The minimum TLS version for the cluster to support, e.g. '1.2' - public partial struct TlsVersion : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion One0 = @"1.0"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion One1 = @"1.1"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion One2 = @"1.2"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to TlsVersion - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new TlsVersion(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type TlsVersion - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type TlsVersion (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is TlsVersion && Equals((TlsVersion)obj); - } - - /// Returns hashCode for enum TlsVersion - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private TlsVersion(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for TlsVersion - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to TlsVersion - /// the value to convert to an instance of . - - public static implicit operator TlsVersion(string value) - { - return new TlsVersion(value); - } - - /// Implicit operator to convert TlsVersion to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion e) - { - return e._value; - } - - /// Overriding != operator for enum TlsVersion - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum TlsVersion - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/UnavailableReason.Completer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/UnavailableReason.Completer.cs deleted file mode 100644 index 01b788d2e8ee..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/UnavailableReason.Completer.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Specifies the reason for the unavailability of the service. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReasonTypeConverter))] - public partial struct UnavailableReason : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "None".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'None'", "None", global::System.Management.Automation.CompletionResultType.ParameterValue, "None"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "InvalidName".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'InvalidName'", "InvalidName", global::System.Management.Automation.CompletionResultType.ParameterValue, "InvalidName"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SubscriptionIsDisabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SubscriptionIsDisabled'", "SubscriptionIsDisabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "SubscriptionIsDisabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "NameInUse".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'NameInUse'", "NameInUse", global::System.Management.Automation.CompletionResultType.ParameterValue, "NameInUse"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "NameInLockdown".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'NameInLockdown'", "NameInLockdown", global::System.Management.Automation.CompletionResultType.ParameterValue, "NameInLockdown"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "TooManyNamespaceInCurrentSubscription".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'TooManyNamespaceInCurrentSubscription'", "TooManyNamespaceInCurrentSubscription", global::System.Management.Automation.CompletionResultType.ParameterValue, "TooManyNamespaceInCurrentSubscription"); - } - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/UnavailableReason.TypeConverter.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/UnavailableReason.TypeConverter.cs deleted file mode 100644 index 7218addde256..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/UnavailableReason.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Specifies the reason for the unavailability of the service. - public partial class UnavailableReasonTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => UnavailableReason.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/UnavailableReason.cs b/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/UnavailableReason.cs deleted file mode 100644 index 0c39c58bda72..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/generated/api/Support/UnavailableReason.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support -{ - - /// Specifies the reason for the unavailability of the service. - public partial struct UnavailableReason : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason InvalidName = @"InvalidName"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason NameInLockdown = @"NameInLockdown"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason NameInUse = @"NameInUse"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason None = @"None"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason SubscriptionIsDisabled = @"SubscriptionIsDisabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason TooManyNamespaceInCurrentSubscription = @"TooManyNamespaceInCurrentSubscription"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to UnavailableReason - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new UnavailableReason(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type UnavailableReason - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type UnavailableReason (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is UnavailableReason && Equals((UnavailableReason)obj); - } - - /// Returns hashCode for enum UnavailableReason - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for UnavailableReason - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private UnavailableReason(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Implicit operator to convert string to UnavailableReason - /// the value to convert to an instance of . - - public static implicit operator UnavailableReason(string value) - { - return new UnavailableReason(value); - } - - /// Implicit operator to convert UnavailableReason to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason e) - { - return e._value; - } - - /// Overriding != operator for enum UnavailableReason - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum UnavailableReason - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason e1, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/CompleteAzServiceBusMigration_Complete.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/CompleteAzServiceBusMigration_Complete.cs index 8257f83cb862..db7517346173 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/CompleteAzServiceBusMigration_Complete.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/CompleteAzServiceBusMigration_Complete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// @@ -22,7 +24,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}/upgrade", ApiVersion = "2022-10-01-preview")] public partial class CompleteAzServiceBusMigration_Complete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,11 +41,26 @@ public partial class CompleteAzServiceBusMigration_Complete : global::System.Man /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class CompleteAzServiceBusMigration_Complete : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -103,7 +124,7 @@ public partial class CompleteAzServiceBusMigration_Complete : global::System.Man /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -152,7 +173,8 @@ public partial class CompleteAzServiceBusMigration_Complete : global::System.Man [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -161,12 +183,12 @@ public partial class CompleteAzServiceBusMigration_Complete : global::System.Man /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -197,7 +219,7 @@ protected override void BeginProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public CompleteAzServiceBusMigration_Complete() { @@ -207,6 +229,11 @@ public CompleteAzServiceBusMigration_Complete() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -271,8 +298,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -328,7 +380,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -341,12 +393,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.MigrationConfigsCompleteMigration(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.MigrationConfigsCompleteMigration(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -384,12 +436,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -406,15 +458,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/CompleteAzServiceBusMigration_CompleteViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/CompleteAzServiceBusMigration_CompleteViaIdentity.cs index 213ca3c97916..7f6d32c990b6 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/CompleteAzServiceBusMigration_CompleteViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/CompleteAzServiceBusMigration_CompleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// @@ -22,7 +24,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}/upgrade", ApiVersion = "2022-10-01-preview")] public partial class CompleteAzServiceBusMigration_CompleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,11 +41,26 @@ public partial class CompleteAzServiceBusMigration_CompleteViaIdentity : global: /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class CompleteAzServiceBusMigration_CompleteViaIdentity : global: [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -97,7 +118,7 @@ public partial class CompleteAzServiceBusMigration_CompleteViaIdentity : global: /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -120,12 +141,12 @@ public partial class CompleteAzServiceBusMigration_CompleteViaIdentity : global: /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -156,7 +177,7 @@ protected override void BeginProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public CompleteAzServiceBusMigration_CompleteViaIdentity() { @@ -166,6 +187,11 @@ public CompleteAzServiceBusMigration_CompleteViaIdentity() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -230,8 +256,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -287,7 +338,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,6 +358,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -315,17 +370,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.MigrationConfigsCompleteMigration(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.MigrationConfigsCompleteMigration(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -363,12 +414,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -385,7 +436,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_Get.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_Get.cs index 68816d4ea3ab..71521188d9a5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_Get.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets an authorization rule for a namespace by rule name. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusDisasterRecoveryConfigAuthorizationRule_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets an authorization rule for a namespace by rule name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639392.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,6 +39,18 @@ public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_Get /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Backing field for property. private string _alias; @@ -54,6 +70,9 @@ public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_Get [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -67,6 +86,9 @@ public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_Get [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -121,7 +143,7 @@ public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_Get /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -170,7 +192,8 @@ public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_Get [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -179,24 +202,24 @@ public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_Get /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -219,6 +242,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -240,7 +268,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_Get() { @@ -291,8 +319,33 @@ public GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -345,7 +398,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -360,13 +413,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsGetAuthorizationRule(ResourceGroupName, NamespaceName, Alias, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsGetAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, Alias, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Alias=Alias,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Alias=Alias,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -404,12 +457,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,15 +479,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Alias=Alias, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Alias=Alias, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -444,12 +497,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -461,8 +514,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentity.cs index 8ac17d89d722..e75a166bbc64 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets an authorization rule for a namespace by rule name. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets an authorization rule for a namespace by rule name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639392.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetV /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetV [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -87,7 +109,7 @@ public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetV /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -110,24 +132,24 @@ public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetV /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -150,6 +172,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -171,7 +198,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the + /// Initializes a new instance of the /// cmdlet class. /// public GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentity() @@ -223,8 +250,33 @@ public GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -277,7 +329,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -297,6 +349,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -313,17 +369,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DisasterRecoveryConfigsGetAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsGetAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, InputObject.AuthorizationRuleName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -361,12 +413,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -383,7 +435,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -401,12 +453,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,8 +470,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig.cs new file mode 100644 index 000000000000..cef500bb8425 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig.cs @@ -0,0 +1,507 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Gets an authorization rule for a namespace by rule name. + /// + /// [OpenAPI] GetAuthorizationRule=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets an authorization rule for a namespace by rule name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639392.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _disasterRecoveryConfigInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity DisasterRecoveryConfigInputObject { get => this._disasterRecoveryConfigInputObject; set => this._disasterRecoveryConfigInputObject = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (DisasterRecoveryConfigInputObject?.Id != null) + { + this.DisasterRecoveryConfigInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsGetAuthorizationRuleViaIdentity(DisasterRecoveryConfigInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == DisasterRecoveryConfigInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DisasterRecoveryConfigInputObject has null value for DisasterRecoveryConfigInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DisasterRecoveryConfigInputObject) ); + } + if (null == DisasterRecoveryConfigInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DisasterRecoveryConfigInputObject has null value for DisasterRecoveryConfigInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DisasterRecoveryConfigInputObject) ); + } + if (null == DisasterRecoveryConfigInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DisasterRecoveryConfigInputObject has null value for DisasterRecoveryConfigInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DisasterRecoveryConfigInputObject) ); + } + if (null == DisasterRecoveryConfigInputObject.Alias) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DisasterRecoveryConfigInputObject has null value for DisasterRecoveryConfigInputObject.Alias"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DisasterRecoveryConfigInputObject) ); + } + await this.Client.DisasterRecoveryConfigsGetAuthorizationRule(DisasterRecoveryConfigInputObject.SubscriptionId ?? null, DisasterRecoveryConfigInputObject.ResourceGroupName ?? null, DisasterRecoveryConfigInputObject.NamespaceName ?? null, DisasterRecoveryConfigInputObject.Alias ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..aa1db0e52445 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace.cs @@ -0,0 +1,517 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Gets an authorization rule for a namespace by rule name. + /// + /// [OpenAPI] GetAuthorizationRule=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets an authorization rule for a namespace by rule name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639392.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _alias; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Alias { get => this._alias; set => this._alias = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/disasterRecoveryConfigs/{(global::System.Uri.EscapeDataString(this.Alias.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsGetAuthorizationRuleViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.DisasterRecoveryConfigsGetAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Alias, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Alias=Alias,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_List.cs index c7c7d34fc098..d9787011065a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets the authorization rules for a namespace. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusDisasterRecoveryConfigAuthorizationRule_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets the authorization rules for a namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639376.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,12 +39,24 @@ public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_List /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Backing field for property. private string _alias; @@ -60,6 +76,9 @@ public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_List [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -73,6 +92,9 @@ public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_List [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -113,7 +135,7 @@ public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_List /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -162,7 +184,8 @@ public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_List [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -171,24 +194,24 @@ public partial class GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_List /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -211,6 +234,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -232,7 +260,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_List() { @@ -283,8 +311,33 @@ public GetAzServiceBusDisasterRecoveryConfigAuthorizationRule_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -337,7 +390,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -352,13 +405,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsListAuthorizationRules(ResourceGroupName, NamespaceName, Alias, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsListAuthorizationRules(SubscriptionId, ResourceGroupName, NamespaceName, Alias, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Alias=Alias,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Alias=Alias}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -396,12 +449,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,15 +471,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Alias=Alias, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Alias=Alias, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -436,12 +489,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -453,15 +506,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigKey_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigKey_List.cs index 1fdfc6f00dca..e96e0a799cf0 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigKey_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusDisasterRecoveryConfigKey_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets the primary and secondary connection strings for the namespace. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusDisasterRecoveryConfigKey_List", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets the primary and secondary connection strings for the namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639398.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}/listKeys", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusDisasterRecoveryConfigKey_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,6 +39,18 @@ public partial class GetAzServiceBusDisasterRecoveryConfigKey_List : global::Sys /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Backing field for property. private string _alias; @@ -68,6 +84,9 @@ public partial class GetAzServiceBusDisasterRecoveryConfigKey_List : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -81,6 +100,9 @@ public partial class GetAzServiceBusDisasterRecoveryConfigKey_List : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -121,7 +143,7 @@ public partial class GetAzServiceBusDisasterRecoveryConfigKey_List : global::Sys /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -170,7 +192,8 @@ public partial class GetAzServiceBusDisasterRecoveryConfigKey_List : global::Sys [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -179,24 +202,24 @@ public partial class GetAzServiceBusDisasterRecoveryConfigKey_List : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -219,6 +242,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -240,7 +268,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusDisasterRecoveryConfigKey_List() { @@ -291,8 +319,33 @@ public GetAzServiceBusDisasterRecoveryConfigKey_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -348,7 +401,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -363,13 +416,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsListKeys(ResourceGroupName, NamespaceName, Alias, AuthorizationRuleName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsListKeys(SubscriptionId, ResourceGroupName, NamespaceName, Alias, AuthorizationRuleName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Alias=Alias,AuthorizationRuleName=AuthorizationRuleName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Alias=Alias,AuthorizationRuleName=AuthorizationRuleName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -407,12 +460,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -429,15 +482,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Alias=Alias, AuthorizationRuleName=AuthorizationRuleName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Alias=Alias, AuthorizationRuleName=AuthorizationRuleName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -447,12 +500,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -464,8 +517,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusGeoDRConfiguration_Get.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusGeoDRConfiguration_Get.cs index 2d98c37ec3a0..89dc619cfc00 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusGeoDRConfiguration_Get.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusGeoDRConfiguration_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusGeoDRConfiguration_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusGeoDRConfiguration_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,11 +39,26 @@ public partial class GetAzServiceBusGeoDRConfiguration_Get : global::System.Mana /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class GetAzServiceBusGeoDRConfiguration_Get : global::System.Mana [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -108,7 +129,7 @@ public partial class GetAzServiceBusGeoDRConfiguration_Get : global::System.Mana /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -157,7 +178,8 @@ public partial class GetAzServiceBusGeoDRConfiguration_Get : global::System.Mana [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -166,24 +188,24 @@ public partial class GetAzServiceBusGeoDRConfiguration_Get : global::System.Mana /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -206,6 +228,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,7 +254,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusGeoDRConfiguration_Get() { @@ -278,8 +305,33 @@ public GetAzServiceBusGeoDRConfiguration_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -332,7 +384,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -347,13 +399,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsGet(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsGet(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -391,12 +443,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,15 +465,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -431,12 +483,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -448,8 +500,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusGeoDRConfiguration_GetViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusGeoDRConfiguration_GetViaIdentity.cs index e53285f1b829..039851a186af 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusGeoDRConfiguration_GetViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusGeoDRConfiguration_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusGeoDRConfiguration_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusGeoDRConfiguration_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,11 +39,26 @@ public partial class GetAzServiceBusGeoDRConfiguration_GetViaIdentity : global:: /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class GetAzServiceBusGeoDRConfiguration_GetViaIdentity : global:: [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -88,7 +109,7 @@ public partial class GetAzServiceBusGeoDRConfiguration_GetViaIdentity : global:: /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -111,24 +132,24 @@ public partial class GetAzServiceBusGeoDRConfiguration_GetViaIdentity : global:: /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -151,6 +172,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -172,7 +198,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusGeoDRConfiguration_GetViaIdentity() { @@ -223,8 +249,33 @@ public GetAzServiceBusGeoDRConfiguration_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -277,7 +328,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -297,6 +348,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -309,17 +364,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Alias"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DisasterRecoveryConfigsGet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -357,12 +408,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -379,7 +430,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -397,12 +448,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -414,8 +465,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusGeoDRConfiguration_GetViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusGeoDRConfiguration_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..6e9c1b8c5a7f --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusGeoDRConfiguration_GetViaIdentityNamespace.cs @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// + /// Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusGeoDRConfiguration_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2022-10-01-preview")] + public partial class GetAzServiceBusGeoDRConfiguration_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzServiceBusGeoDRConfiguration_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/disasterRecoveryConfigs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsGetViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.DisasterRecoveryConfigsGet(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusGeoDRConfiguration_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusGeoDRConfiguration_List.cs index aed9a1a20429..c1a9f331f960 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusGeoDRConfiguration_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusGeoDRConfiguration_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets all Alias(Disaster Recovery configurations) @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusGeoDRConfiguration_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets all Alias(Disaster Recovery configurations)")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusGeoDRConfiguration_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzServiceBusGeoDRConfiguration_List : global::System.Man /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzServiceBusGeoDRConfiguration_List : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +119,7 @@ public partial class GetAzServiceBusGeoDRConfiguration_List : global::System.Man /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -147,7 +168,8 @@ public partial class GetAzServiceBusGeoDRConfiguration_List : global::System.Man [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -156,24 +178,24 @@ public partial class GetAzServiceBusGeoDRConfiguration_List : global::System.Man /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -196,6 +218,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -217,7 +244,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusGeoDRConfiguration_List() { @@ -268,8 +295,33 @@ public GetAzServiceBusGeoDRConfiguration_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -322,7 +374,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -337,13 +389,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsList(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsList(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -381,12 +433,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -403,15 +455,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -421,12 +473,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecoveryListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -438,15 +490,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecoveryListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusMigration_Get.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusMigration_Get.cs index d7211fa07c1b..06fcdbac61ed 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusMigration_Get.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusMigration_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Retrieves Migration Config @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusMigration_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Retrieves Migration Config")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusMigration_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzServiceBusMigration_Get : global::System.Management.Au /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzServiceBusMigration_Get : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -92,7 +113,7 @@ public partial class GetAzServiceBusMigration_Get : global::System.Management.Au /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -141,7 +162,8 @@ public partial class GetAzServiceBusMigration_Get : global::System.Management.Au [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -150,24 +172,24 @@ public partial class GetAzServiceBusMigration_Get : global::System.Management.Au /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -190,6 +212,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -211,7 +238,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusMigration_Get() { @@ -262,8 +289,33 @@ public GetAzServiceBusMigration_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -316,7 +368,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -331,13 +383,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.MigrationConfigsGet(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.MigrationConfigsGet(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -375,12 +427,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -397,15 +449,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -415,12 +467,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -432,8 +484,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusMigration_GetViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusMigration_GetViaIdentity.cs index 7cdf4b333ad1..6bb4423d84b5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusMigration_GetViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusMigration_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Retrieves Migration Config @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusMigration_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Retrieves Migration Config")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusMigration_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzServiceBusMigration_GetViaIdentity : global::System.Ma /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzServiceBusMigration_GetViaIdentity : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -86,7 +107,7 @@ public partial class GetAzServiceBusMigration_GetViaIdentity : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -109,24 +130,24 @@ public partial class GetAzServiceBusMigration_GetViaIdentity : global::System.Ma /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -149,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +196,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusMigration_GetViaIdentity() { @@ -221,8 +247,33 @@ public GetAzServiceBusMigration_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -295,6 +346,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -303,17 +358,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.MigrationConfigsGet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.MigrationConfigsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -351,12 +402,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -373,7 +424,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -391,12 +442,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -408,8 +459,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusMigration_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusMigration_List.cs index 883ca6ead7b4..daa4d928dd32 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusMigration_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusMigration_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets all migrationConfigurations @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusMigration_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets all migrationConfigurations")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusMigration_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzServiceBusMigration_List : global::System.Management.A /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzServiceBusMigration_List : global::System.Management.A [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +119,7 @@ public partial class GetAzServiceBusMigration_List : global::System.Management.A /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -147,7 +168,8 @@ public partial class GetAzServiceBusMigration_List : global::System.Management.A [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -156,24 +178,24 @@ public partial class GetAzServiceBusMigration_List : global::System.Management.A /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -196,6 +218,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -217,7 +244,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusMigration_List() { @@ -268,8 +295,33 @@ public GetAzServiceBusMigration_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -322,7 +374,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -337,13 +389,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.MigrationConfigsList(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.MigrationConfigsList(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -381,12 +433,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -403,15 +455,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -421,12 +473,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -438,15 +490,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceAuthorizationRule_Get.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceAuthorizationRule_Get.cs index f658e5e72723..2e6d632fa05a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceAuthorizationRule_Get.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceAuthorizationRule_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets an authorization rule for a namespace by rule name. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusNamespaceAuthorizationRule_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets an authorization rule for a namespace by rule name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639392.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusNamespaceAuthorizationRule_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class GetAzServiceBusNamespaceAuthorizationRule_Get : global::Sys /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class GetAzServiceBusNamespaceAuthorizationRule_Get : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +129,7 @@ public partial class GetAzServiceBusNamespaceAuthorizationRule_Get : global::Sys /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -156,7 +178,8 @@ public partial class GetAzServiceBusNamespaceAuthorizationRule_Get : global::Sys [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -165,24 +188,24 @@ public partial class GetAzServiceBusNamespaceAuthorizationRule_Get : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -205,6 +228,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -226,7 +254,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusNamespaceAuthorizationRule_Get() { @@ -277,8 +305,33 @@ public GetAzServiceBusNamespaceAuthorizationRule_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -331,7 +384,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -346,13 +399,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesGetAuthorizationRule(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesGetAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -390,12 +443,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,15 +465,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -430,12 +483,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -447,8 +500,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceAuthorizationRule_GetViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceAuthorizationRule_GetViaIdentity.cs index 84b42ec12fec..0f1c23fcf2c4 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceAuthorizationRule_GetViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceAuthorizationRule_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets an authorization rule for a namespace by rule name. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusNamespaceAuthorizationRule_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets an authorization rule for a namespace by rule name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639392.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusNamespaceAuthorizationRule_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class GetAzServiceBusNamespaceAuthorizationRule_GetViaIdentity : /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class GetAzServiceBusNamespaceAuthorizationRule_GetViaIdentity : [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -87,7 +109,7 @@ public partial class GetAzServiceBusNamespaceAuthorizationRule_GetViaIdentity : /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -110,24 +132,24 @@ public partial class GetAzServiceBusNamespaceAuthorizationRule_GetViaIdentity : /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -150,6 +172,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -171,7 +198,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusNamespaceAuthorizationRule_GetViaIdentity() { @@ -222,8 +249,33 @@ public GetAzServiceBusNamespaceAuthorizationRule_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -276,7 +328,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -296,6 +348,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -308,17 +364,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesGetAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesGetAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.AuthorizationRuleName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -356,12 +408,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -378,7 +430,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -396,12 +448,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,8 +465,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceAuthorizationRule_GetViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceAuthorizationRule_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..859abc6b574c --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceAuthorizationRule_GetViaIdentityNamespace.cs @@ -0,0 +1,503 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Gets an authorization rule for a namespace by rule name. + /// + /// [OpenAPI] GetAuthorizationRule=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusNamespaceAuthorizationRule_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets an authorization rule for a namespace by rule name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639392.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class GetAzServiceBusNamespaceAuthorizationRule_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public GetAzServiceBusNamespaceAuthorizationRule_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/AuthorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.NamespacesGetAuthorizationRuleViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.NamespacesGetAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceAuthorizationRule_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceAuthorizationRule_List.cs index 08b0d136d962..62d3fa41dba8 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceAuthorizationRule_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceAuthorizationRule_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets the authorization rules for a namespace. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusNamespaceAuthorizationRule_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets the authorization rules for a namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639376.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusNamespaceAuthorizationRule_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +39,32 @@ public partial class GetAzServiceBusNamespaceAuthorizationRule_List : global::Sy /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -59,6 +78,9 @@ public partial class GetAzServiceBusNamespaceAuthorizationRule_List : global::Sy [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -99,7 +121,7 @@ public partial class GetAzServiceBusNamespaceAuthorizationRule_List : global::Sy /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -148,7 +170,8 @@ public partial class GetAzServiceBusNamespaceAuthorizationRule_List : global::Sy [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -157,24 +180,24 @@ public partial class GetAzServiceBusNamespaceAuthorizationRule_List : global::Sy /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -197,6 +220,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -218,7 +246,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusNamespaceAuthorizationRule_List() { @@ -269,8 +297,33 @@ public GetAzServiceBusNamespaceAuthorizationRule_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -323,7 +376,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -338,13 +391,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesListAuthorizationRules(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesListAuthorizationRules(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -382,12 +435,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -404,15 +457,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -422,12 +475,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -439,15 +492,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceKey_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceKey_List.cs index 57784a7a6f0c..0d420e5a9644 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceKey_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespaceKey_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets the primary and secondary connection strings for the namespace. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusNamespaceKey_List", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets the primary and secondary connection strings for the namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639398.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusNamespaceKey_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class GetAzServiceBusNamespaceKey_List : global::System.Managemen /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class GetAzServiceBusNamespaceKey_List : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +129,7 @@ public partial class GetAzServiceBusNamespaceKey_List : global::System.Managemen /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -156,7 +178,8 @@ public partial class GetAzServiceBusNamespaceKey_List : global::System.Managemen [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -165,24 +188,24 @@ public partial class GetAzServiceBusNamespaceKey_List : global::System.Managemen /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -205,6 +228,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -226,7 +254,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusNamespaceKey_List() { @@ -277,8 +305,33 @@ public GetAzServiceBusNamespaceKey_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -334,7 +387,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -349,13 +402,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesListKeys(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesListKeys(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -393,12 +446,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -415,15 +468,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -433,12 +486,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -450,8 +503,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespace_Get.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespace_Get.cs index b5faf3a89e7c..b2a1e2864673 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespace_Get.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespace_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets a description for the specified namespace. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusNamespace_Get")] [global::System.Management.Automation.Alias("Get-AzServiceBusNamespaceV2")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets a description for the specified namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusNamespace_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class GetAzServiceBusNamespace_Get : global::System.Management.Au /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class GetAzServiceBusNamespace_Get : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -94,7 +116,7 @@ public partial class GetAzServiceBusNamespace_Get : global::System.Management.Au /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -143,7 +165,8 @@ public partial class GetAzServiceBusNamespace_Get : global::System.Management.Au [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -152,24 +175,24 @@ public partial class GetAzServiceBusNamespace_Get : global::System.Management.Au /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -192,6 +215,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -213,7 +241,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusNamespace_Get() { @@ -264,8 +292,33 @@ public GetAzServiceBusNamespace_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -318,7 +371,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -333,13 +386,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesGet(ResourceGroupName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesGet(SubscriptionId, ResourceGroupName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -377,12 +430,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -399,15 +452,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -417,12 +470,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -434,8 +487,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespace_GetViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespace_GetViaIdentity.cs index 540cee226f86..25469c5ed360 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespace_GetViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespace_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets a description for the specified namespace. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusNamespace_GetViaIdentity")] [global::System.Management.Automation.Alias("Get-AzServiceBusNamespaceV2")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets a description for the specified namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusNamespace_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class GetAzServiceBusNamespace_GetViaIdentity : global::System.Ma /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class GetAzServiceBusNamespace_GetViaIdentity : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -87,7 +109,7 @@ public partial class GetAzServiceBusNamespace_GetViaIdentity : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -110,24 +132,24 @@ public partial class GetAzServiceBusNamespace_GetViaIdentity : global::System.Ma /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -150,6 +172,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -171,7 +198,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusNamespace_GetViaIdentity() { @@ -222,8 +249,33 @@ public GetAzServiceBusNamespace_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -276,7 +328,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -296,6 +348,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -304,17 +360,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesGet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -352,12 +404,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -374,7 +426,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -392,12 +444,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -409,8 +461,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespace_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespace_List.cs index 859a85c18ca3..cbb033e1fa2a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespace_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespace_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// @@ -16,12 +18,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusNamespace_List")] [global::System.Management.Automation.Alias("Get-AzServiceBusNamespaceV2")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets all the available namespaces within the subscription, irrespective of the resource groups.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/namespaces", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusNamespace_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,17 +41,32 @@ public partial class GetAzServiceBusNamespace_List : global::System.Management.A /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -61,6 +80,9 @@ public partial class GetAzServiceBusNamespace_List : global::System.Management.A [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -87,7 +109,7 @@ public partial class GetAzServiceBusNamespace_List : global::System.Management.A /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -122,7 +144,8 @@ public partial class GetAzServiceBusNamespace_List : global::System.Management.A [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -131,24 +154,24 @@ public partial class GetAzServiceBusNamespace_List : global::System.Management.A /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -171,6 +194,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -192,7 +220,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusNamespace_List() { @@ -243,8 +271,33 @@ public GetAzServiceBusNamespace_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -297,7 +350,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -318,7 +371,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -356,12 +409,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -378,15 +431,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -396,12 +449,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,15 +466,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespace_List1.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespace_List1.cs index bf065de52751..e9330a451e94 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespace_List1.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNamespace_List1.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets the available namespaces within a resource group. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusNamespace_List1")] [global::System.Management.Automation.Alias("Get-AzServiceBusNamespaceV2")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets the available namespaces within a resource group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusNamespace_List1 : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +39,32 @@ public partial class GetAzServiceBusNamespace_List1 : global::System.Management. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -59,6 +78,9 @@ public partial class GetAzServiceBusNamespace_List1 : global::System.Management. [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +107,7 @@ public partial class GetAzServiceBusNamespace_List1 : global::System.Management. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -134,7 +156,8 @@ public partial class GetAzServiceBusNamespace_List1 : global::System.Management. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -143,24 +166,24 @@ public partial class GetAzServiceBusNamespace_List1 : global::System.Management. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -183,6 +206,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -204,7 +232,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusNamespace_List1() { @@ -255,8 +283,33 @@ public GetAzServiceBusNamespace_List1() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -309,7 +362,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -324,13 +377,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesListByResourceGroup(ResourceGroupName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesListByResourceGroup(SubscriptionId, ResourceGroupName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -368,12 +421,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -390,15 +443,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -408,12 +461,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespaceListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -425,15 +478,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespaceListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNetworkRuleSet_Get.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNetworkRuleSet_Get.cs index 9d4240959f1a..24cd312670cd 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNetworkRuleSet_Get.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNetworkRuleSet_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets NetworkRuleSet for a Namespace. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] GetNetworkRuleSet=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusNetworkRuleSet_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets NetworkRuleSet for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusNetworkRuleSet_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzServiceBusNetworkRuleSet_Get : global::System.Manageme /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzServiceBusNetworkRuleSet_Get : global::System.Manageme [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -92,7 +113,7 @@ public partial class GetAzServiceBusNetworkRuleSet_Get : global::System.Manageme /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -141,7 +162,8 @@ public partial class GetAzServiceBusNetworkRuleSet_Get : global::System.Manageme [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -150,24 +172,24 @@ public partial class GetAzServiceBusNetworkRuleSet_Get : global::System.Manageme /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -190,6 +212,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -211,7 +238,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusNetworkRuleSet_Get() { @@ -262,8 +289,33 @@ public GetAzServiceBusNetworkRuleSet_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -316,7 +368,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -331,13 +383,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesGetNetworkRuleSet(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesGetNetworkRuleSet(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -375,12 +427,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -397,15 +449,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -415,12 +467,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -432,8 +484,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNetworkRuleSet_GetViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNetworkRuleSet_GetViaIdentity.cs index ebd4abb76cf0..5e386be0d420 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNetworkRuleSet_GetViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNetworkRuleSet_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets NetworkRuleSet for a Namespace. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] GetNetworkRuleSet=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusNetworkRuleSet_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets NetworkRuleSet for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusNetworkRuleSet_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzServiceBusNetworkRuleSet_GetViaIdentity : global::Syst /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzServiceBusNetworkRuleSet_GetViaIdentity : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -86,7 +107,7 @@ public partial class GetAzServiceBusNetworkRuleSet_GetViaIdentity : global::Syst /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -109,24 +130,24 @@ public partial class GetAzServiceBusNetworkRuleSet_GetViaIdentity : global::Syst /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -149,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +196,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusNetworkRuleSet_GetViaIdentity() { @@ -221,8 +247,33 @@ public GetAzServiceBusNetworkRuleSet_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -295,6 +346,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -303,17 +358,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesGetNetworkRuleSet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesGetNetworkRuleSet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -351,12 +402,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -373,7 +424,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -391,12 +442,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -408,8 +459,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNetworkRuleSet_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNetworkRuleSet_List.cs index 5dc72a6b2102..b322cbe49145 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNetworkRuleSet_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusNetworkRuleSet_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets list of NetworkRuleSet for a Namespace. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] ListNetworkRuleSets=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusNetworkRuleSet_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets list of NetworkRuleSet for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusNetworkRuleSet_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzServiceBusNetworkRuleSet_List : global::System.Managem /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzServiceBusNetworkRuleSet_List : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +119,7 @@ public partial class GetAzServiceBusNetworkRuleSet_List : global::System.Managem /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -147,7 +168,8 @@ public partial class GetAzServiceBusNetworkRuleSet_List : global::System.Managem [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -156,24 +178,24 @@ public partial class GetAzServiceBusNetworkRuleSet_List : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -196,6 +218,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -217,7 +244,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusNetworkRuleSet_List() { @@ -268,8 +295,33 @@ public GetAzServiceBusNetworkRuleSet_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -322,7 +374,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -337,13 +389,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesListNetworkRuleSets(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesListNetworkRuleSets(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -381,12 +433,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -403,15 +455,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -421,12 +473,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSetListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -438,15 +490,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSetListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusOperation_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusOperation_List.cs index 82c1718f2700..d9428bd835bf 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusOperation_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusOperation_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Lists all of the available ServiceBus REST API operations. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusOperation_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Lists all of the available ServiceBus REST API operations.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/providers/Microsoft.ServiceBus/operations", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusOperation_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +38,32 @@ public partial class GetAzServiceBusOperation_List : global::System.Management.A /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -59,6 +77,9 @@ public partial class GetAzServiceBusOperation_List : global::System.Management.A [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +106,7 @@ public partial class GetAzServiceBusOperation_List : global::System.Management.A /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -108,24 +129,24 @@ public partial class GetAzServiceBusOperation_List : global::System.Management.A /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -148,6 +169,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -169,7 +195,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusOperation_List() { @@ -220,8 +246,33 @@ public GetAzServiceBusOperation_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -274,7 +325,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -292,7 +343,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -330,12 +381,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -352,7 +403,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -370,12 +421,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperationListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -387,15 +438,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperationListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateEndpointConnection_Get.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateEndpointConnection_Get.cs index c052f5dedbbb..ef67c2c5685a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateEndpointConnection_Get.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateEndpointConnection_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets a description for the specified Private Endpoint Connection. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusPrivateEndpointConnection_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets a description for the specified Private Endpoint Connection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusPrivateEndpointConnection_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class GetAzServiceBusPrivateEndpointConnection_Get : global::Syst /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +71,9 @@ public partial class GetAzServiceBusPrivateEndpointConnection_Get : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +129,7 @@ public partial class GetAzServiceBusPrivateEndpointConnection_Get : global::Syst /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -156,7 +178,8 @@ public partial class GetAzServiceBusPrivateEndpointConnection_Get : global::Syst [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -165,24 +188,24 @@ public partial class GetAzServiceBusPrivateEndpointConnection_Get : global::Syst /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -205,6 +228,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -226,7 +254,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusPrivateEndpointConnection_Get() { @@ -277,8 +305,33 @@ public GetAzServiceBusPrivateEndpointConnection_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -331,7 +384,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -346,13 +399,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PrivateEndpointConnectionsGet(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.PrivateEndpointConnectionsGet(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -390,12 +443,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,15 +465,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -430,12 +483,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -447,8 +500,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateEndpointConnection_GetViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateEndpointConnection_GetViaIdentity.cs index 1cf3f5ef07ee..37ff853fb933 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateEndpointConnection_GetViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateEndpointConnection_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets a description for the specified Private Endpoint Connection. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusPrivateEndpointConnection_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets a description for the specified Private Endpoint Connection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusPrivateEndpointConnection_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class GetAzServiceBusPrivateEndpointConnection_GetViaIdentity : g /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +71,9 @@ public partial class GetAzServiceBusPrivateEndpointConnection_GetViaIdentity : g [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -86,7 +108,7 @@ public partial class GetAzServiceBusPrivateEndpointConnection_GetViaIdentity : g /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -109,24 +131,24 @@ public partial class GetAzServiceBusPrivateEndpointConnection_GetViaIdentity : g /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -149,6 +171,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +197,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusPrivateEndpointConnection_GetViaIdentity() { @@ -221,8 +248,33 @@ public GetAzServiceBusPrivateEndpointConnection_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +327,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -295,6 +347,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -307,17 +363,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateEndpointConnectionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.PrivateEndpointConnectionsGet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.PrivateEndpointConnectionName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.PrivateEndpointConnectionsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.PrivateEndpointConnectionName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -355,12 +407,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -377,7 +429,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -395,12 +447,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,8 +464,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateEndpointConnection_GetViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateEndpointConnection_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..43dc6a704eba --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateEndpointConnection_GetViaIdentityNamespace.cs @@ -0,0 +1,503 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Gets a description for the specified Private Endpoint Connection. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusPrivateEndpointConnection_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets a description for the specified Private Endpoint Connection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2022-10-01-preview")] + public partial class GetAzServiceBusPrivateEndpointConnection_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The PrivateEndpointConnection name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The PrivateEndpointConnection name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The PrivateEndpointConnection name", + SerializedName = @"privateEndpointConnectionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("PrivateEndpointConnectionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public GetAzServiceBusPrivateEndpointConnection_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/privateEndpointConnections/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.PrivateEndpointConnectionsGetViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.PrivateEndpointConnectionsGet(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateEndpointConnection_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateEndpointConnection_List.cs index d95c3e644e81..b86df2a335a8 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateEndpointConnection_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateEndpointConnection_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets the available PrivateEndpointConnections within a namespace. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusPrivateEndpointConnection_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets the available PrivateEndpointConnections within a namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusPrivateEndpointConnection_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +38,32 @@ public partial class GetAzServiceBusPrivateEndpointConnection_List : global::Sys /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -58,6 +77,9 @@ public partial class GetAzServiceBusPrivateEndpointConnection_List : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +120,7 @@ public partial class GetAzServiceBusPrivateEndpointConnection_List : global::Sys /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -147,7 +169,8 @@ public partial class GetAzServiceBusPrivateEndpointConnection_List : global::Sys [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -156,24 +179,24 @@ public partial class GetAzServiceBusPrivateEndpointConnection_List : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -196,6 +219,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -217,7 +245,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusPrivateEndpointConnection_List() { @@ -268,8 +296,33 @@ public GetAzServiceBusPrivateEndpointConnection_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -322,7 +375,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -337,13 +390,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PrivateEndpointConnectionsList(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.PrivateEndpointConnectionsList(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -381,12 +434,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -403,15 +456,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -421,12 +474,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnectionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -438,15 +491,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnectionListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateLink_Get.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateLink_Get.cs index 7ef9cf4098d7..abb1f4cc48bf 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateLink_Get.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusPrivateLink_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets lists of resources that supports Privatelinks. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateLinkResources" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusPrivateLink_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets lists of resources that supports Privatelinks.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateLinkResources", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusPrivateLink_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +38,32 @@ public partial class GetAzServiceBusPrivateLink_Get : global::System.Management. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -58,6 +77,9 @@ public partial class GetAzServiceBusPrivateLink_Get : global::System.Management. [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +120,7 @@ public partial class GetAzServiceBusPrivateLink_Get : global::System.Management. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -147,7 +169,8 @@ public partial class GetAzServiceBusPrivateLink_Get : global::System.Management. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -156,24 +179,24 @@ public partial class GetAzServiceBusPrivateLink_Get : global::System.Management. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -196,6 +219,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -217,7 +245,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusPrivateLink_Get() { @@ -268,8 +296,33 @@ public GetAzServiceBusPrivateLink_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -322,7 +375,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -337,13 +390,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PrivateLinkResourcesGet(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.PrivateLinkResourcesGet(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -381,12 +434,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -403,15 +456,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -421,12 +474,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -438,15 +491,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // nested-array / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_Get.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_Get.cs index c69a6e129b78..0821b921cd1f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_Get.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets an authorization rule for a queue by rule name. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusQueueAuthorizationRule_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets an authorization rule for a queue by rule name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705611.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusQueueAuthorizationRule_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class GetAzServiceBusQueueAuthorizationRule_Get : global::System. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class GetAzServiceBusQueueAuthorizationRule_Get : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +129,7 @@ public partial class GetAzServiceBusQueueAuthorizationRule_Get : global::System. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -170,7 +192,8 @@ public partial class GetAzServiceBusQueueAuthorizationRule_Get : global::System. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -179,24 +202,24 @@ public partial class GetAzServiceBusQueueAuthorizationRule_Get : global::System. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -219,6 +242,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -240,7 +268,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusQueueAuthorizationRule_Get() { @@ -291,8 +319,33 @@ public GetAzServiceBusQueueAuthorizationRule_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -345,7 +398,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -360,13 +413,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.QueuesGetAuthorizationRule(ResourceGroupName, NamespaceName, QueueName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.QueuesGetAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, QueueName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,QueueName=QueueName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,QueueName=QueueName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -404,12 +457,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,15 +479,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, QueueName=QueueName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, QueueName=QueueName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -444,12 +497,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -461,8 +514,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_GetViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_GetViaIdentity.cs index dc24223d9dfa..2ed048bc9014 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_GetViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets an authorization rule for a queue by rule name. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusQueueAuthorizationRule_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets an authorization rule for a queue by rule name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705611.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusQueueAuthorizationRule_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class GetAzServiceBusQueueAuthorizationRule_GetViaIdentity : glob /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class GetAzServiceBusQueueAuthorizationRule_GetViaIdentity : glob [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -87,7 +109,7 @@ public partial class GetAzServiceBusQueueAuthorizationRule_GetViaIdentity : glob /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -110,24 +132,24 @@ public partial class GetAzServiceBusQueueAuthorizationRule_GetViaIdentity : glob /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -150,6 +172,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -171,7 +198,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusQueueAuthorizationRule_GetViaIdentity() { @@ -222,8 +249,33 @@ public GetAzServiceBusQueueAuthorizationRule_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -276,7 +328,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -296,6 +348,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -312,17 +368,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.QueuesGetAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.QueueName ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.QueuesGetAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.QueueName ?? null, InputObject.AuthorizationRuleName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -360,12 +412,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -382,7 +434,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -400,12 +452,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -417,8 +469,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_GetViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..85aeb98c4f6d --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_GetViaIdentityNamespace.cs @@ -0,0 +1,517 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Gets an authorization rule for a queue by rule name. + /// + /// [OpenAPI] GetAuthorizationRule=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusQueueAuthorizationRule_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets an authorization rule for a queue by rule name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705611.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class GetAzServiceBusQueueAuthorizationRule_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _queueName; + + /// The queue name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The queue name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The queue name.", + SerializedName = @"queueName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string QueueName { get => this._queueName; set => this._queueName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public GetAzServiceBusQueueAuthorizationRule_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/queues/{(global::System.Uri.EscapeDataString(this.QueueName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.QueuesGetAuthorizationRuleViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.QueuesGetAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, QueueName, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { QueueName=QueueName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_GetViaIdentityQueue.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_GetViaIdentityQueue.cs new file mode 100644 index 000000000000..921297e171f0 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_GetViaIdentityQueue.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Gets an authorization rule for a queue by rule name. + /// + /// [OpenAPI] GetAuthorizationRule=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusQueueAuthorizationRule_GetViaIdentityQueue")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets an authorization rule for a queue by rule name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705611.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class GetAzServiceBusQueueAuthorizationRule_GetViaIdentityQueue : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _queueInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity QueueInputObject { get => this._queueInputObject; set => this._queueInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzServiceBusQueueAuthorizationRule_GetViaIdentityQueue() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (QueueInputObject?.Id != null) + { + this.QueueInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.QueuesGetAuthorizationRuleViaIdentity(QueueInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == QueueInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.QueueName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.QueueName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + await this.Client.QueuesGetAuthorizationRule(QueueInputObject.SubscriptionId ?? null, QueueInputObject.ResourceGroupName ?? null, QueueInputObject.NamespaceName ?? null, QueueInputObject.QueueName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_List.cs index 1575937cbfd5..c69748e8f47e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueAuthorizationRule_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets all authorization rules for a queue. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusQueueAuthorizationRule_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets all authorization rules for a queue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705607.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusQueueAuthorizationRule_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +39,32 @@ public partial class GetAzServiceBusQueueAuthorizationRule_List : global::System /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -59,6 +78,9 @@ public partial class GetAzServiceBusQueueAuthorizationRule_List : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -99,7 +121,7 @@ public partial class GetAzServiceBusQueueAuthorizationRule_List : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -162,7 +184,8 @@ public partial class GetAzServiceBusQueueAuthorizationRule_List : global::System [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -171,24 +194,24 @@ public partial class GetAzServiceBusQueueAuthorizationRule_List : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -211,6 +234,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -232,7 +260,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusQueueAuthorizationRule_List() { @@ -283,8 +311,33 @@ public GetAzServiceBusQueueAuthorizationRule_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -337,7 +390,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -352,13 +405,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.QueuesListAuthorizationRules(ResourceGroupName, NamespaceName, QueueName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.QueuesListAuthorizationRules(SubscriptionId, ResourceGroupName, NamespaceName, QueueName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,QueueName=QueueName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,QueueName=QueueName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -396,12 +449,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,15 +471,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, QueueName=QueueName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, QueueName=QueueName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -436,12 +489,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -453,15 +506,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueKey_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueKey_List.cs index 8c393b78cc29..a93824a00a30 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueKey_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueueKey_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Primary and secondary connection strings to the queue. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusQueueKey_List", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Primary and secondary connection strings to the queue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705608.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/ListKeys", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusQueueKey_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class GetAzServiceBusQueueKey_List : global::System.Management.Au /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class GetAzServiceBusQueueKey_List : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +129,7 @@ public partial class GetAzServiceBusQueueKey_List : global::System.Management.Au /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -170,7 +192,8 @@ public partial class GetAzServiceBusQueueKey_List : global::System.Management.Au [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -179,24 +202,24 @@ public partial class GetAzServiceBusQueueKey_List : global::System.Management.Au /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -219,6 +242,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -240,7 +268,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusQueueKey_List() { @@ -291,8 +319,33 @@ public GetAzServiceBusQueueKey_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -348,7 +401,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -363,13 +416,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.QueuesListKeys(ResourceGroupName, NamespaceName, QueueName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.QueuesListKeys(SubscriptionId, ResourceGroupName, NamespaceName, QueueName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,QueueName=QueueName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,QueueName=QueueName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -407,12 +460,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -429,15 +482,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, QueueName=QueueName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, QueueName=QueueName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -447,12 +500,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -464,8 +517,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueue_Get.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueue_Get.cs index 8b70e62f2f04..a9a0b59d0166 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueue_Get.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueue_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Returns a description for the specified queue. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusQueue_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Returns a description for the specified queue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639380.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusQueue_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class GetAzServiceBusQueue_Get : global::System.Management.Automa /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +71,9 @@ public partial class GetAzServiceBusQueue_Get : global::System.Management.Automa [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +129,7 @@ public partial class GetAzServiceBusQueue_Get : global::System.Management.Automa /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -156,7 +178,8 @@ public partial class GetAzServiceBusQueue_Get : global::System.Management.Automa [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -165,24 +188,24 @@ public partial class GetAzServiceBusQueue_Get : global::System.Management.Automa /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -205,6 +228,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -226,7 +254,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusQueue_Get() { @@ -277,8 +305,33 @@ public GetAzServiceBusQueue_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -331,7 +384,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -346,13 +399,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.QueuesGet(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.QueuesGet(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -390,12 +443,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,15 +465,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -430,12 +483,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -447,8 +500,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueue_GetViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueue_GetViaIdentity.cs index e4251735bd5a..4b4b65bf9cbc 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueue_GetViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueue_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Returns a description for the specified queue. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusQueue_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Returns a description for the specified queue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639380.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusQueue_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class GetAzServiceBusQueue_GetViaIdentity : global::System.Manage /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +71,9 @@ public partial class GetAzServiceBusQueue_GetViaIdentity : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -86,7 +108,7 @@ public partial class GetAzServiceBusQueue_GetViaIdentity : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -109,24 +131,24 @@ public partial class GetAzServiceBusQueue_GetViaIdentity : global::System.Manage /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -149,6 +171,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +197,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusQueue_GetViaIdentity() { @@ -221,8 +248,33 @@ public GetAzServiceBusQueue_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +327,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -295,6 +347,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -307,17 +363,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.QueueName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.QueuesGet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.QueueName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.QueuesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.QueueName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -355,12 +407,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -377,7 +429,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -395,12 +447,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,8 +464,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueue_GetViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueue_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..681921309f0a --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueue_GetViaIdentityNamespace.cs @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Returns a description for the specified queue. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusQueue_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Returns a description for the specified queue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639380.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}", ApiVersion = "2022-10-01-preview")] + public partial class GetAzServiceBusQueue_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The queue name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The queue name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The queue name.", + SerializedName = @"queueName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("QueueName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzServiceBusQueue_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/queues/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.QueuesGetViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.QueuesGet(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueue_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueue_List.cs index fc8fb568b08a..178eb9bd16c7 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueue_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusQueue_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets the queues within a namespace. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] ListByNamespace=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusQueue_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets the queues within a namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639415.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusQueue_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +38,32 @@ public partial class GetAzServiceBusQueue_List : global::System.Management.Autom /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -58,6 +77,9 @@ public partial class GetAzServiceBusQueue_List : global::System.Management.Autom [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +120,7 @@ public partial class GetAzServiceBusQueue_List : global::System.Management.Autom /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -165,7 +187,8 @@ public partial class GetAzServiceBusQueue_List : global::System.Management.Autom [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -188,24 +211,24 @@ public partial class GetAzServiceBusQueue_List : global::System.Management.Autom /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -228,6 +251,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -249,7 +277,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusQueue_List() { @@ -300,8 +328,33 @@ public GetAzServiceBusQueue_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -354,7 +407,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -369,13 +422,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.QueuesListByNamespace(ResourceGroupName, NamespaceName, SubscriptionId, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); + await this.Client.QueuesListByNamespace(SubscriptionId, ResourceGroupName, NamespaceName, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -413,12 +466,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -435,15 +488,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -453,12 +506,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueueListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -470,15 +523,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueueListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_Get.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_Get.cs index 3a368ea8254f..40c2813017fb 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_Get.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Retrieves the description for the specified rule. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusRule_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Retrieves the description for the specified rule.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusRule_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzServiceBusRule_Get : global::System.Management.Automat /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzServiceBusRule_Get : global::System.Management.Automat [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +128,7 @@ public partial class GetAzServiceBusRule_Get : global::System.Management.Automat /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -156,7 +177,8 @@ public partial class GetAzServiceBusRule_Get : global::System.Management.Automat [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -193,24 +215,24 @@ public partial class GetAzServiceBusRule_Get : global::System.Management.Automat /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -233,6 +255,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -254,7 +281,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusRule_Get() { @@ -305,8 +332,33 @@ public GetAzServiceBusRule_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -359,7 +411,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -374,13 +426,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.RulesGet(ResourceGroupName, NamespaceName, TopicName, SubscriptionName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.RulesGet(SubscriptionId, ResourceGroupName, NamespaceName, TopicName, SubscriptionName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,SubscriptionName=SubscriptionName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,SubscriptionName=SubscriptionName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -418,12 +470,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -440,15 +492,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, SubscriptionName=SubscriptionName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, SubscriptionName=SubscriptionName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -458,12 +510,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -475,8 +527,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_GetViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_GetViaIdentity.cs index 5f9c5b88c611..ae9f7536385a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_GetViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Retrieves the description for the specified rule. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusRule_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Retrieves the description for the specified rule.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusRule_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzServiceBusRule_GetViaIdentity : global::System.Managem /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzServiceBusRule_GetViaIdentity : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -86,7 +107,7 @@ public partial class GetAzServiceBusRule_GetViaIdentity : global::System.Managem /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -109,24 +130,24 @@ public partial class GetAzServiceBusRule_GetViaIdentity : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -149,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +196,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusRule_GetViaIdentity() { @@ -221,8 +247,33 @@ public GetAzServiceBusRule_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -295,6 +346,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -315,17 +370,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.RuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.RulesGet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.SubscriptionName ?? null, InputObject.RuleName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.RulesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.SubscriptionName ?? null, InputObject.RuleName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -363,12 +414,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -385,7 +436,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -403,12 +454,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -420,8 +471,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_GetViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..e8ac24afb34d --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_GetViaIdentityNamespace.cs @@ -0,0 +1,529 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Retrieves the description for the specified rule. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusRule_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Retrieves the description for the specified rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] + public partial class GetAzServiceBusRule_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The rule name.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionName; + + /// The subscription name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The subscription name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The subscription name.", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionName { get => this._subscriptionName; set => this._subscriptionName = value; } + + /// Backing field for property. + private string _topicName; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzServiceBusRule_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.TopicName.ToString()))}/subscriptions/{(global::System.Uri.EscapeDataString(this.SubscriptionName.ToString()))}/rules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.RulesGetViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.RulesGet(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, TopicName, SubscriptionName, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { TopicName=TopicName,SubscriptionName=SubscriptionName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_GetViaIdentitySubscription.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_GetViaIdentitySubscription.cs new file mode 100644 index 000000000000..6ac9b4976908 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_GetViaIdentitySubscription.cs @@ -0,0 +1,509 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Retrieves the description for the specified rule. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusRule_GetViaIdentitySubscription")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Retrieves the description for the specified rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] + public partial class GetAzServiceBusRule_GetViaIdentitySubscription : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The rule name.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _subscriptionInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity SubscriptionInputObject { get => this._subscriptionInputObject; set => this._subscriptionInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzServiceBusRule_GetViaIdentitySubscription() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (SubscriptionInputObject?.Id != null) + { + this.SubscriptionInputObject.Id += $"/rules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.RulesGetViaIdentity(SubscriptionInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == SubscriptionInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + if (null == SubscriptionInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + if (null == SubscriptionInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + if (null == SubscriptionInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + if (null == SubscriptionInputObject.SubscriptionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.SubscriptionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + await this.Client.RulesGet(SubscriptionInputObject.SubscriptionId ?? null, SubscriptionInputObject.ResourceGroupName ?? null, SubscriptionInputObject.NamespaceName ?? null, SubscriptionInputObject.TopicName ?? null, SubscriptionInputObject.SubscriptionName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_GetViaIdentityTopic.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_GetViaIdentityTopic.cs new file mode 100644 index 000000000000..341987507327 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_GetViaIdentityTopic.cs @@ -0,0 +1,519 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Retrieves the description for the specified rule. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusRule_GetViaIdentityTopic")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Retrieves the description for the specified rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] + public partial class GetAzServiceBusRule_GetViaIdentityTopic : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The rule name.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionName; + + /// The subscription name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The subscription name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The subscription name.", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionName { get => this._subscriptionName; set => this._subscriptionName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _topicInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity TopicInputObject { get => this._topicInputObject; set => this._topicInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzServiceBusRule_GetViaIdentityTopic() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (TopicInputObject?.Id != null) + { + this.TopicInputObject.Id += $"/subscriptions/{(global::System.Uri.EscapeDataString(this.SubscriptionName.ToString()))}/rules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.RulesGetViaIdentity(TopicInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == TopicInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + await this.Client.RulesGet(TopicInputObject.SubscriptionId ?? null, TopicInputObject.ResourceGroupName ?? null, TopicInputObject.NamespaceName ?? null, TopicInputObject.TopicName ?? null, SubscriptionName, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionName=SubscriptionName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_List.cs index 9c672ff3330a..be3f4a45403f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusRule_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// List all the rules within given topic-subscription @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] ListBySubscriptions=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusRule_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"List all the rules within given topic-subscription")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusRule_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzServiceBusRule_List : global::System.Management.Automa /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzServiceBusRule_List : global::System.Management.Automa [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +119,7 @@ public partial class GetAzServiceBusRule_List : global::System.Management.Automa /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -165,7 +186,8 @@ public partial class GetAzServiceBusRule_List : global::System.Management.Automa [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -216,24 +238,24 @@ public partial class GetAzServiceBusRule_List : global::System.Management.Automa /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -256,6 +278,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -277,7 +304,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusRule_List() { @@ -328,8 +355,33 @@ public GetAzServiceBusRule_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -382,7 +434,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -397,13 +449,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.RulesListBySubscriptions(ResourceGroupName, NamespaceName, TopicName, SubscriptionName, SubscriptionId, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); + await this.Client.RulesListBySubscriptions(SubscriptionId, ResourceGroupName, NamespaceName, TopicName, SubscriptionName, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,SubscriptionName=SubscriptionName,SubscriptionId=SubscriptionId,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,SubscriptionName=SubscriptionName,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -441,12 +493,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -463,15 +515,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, SubscriptionName=SubscriptionName, SubscriptionId=SubscriptionId, Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, SubscriptionName=SubscriptionName, SubscriptionId=SubscriptionId, Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -481,12 +533,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRuleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -498,15 +550,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRuleListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_Get.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_Get.cs index db040d1a063e..d9aa1b05fdca 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_Get.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Returns a subscription description for the specified topic. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusSubscription_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Returns a subscription description for the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639402.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusSubscription_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class GetAzServiceBusSubscription_Get : global::System.Management /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +71,9 @@ public partial class GetAzServiceBusSubscription_Get : global::System.Management [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +129,7 @@ public partial class GetAzServiceBusSubscription_Get : global::System.Management /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -156,7 +178,8 @@ public partial class GetAzServiceBusSubscription_Get : global::System.Management [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -179,24 +202,24 @@ public partial class GetAzServiceBusSubscription_Get : global::System.Management /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -219,6 +242,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -240,7 +268,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusSubscription_Get() { @@ -291,8 +319,33 @@ public GetAzServiceBusSubscription_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -345,7 +398,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -360,13 +413,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SubscriptionsGet(ResourceGroupName, NamespaceName, TopicName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.SubscriptionsGet(SubscriptionId, ResourceGroupName, NamespaceName, TopicName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -404,12 +457,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,15 +479,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -444,12 +497,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -461,8 +514,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_GetViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_GetViaIdentity.cs index 01fd02872fcb..60b94e9c1a7c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_GetViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Returns a subscription description for the specified topic. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusSubscription_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Returns a subscription description for the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639402.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusSubscription_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class GetAzServiceBusSubscription_GetViaIdentity : global::System /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +71,9 @@ public partial class GetAzServiceBusSubscription_GetViaIdentity : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -86,7 +108,7 @@ public partial class GetAzServiceBusSubscription_GetViaIdentity : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -109,24 +131,24 @@ public partial class GetAzServiceBusSubscription_GetViaIdentity : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -149,6 +171,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +197,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusSubscription_GetViaIdentity() { @@ -221,8 +248,33 @@ public GetAzServiceBusSubscription_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +327,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -295,6 +347,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -311,17 +367,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.SubscriptionsGet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.SubscriptionName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.SubscriptionsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.SubscriptionName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -359,12 +411,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -381,7 +433,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -399,12 +451,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -416,8 +468,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_GetViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..f5d571390712 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_GetViaIdentityNamespace.cs @@ -0,0 +1,516 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Returns a subscription description for the specified topic. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusSubscription_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Returns a subscription description for the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639402.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}", ApiVersion = "2022-10-01-preview")] + public partial class GetAzServiceBusSubscription_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The subscription name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The subscription name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The subscription name.", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SubscriptionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _topicName; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzServiceBusSubscription_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.TopicName.ToString()))}/subscriptions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.SubscriptionsGetViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.SubscriptionsGet(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, TopicName, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { TopicName=TopicName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_GetViaIdentityTopic.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_GetViaIdentityTopic.cs new file mode 100644 index 000000000000..5a4c0672d029 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_GetViaIdentityTopic.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Returns a subscription description for the specified topic. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusSubscription_GetViaIdentityTopic")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Returns a subscription description for the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639402.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}", ApiVersion = "2022-10-01-preview")] + public partial class GetAzServiceBusSubscription_GetViaIdentityTopic : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The subscription name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The subscription name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The subscription name.", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SubscriptionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _topicInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity TopicInputObject { get => this._topicInputObject; set => this._topicInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzServiceBusSubscription_GetViaIdentityTopic() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (TopicInputObject?.Id != null) + { + this.TopicInputObject.Id += $"/subscriptions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.SubscriptionsGetViaIdentity(TopicInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == TopicInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + await this.Client.SubscriptionsGet(TopicInputObject.SubscriptionId ?? null, TopicInputObject.ResourceGroupName ?? null, TopicInputObject.NamespaceName ?? null, TopicInputObject.TopicName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_List.cs index b26838dfb729..eed303315bdd 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusSubscription_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// List all the subscriptions under a specified topic. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] ListByTopic=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusSubscription_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"List all the subscriptions under a specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639400.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusSubscription_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +38,32 @@ public partial class GetAzServiceBusSubscription_List : global::System.Managemen /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -58,6 +77,9 @@ public partial class GetAzServiceBusSubscription_List : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +120,7 @@ public partial class GetAzServiceBusSubscription_List : global::System.Managemen /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -165,7 +187,8 @@ public partial class GetAzServiceBusSubscription_List : global::System.Managemen [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -202,24 +225,24 @@ public partial class GetAzServiceBusSubscription_List : global::System.Managemen /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -242,6 +265,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -263,7 +291,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusSubscription_List() { @@ -314,8 +342,33 @@ public GetAzServiceBusSubscription_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -368,7 +421,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -383,13 +436,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SubscriptionsListByTopic(ResourceGroupName, NamespaceName, TopicName, SubscriptionId, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); + await this.Client.SubscriptionsListByTopic(SubscriptionId, ResourceGroupName, NamespaceName, TopicName, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,SubscriptionId=SubscriptionId,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -427,12 +480,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -449,15 +502,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, SubscriptionId=SubscriptionId, Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, SubscriptionId=SubscriptionId, Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -467,12 +520,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscriptionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -484,15 +537,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscriptionListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_Get.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_Get.cs index 5030a7df2fce..e5b07a02568b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_Get.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Returns the specified authorization rule. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusTopicAuthorizationRule_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Returns the specified authorization rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720676.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusTopicAuthorizationRule_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class GetAzServiceBusTopicAuthorizationRule_Get : global::System. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class GetAzServiceBusTopicAuthorizationRule_Get : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +129,7 @@ public partial class GetAzServiceBusTopicAuthorizationRule_Get : global::System. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -156,7 +178,8 @@ public partial class GetAzServiceBusTopicAuthorizationRule_Get : global::System. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -179,24 +202,24 @@ public partial class GetAzServiceBusTopicAuthorizationRule_Get : global::System. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -219,6 +242,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -240,7 +268,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusTopicAuthorizationRule_Get() { @@ -291,8 +319,33 @@ public GetAzServiceBusTopicAuthorizationRule_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -345,7 +398,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -360,13 +413,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.TopicsGetAuthorizationRule(ResourceGroupName, NamespaceName, TopicName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.TopicsGetAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, TopicName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -404,12 +457,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,15 +479,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -444,12 +497,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -461,8 +514,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_GetViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_GetViaIdentity.cs index 0c3b8264ca45..857d4491a99d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_GetViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Returns the specified authorization rule. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusTopicAuthorizationRule_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Returns the specified authorization rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720676.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusTopicAuthorizationRule_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class GetAzServiceBusTopicAuthorizationRule_GetViaIdentity : glob /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class GetAzServiceBusTopicAuthorizationRule_GetViaIdentity : glob [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -87,7 +109,7 @@ public partial class GetAzServiceBusTopicAuthorizationRule_GetViaIdentity : glob /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -110,24 +132,24 @@ public partial class GetAzServiceBusTopicAuthorizationRule_GetViaIdentity : glob /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -150,6 +172,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -171,7 +198,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusTopicAuthorizationRule_GetViaIdentity() { @@ -222,8 +249,33 @@ public GetAzServiceBusTopicAuthorizationRule_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -276,7 +328,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -296,6 +348,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -312,17 +368,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.TopicsGetAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.TopicsGetAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.AuthorizationRuleName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -360,12 +412,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -382,7 +434,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -400,12 +452,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -417,8 +469,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_GetViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..ec2544be30df --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_GetViaIdentityNamespace.cs @@ -0,0 +1,517 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Returns the specified authorization rule. + /// + /// [OpenAPI] GetAuthorizationRule=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusTopicAuthorizationRule_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Returns the specified authorization rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720676.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class GetAzServiceBusTopicAuthorizationRule_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _topicName; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public GetAzServiceBusTopicAuthorizationRule_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.TopicName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TopicsGetAuthorizationRuleViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.TopicsGetAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, TopicName, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { TopicName=TopicName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_GetViaIdentityTopic.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_GetViaIdentityTopic.cs new file mode 100644 index 000000000000..a28e85332bc6 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_GetViaIdentityTopic.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Returns the specified authorization rule. + /// + /// [OpenAPI] GetAuthorizationRule=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusTopicAuthorizationRule_GetViaIdentityTopic")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Returns the specified authorization rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720676.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class GetAzServiceBusTopicAuthorizationRule_GetViaIdentityTopic : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _topicInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity TopicInputObject { get => this._topicInputObject; set => this._topicInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzServiceBusTopicAuthorizationRule_GetViaIdentityTopic() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (TopicInputObject?.Id != null) + { + this.TopicInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TopicsGetAuthorizationRuleViaIdentity(TopicInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == TopicInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + await this.Client.TopicsGetAuthorizationRule(TopicInputObject.SubscriptionId ?? null, TopicInputObject.ResourceGroupName ?? null, TopicInputObject.NamespaceName ?? null, TopicInputObject.TopicName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_List.cs index 5790e26d370f..9a24adb8233c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicAuthorizationRule_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets authorization rules for a topic. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusTopicAuthorizationRule_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets authorization rules for a topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720681.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusTopicAuthorizationRule_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +39,32 @@ public partial class GetAzServiceBusTopicAuthorizationRule_List : global::System /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -59,6 +78,9 @@ public partial class GetAzServiceBusTopicAuthorizationRule_List : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -99,7 +121,7 @@ public partial class GetAzServiceBusTopicAuthorizationRule_List : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -148,7 +170,8 @@ public partial class GetAzServiceBusTopicAuthorizationRule_List : global::System [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -171,24 +194,24 @@ public partial class GetAzServiceBusTopicAuthorizationRule_List : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -211,6 +234,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -232,7 +260,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusTopicAuthorizationRule_List() { @@ -283,8 +311,33 @@ public GetAzServiceBusTopicAuthorizationRule_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -337,7 +390,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -352,13 +405,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.TopicsListAuthorizationRules(ResourceGroupName, NamespaceName, TopicName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.TopicsListAuthorizationRules(SubscriptionId, ResourceGroupName, NamespaceName, TopicName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -396,12 +449,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,15 +471,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -436,12 +489,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRuleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -453,15 +506,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRuleListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicKey_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicKey_List.cs index 02555e605a37..e71e2aff0f76 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicKey_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopicKey_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets the primary and secondary connection strings for the topic. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusTopicKey_List", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets the primary and secondary connection strings for the topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720677.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/ListKeys", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusTopicKey_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class GetAzServiceBusTopicKey_List : global::System.Management.Au /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class GetAzServiceBusTopicKey_List : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +129,7 @@ public partial class GetAzServiceBusTopicKey_List : global::System.Management.Au /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -156,7 +178,8 @@ public partial class GetAzServiceBusTopicKey_List : global::System.Management.Au [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -179,24 +202,24 @@ public partial class GetAzServiceBusTopicKey_List : global::System.Management.Au /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -219,6 +242,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -240,7 +268,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusTopicKey_List() { @@ -291,8 +319,33 @@ public GetAzServiceBusTopicKey_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -348,7 +401,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -363,13 +416,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.TopicsListKeys(ResourceGroupName, NamespaceName, TopicName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.TopicsListKeys(SubscriptionId, ResourceGroupName, NamespaceName, TopicName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -407,12 +460,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -429,15 +482,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -447,12 +500,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -464,8 +517,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopic_Get.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopic_Get.cs index e41e398133a8..d32e2e33c8e8 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopic_Get.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopic_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Returns a description for the specified topic. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusTopic_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Returns a description for the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639399.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusTopic_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class GetAzServiceBusTopic_Get : global::System.Management.Automa /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +71,9 @@ public partial class GetAzServiceBusTopic_Get : global::System.Management.Automa [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +129,7 @@ public partial class GetAzServiceBusTopic_Get : global::System.Management.Automa /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -156,7 +178,8 @@ public partial class GetAzServiceBusTopic_Get : global::System.Management.Automa [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -165,24 +188,24 @@ public partial class GetAzServiceBusTopic_Get : global::System.Management.Automa /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -205,6 +228,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -226,7 +254,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusTopic_Get() { @@ -277,8 +305,33 @@ public GetAzServiceBusTopic_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -331,7 +384,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -346,13 +399,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.TopicsGet(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.TopicsGet(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -390,12 +443,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,15 +465,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -430,12 +483,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -447,8 +500,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopic_GetViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopic_GetViaIdentity.cs index 448ecfe40776..a32716efa087 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopic_GetViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopic_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Returns a description for the specified topic. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusTopic_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Returns a description for the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639399.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusTopic_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class GetAzServiceBusTopic_GetViaIdentity : global::System.Manage /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +71,9 @@ public partial class GetAzServiceBusTopic_GetViaIdentity : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -86,7 +108,7 @@ public partial class GetAzServiceBusTopic_GetViaIdentity : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -109,24 +131,24 @@ public partial class GetAzServiceBusTopic_GetViaIdentity : global::System.Manage /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -149,6 +171,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +197,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusTopic_GetViaIdentity() { @@ -221,8 +248,33 @@ public GetAzServiceBusTopic_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +327,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -295,6 +347,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -307,17 +363,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.TopicsGet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.TopicsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -355,12 +407,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -377,7 +429,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -395,12 +447,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,8 +464,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopic_GetViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopic_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..b810d4fe2fac --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopic_GetViaIdentityNamespace.cs @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Returns a description for the specified topic. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusTopic_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Returns a description for the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639399.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}", ApiVersion = "2022-10-01-preview")] + public partial class GetAzServiceBusTopic_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TopicName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzServiceBusTopic_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TopicsGetViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.TopicsGet(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopic_List.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopic_List.cs index 87eb469651e4..32f7b419ba48 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopic_List.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/GetAzServiceBusTopic_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Gets all the topics in a namespace. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] ListByNamespace=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzServiceBusTopic_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Gets all the topics in a namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639388.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics", ApiVersion = "2022-10-01-preview")] public partial class GetAzServiceBusTopic_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +38,32 @@ public partial class GetAzServiceBusTopic_List : global::System.Management.Autom /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -58,6 +77,9 @@ public partial class GetAzServiceBusTopic_List : global::System.Management.Autom [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +120,7 @@ public partial class GetAzServiceBusTopic_List : global::System.Management.Autom /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -165,7 +187,8 @@ public partial class GetAzServiceBusTopic_List : global::System.Management.Autom [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -188,24 +211,24 @@ public partial class GetAzServiceBusTopic_List : global::System.Management.Autom /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -228,6 +251,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -249,7 +277,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzServiceBusTopic_List() { @@ -300,8 +328,33 @@ public GetAzServiceBusTopic_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -354,7 +407,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -369,13 +422,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.TopicsListByNamespace(ResourceGroupName, NamespaceName, SubscriptionId, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); + await this.Client.TopicsListByNamespace(SubscriptionId, ResourceGroupName, NamespaceName, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -413,12 +466,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -435,15 +488,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -453,12 +506,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopicListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -470,15 +523,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopicListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_Break.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_Break.cs index 12ec39e2db17..e86bf27d51e3 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_Break.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_Break.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// @@ -21,7 +23,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing", ApiVersion = "2022-10-01-preview")] public partial class InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_Break : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_Break /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_Break [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -116,7 +137,7 @@ public partial class InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_Break /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -165,7 +186,8 @@ public partial class InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_Break [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -174,12 +196,12 @@ public partial class InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_Break /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -212,6 +234,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -233,7 +260,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_Break() { @@ -284,8 +311,33 @@ public InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_Break() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -341,7 +393,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -354,12 +406,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsBreakPairing(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsBreakPairing(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -397,12 +449,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -419,15 +471,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentity.cs index 548b07f41812..348b429b4da5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// @@ -21,7 +23,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing", ApiVersion = "2022-10-01-preview")] public partial class InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_BreakV /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_BreakV [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -96,7 +117,7 @@ public partial class InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_BreakV /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -119,12 +140,12 @@ public partial class InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_BreakV /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -157,6 +178,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -178,7 +204,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the + /// Initializes a new instance of the /// cmdlet class. /// public InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentity() @@ -230,8 +256,33 @@ public InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -287,7 +338,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,6 +358,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -319,17 +374,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Alias"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DisasterRecoveryConfigsBreakPairing(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsBreakPairing(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -367,12 +418,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -389,7 +440,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace.cs new file mode 100644 index 000000000000..7c8951c2acd1 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// + /// This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces + /// + /// + /// [OpenAPI] BreakPairing=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing", ApiVersion = "2022-10-01-preview")] + public partial class InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsBreakPairing' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/disasterRecoveryConfigs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsBreakPairingViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.DisasterRecoveryConfigsBreakPairing(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_Fail.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_Fail.cs index fd4443ec32a6..41e82b67fee6 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_Fail.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_Fail.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// @@ -21,7 +23,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover", ApiVersion = "2022-10-01-preview")] public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_Fail : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_Fail : glo /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_Fail : glo [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +128,7 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_Fail : glo public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties _parameter; /// /// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. @@ -118,8 +139,9 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_Fail : glo ReadOnly = false, Description = @"Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties Parameter { get => this._parameter; set => this._parameter = value; } /// /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. @@ -131,7 +153,7 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_Fail : glo /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -180,7 +202,8 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_Fail : glo [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -189,12 +212,12 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_Fail : glo /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -227,6 +250,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -248,7 +276,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public InvokeAzServiceBusFailDisasterRecoveryConfigOver_Fail() { @@ -299,8 +327,33 @@ public InvokeAzServiceBusFailDisasterRecoveryConfigOver_Fail() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -356,7 +409,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -369,12 +422,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsFailOver(ResourceGroupName, NamespaceName, Name, SubscriptionId, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsFailOver(SubscriptionId, ResourceGroupName, NamespaceName, Name, Parameter, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId,body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -412,12 +465,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -434,15 +487,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailExpanded.cs index a4efbf25fc7f..6c7cd757fced 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// @@ -21,7 +23,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover", ApiVersion = "2022-10-01-preview")] public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,16 +40,31 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailExpand /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// /// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.FailoverProperties(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.FailoverProperties(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -60,6 +78,9 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailExpand [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -134,7 +155,7 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailExpand /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -183,7 +204,8 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailExpand [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -192,12 +214,12 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailExpand /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -230,6 +252,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -251,7 +278,8 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet + /// class. /// public InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailExpanded() { @@ -302,8 +330,33 @@ public InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailExpanded() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -359,7 +412,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -372,12 +425,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsFailOver(ResourceGroupName, NamespaceName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsFailOver(SubscriptionId, ResourceGroupName, NamespaceName, Name, _parametersBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -415,12 +468,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -437,15 +490,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentity.cs index a51db5651d3e..ea760e61c27e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// @@ -21,7 +23,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover", ApiVersion = "2022-10-01-preview")] public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIde /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIde [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -87,7 +108,7 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIde global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties _parameter; /// /// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. @@ -98,8 +119,9 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIde ReadOnly = false, Description = @"Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties Parameter { get => this._parameter; set => this._parameter = value; } /// /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. @@ -111,7 +133,7 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIde /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -134,12 +156,12 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIde /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -172,6 +194,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -193,7 +220,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet + /// Initializes a new instance of the cmdlet /// class. /// public InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentity() @@ -245,8 +272,33 @@ public InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -302,7 +354,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -322,6 +374,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -334,17 +390,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Alias"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DisasterRecoveryConfigsFailOver(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsFailOver(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, Parameter, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -382,12 +434,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -404,15 +456,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityExpanded.cs index c5676c78fe15..a6a1dccf4e13 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// @@ -21,7 +23,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover", ApiVersion = "2022-10-01-preview")] public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,16 +40,31 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIde /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// /// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.FailoverProperties(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.FailoverProperties(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -60,6 +78,9 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIde [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -114,7 +135,7 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIde /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -137,12 +158,12 @@ public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIde /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -175,6 +196,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -196,7 +222,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. /// public InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityExpanded() @@ -248,8 +274,33 @@ public InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityExpanded( WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -305,7 +356,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -325,6 +376,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -337,17 +392,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Alias"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DisasterRecoveryConfigsFailOver(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, InputObject.SubscriptionId ?? null, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsFailOver(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, _parametersBody, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -385,12 +436,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -407,15 +458,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityNamespace.cs new file mode 100644 index 000000000000..732d150ad65c --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityNamespace.cs @@ -0,0 +1,510 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// + /// Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace + /// + /// + /// [OpenAPI] FailOver=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover", ApiVersion = "2022-10-01-preview")] + public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties _parameter; + + /// + /// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsFailOver' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/disasterRecoveryConfigs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsFailOverViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.DisasterRecoveryConfigsFailOver(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityNamespaceExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..dcbdb39450ba --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityNamespaceExpanded.cs @@ -0,0 +1,512 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// + /// Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace + /// + /// + /// [OpenAPI] FailOver=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover", ApiVersion = "2022-10-01-preview")] + public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. + /// + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.FailoverProperties(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary.", + SerializedName = @"IsSafeFailover", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsSafeFailover { get => _parametersBody.IsSafeFailover ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.IsSafeFailover = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityNamespaceExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsFailOver' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/disasterRecoveryConfigs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsFailOverViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.DisasterRecoveryConfigsFailOver(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaJsonFilePath.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaJsonFilePath.cs new file mode 100644 index 000000000000..a35786e506eb --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaJsonFilePath.cs @@ -0,0 +1,531 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// + /// Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace + /// + /// + /// [OpenAPI] FailOver=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzServiceBusFailDisasterRecoveryConfigOver_FailViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover", ApiVersion = "2022-10-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.NotSuggestDefaultParameterSet] + public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Fail operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Fail operation")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Fail operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _namespaceName; + + /// The namespace name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The namespace name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The namespace name", + SerializedName = @"namespaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the + /// cmdlet class. + /// + public InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaJsonFilePath() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsFailOver' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DisasterRecoveryConfigsFailOverViaJsonString(SubscriptionId, ResourceGroupName, NamespaceName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaJsonString.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaJsonString.cs new file mode 100644 index 000000000000..3fb2ac33b61a --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaJsonString.cs @@ -0,0 +1,529 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// + /// Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace + /// + /// + /// [OpenAPI] FailOver=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzServiceBusFailDisasterRecoveryConfigOver_FailViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover", ApiVersion = "2022-10-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.NotSuggestDefaultParameterSet] + public partial class InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Fail operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Fail operation")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Fail operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _namespaceName; + + /// The namespace name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The namespace name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The namespace name", + SerializedName = @"namespaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public InvokeAzServiceBusFailDisasterRecoveryConfigOver_FailViaJsonString() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsFailOver' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DisasterRecoveryConfigsFailOverViaJsonString(SubscriptionId, ResourceGroupName, NamespaceName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusGeoDRConfiguration_CreateExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusGeoDRConfiguration_CreateExpanded.cs index 85bec4cc6cb7..52962e537abf 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusGeoDRConfiguration_CreateExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusGeoDRConfiguration_CreateExpanded.cs @@ -6,19 +6,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates or updates a new Alias(Disaster Recovery configuration) + /// Create a new Alias(Disaster Recovery configuration) /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusGeoDRConfiguration_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates or updates a new Alias(Disaster Recovery configuration)")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a new Alias(Disaster Recovery configuration)")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusGeoDRConfiguration_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,8 +37,20 @@ public partial class NewAzServiceBusGeoDRConfiguration_CreateExpanded : global:: /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Single item in List or Get Alias(Disaster Recovery configuration) operation - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ArmDisasterRecovery(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ArmDisasterRecovery(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Primary/Secondary eventhub namespace name, which is part of GEO DR pairing [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Primary/Secondary eventhub namespace name, which is part of GEO DR pairing")] @@ -53,6 +68,9 @@ public partial class NewAzServiceBusGeoDRConfiguration_CreateExpanded : global:: [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -66,6 +84,9 @@ public partial class NewAzServiceBusGeoDRConfiguration_CreateExpanded : global:: [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -140,7 +161,7 @@ public partial class NewAzServiceBusGeoDRConfiguration_CreateExpanded : global:: /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -189,7 +210,8 @@ public partial class NewAzServiceBusGeoDRConfiguration_CreateExpanded : global:: [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -208,24 +230,24 @@ public partial class NewAzServiceBusGeoDRConfiguration_CreateExpanded : global:: /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -248,6 +270,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -312,8 +339,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -323,7 +375,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusGeoDRConfiguration_CreateExpanded() { @@ -377,7 +429,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -390,12 +442,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsCreateOrUpdate(ResourceGroupName, NamespaceName, Name, SubscriptionId, _parametersBody, onOk, onCreated, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsCreateOrUpdate(SubscriptionId, ResourceGroupName, NamespaceName, Name, _parametersBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -457,12 +509,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -479,15 +531,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -497,12 +549,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -514,8 +566,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusGeoDRConfiguration_CreateViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusGeoDRConfiguration_CreateViaIdentity.cs index 5bc632461d94..274f2cf3d302 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusGeoDRConfiguration_CreateViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusGeoDRConfiguration_CreateViaIdentity.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates or updates a new Alias(Disaster Recovery configuration) + /// Create a new Alias(Disaster Recovery configuration) /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusGeoDRConfiguration_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates or updates a new Alias(Disaster Recovery configuration)")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a new Alias(Disaster Recovery configuration)")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusGeoDRConfiguration_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class NewAzServiceBusGeoDRConfiguration_CreateViaIdentity : globa /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class NewAzServiceBusGeoDRConfiguration_CreateViaIdentity : globa [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +106,7 @@ public partial class NewAzServiceBusGeoDRConfiguration_CreateViaIdentity : globa global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery _parameter; /// Single item in List or Get Alias(Disaster Recovery configuration) operation [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in List or Get Alias(Disaster Recovery configuration) operation", ValueFromPipeline = true)] @@ -94,8 +115,9 @@ public partial class NewAzServiceBusGeoDRConfiguration_CreateViaIdentity : globa ReadOnly = false, Description = @"Single item in List or Get Alias(Disaster Recovery configuration) operation", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery Parameter { get => this._parameter; set => this._parameter = value; } /// /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. @@ -107,7 +129,7 @@ public partial class NewAzServiceBusGeoDRConfiguration_CreateViaIdentity : globa /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -140,24 +162,24 @@ public partial class NewAzServiceBusGeoDRConfiguration_CreateViaIdentity : globa /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -180,6 +202,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -244,8 +271,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -255,7 +307,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusGeoDRConfiguration_CreateViaIdentity() { @@ -309,7 +361,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -324,11 +376,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.DisasterRecoveryConfigsCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onCreated, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -341,17 +397,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Alias"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DisasterRecoveryConfigsCreateOrUpdate(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onCreated, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, Parameter, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -413,12 +465,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -435,15 +487,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -453,12 +505,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -470,8 +522,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusGeoDRConfiguration_CreateViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusGeoDRConfiguration_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..f18abc45ede9 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusGeoDRConfiguration_CreateViaIdentityNamespace.cs @@ -0,0 +1,558 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create a new Alias(Disaster Recovery configuration) + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusGeoDRConfiguration_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a new Alias(Disaster Recovery configuration)")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusGeoDRConfiguration_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery _parameter; + + /// Single item in List or Get Alias(Disaster Recovery configuration) operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in List or Get Alias(Disaster Recovery configuration) operation", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Single item in List or Get Alias(Disaster Recovery configuration) operation", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusGeoDRConfiguration_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/disasterRecoveryConfigs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsCreateOrUpdateViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.DisasterRecoveryConfigsCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, Parameter, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusGeoDRConfiguration_CreateViaIdentityNamespaceExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusGeoDRConfiguration_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..121241997fe9 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusGeoDRConfiguration_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,572 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create a new Alias(Disaster Recovery configuration) + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusGeoDRConfiguration_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a new Alias(Disaster Recovery configuration)")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusGeoDRConfiguration_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Single item in List or Get Alias(Disaster Recovery configuration) operation + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ArmDisasterRecovery(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Primary/Secondary eventhub namespace name, which is part of GEO DR pairing + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Primary/Secondary eventhub namespace name, which is part of GEO DR pairing")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Primary/Secondary eventhub namespace name, which is part of GEO DR pairing", + SerializedName = @"alternateName", + PossibleTypes = new [] { typeof(string) })] + public string AlternateName { get => _parametersBody.AlternateName ?? null; set => _parametersBody.AlternateName = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing", + SerializedName = @"partnerNamespace", + PossibleTypes = new [] { typeof(string) })] + public string PartnerNamespace { get => _parametersBody.PartnerNamespace ?? null; set => _parametersBody.PartnerNamespace = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the + /// cmdlet class. + /// + public NewAzServiceBusGeoDRConfiguration_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/disasterRecoveryConfigs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsCreateOrUpdateViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.DisasterRecoveryConfigsCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, _parametersBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceAuthorizationRule_CreateExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceAuthorizationRule_CreateExpanded.cs index f72ef7ca83ef..2db863bfc641 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceAuthorizationRule_CreateExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceAuthorizationRule_CreateExpanded.cs @@ -6,20 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates or updates an authorization rule for a namespace. + /// Create an authorization rule for a namespace. /// /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusNamespaceAuthorizationRule_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates or updates an authorization rule for a namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create an authorization rule for a namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639410.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusNamespaceAuthorizationRule_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,14 +39,29 @@ public partial class NewAzServiceBusNamespaceAuthorizationRule_CreateExpanded : /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Description of a namespace authorization rule. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRule(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -56,6 +75,9 @@ public partial class NewAzServiceBusNamespaceAuthorizationRule_CreateExpanded : [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -110,7 +132,7 @@ public partial class NewAzServiceBusNamespaceAuthorizationRule_CreateExpanded : /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -151,9 +173,9 @@ public partial class NewAzServiceBusNamespaceAuthorizationRule_CreateExpanded : ReadOnly = false, Description = @"The rights associated with the rule.", SerializedName = @"rights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[] Rights { get => _parametersBody.Rights ?? null /* arrayOf */; set => _parametersBody.Rights = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + public string[] Rights { get => _parametersBody.Rights?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.Rights = (value != null ? new System.Collections.Generic.List(value) : null); } /// Backing field for property. private string _subscriptionId; @@ -172,7 +194,8 @@ public partial class NewAzServiceBusNamespaceAuthorizationRule_CreateExpanded : [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -181,24 +204,24 @@ public partial class NewAzServiceBusNamespaceAuthorizationRule_CreateExpanded : /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -221,6 +244,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -285,8 +313,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -296,7 +349,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusNamespaceAuthorizationRule_CreateExpanded() { @@ -350,7 +403,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -363,12 +416,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesCreateOrUpdateAuthorizationRule(ResourceGroupName, NamespaceName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdateAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -406,12 +459,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -428,15 +481,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -446,12 +499,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -463,8 +516,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentity.cs index b2a722ccf987..0dd79fe6fbba 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentity.cs @@ -6,20 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates or updates an authorization rule for a namespace. + /// Create an authorization rule for a namespace. /// /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusNamespaceAuthorizationRule_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates or updates an authorization rule for a namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create an authorization rule for a namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639410.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentity /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentity [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +107,7 @@ public partial class NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentity global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule _parameter; /// Description of a namespace authorization rule. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of a namespace authorization rule.", ValueFromPipeline = true)] @@ -94,13 +116,14 @@ public partial class NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentity ReadOnly = false, Description = @"Description of a namespace authorization rule.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,24 +146,24 @@ public partial class NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentity /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +186,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +255,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -238,7 +291,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentity() { @@ -292,7 +345,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,11 +360,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.NamespacesCreateOrUpdateAuthorizationRuleViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdateAuthorizationRuleViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -324,17 +381,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesCreateOrUpdateAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdateAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.AuthorizationRuleName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -372,12 +425,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -394,15 +447,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -412,12 +465,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -429,8 +482,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..9d9ebe141b37 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentityNamespace.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create an authorization rule for a namespace. + /// + /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusNamespaceAuthorizationRule_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create an authorization rule for a namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639410.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule _parameter; + + /// Description of a namespace authorization rule. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of a namespace authorization rule.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Description of a namespace authorization rule.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the + /// cmdlet class. + /// + public NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'NamespacesCreateOrUpdateAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/AuthorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.NamespacesCreateOrUpdateAuthorizationRuleViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.NamespacesCreateOrUpdateAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..7b5368ccbc6f --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create an authorization rule for a namespace. + /// + /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create an authorization rule for a namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639410.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Description of a namespace authorization rule. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The rights associated with the rule. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The rights associated with the rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The rights associated with the rule.", + SerializedName = @"rights", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + public string[] Rights { get => _parametersBody.Rights?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.Rights = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'NamespacesCreateOrUpdateAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/AuthorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.NamespacesCreateOrUpdateAuthorizationRuleViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.NamespacesCreateOrUpdateAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceKey_Regenerate.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceKey_Regenerate.cs index 817550798882..36b421aa9804 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceKey_Regenerate.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceKey_Regenerate.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Regenerates the primary or secondary connection strings for the namespace. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusNamespaceKey_Regenerate", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates the primary or secondary connection strings for the namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt718977.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusNamespaceKey_Regenerate : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class NewAzServiceBusNamespaceKey_Regenerate : global::System.Man /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class NewAzServiceBusNamespaceKey_Regenerate : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -105,7 +127,7 @@ public partial class NewAzServiceBusNamespaceKey_Regenerate : global::System.Man public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters _parameter; /// /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. @@ -116,13 +138,14 @@ public partial class NewAzServiceBusNamespaceKey_Regenerate : global::System.Man ReadOnly = false, Description = @"Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -171,7 +194,8 @@ public partial class NewAzServiceBusNamespaceKey_Regenerate : global::System.Man [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -180,24 +204,24 @@ public partial class NewAzServiceBusNamespaceKey_Regenerate : global::System.Man /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -220,6 +244,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -284,8 +313,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -295,7 +349,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusNamespaceKey_Regenerate() { @@ -349,7 +403,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -362,12 +416,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesRegenerateKeys(ResourceGroupName, NamespaceName, Name, SubscriptionId, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesRegenerateKeys(SubscriptionId, ResourceGroupName, NamespaceName, Name, Parameter, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId,body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -405,12 +459,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,15 +481,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -445,12 +499,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -462,8 +516,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceKey_RegenerateViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceKey_RegenerateViaIdentityNamespace.cs new file mode 100644 index 000000000000..3b5456363df5 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceKey_RegenerateViaIdentityNamespace.cs @@ -0,0 +1,521 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Regenerates the primary or secondary connection strings for the namespace. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusNamespaceKey_RegenerateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates the primary or secondary connection strings for the namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt718977.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusNamespaceKey_RegenerateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters _parameter; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusNamespaceKey_RegenerateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'NamespacesRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/AuthorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.NamespacesRegenerateKeysViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.NamespacesRegenerateKeys(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceKey_RegenerateViaIdentityNamespaceExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceKey_RegenerateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..4a215e676e1d --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceKey_RegenerateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,536 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Regenerates the primary or secondary connection strings for the namespace. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusNamespaceKey_RegenerateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates the primary or secondary connection strings for the namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt718977.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusNamespaceKey_RegenerateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + /// + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.RegenerateAccessKeyParameters(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType", + SerializedName = @"key", + PossibleTypes = new [] { typeof(string) })] + public string Key { get => _parametersBody.Key ?? null; set => _parametersBody.Key = value; } + + /// The access key to regenerate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The access key to regenerate.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The access key to regenerate.", + SerializedName = @"keyType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + public string KeyType { get => _parametersBody.KeyType ?? null; set => _parametersBody.KeyType = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzServiceBusNamespaceKey_RegenerateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'NamespacesRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/AuthorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.NamespacesRegenerateKeysViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.NamespacesRegenerateKeys(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceKey_RegenerateViaJsonFilePath.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceKey_RegenerateViaJsonFilePath.cs new file mode 100644 index 000000000000..6b7b35338eff --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceKey_RegenerateViaJsonFilePath.cs @@ -0,0 +1,542 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Regenerates the primary or secondary connection strings for the namespace. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusNamespaceKey_RegenerateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates the primary or secondary connection strings for the namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt718977.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.NotSuggestDefaultParameterSet] + public partial class NewAzServiceBusNamespaceKey_RegenerateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Regenerate operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Regenerate operation")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Regenerate operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _namespaceName; + + /// The namespace name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The namespace name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The namespace name", + SerializedName = @"namespaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusNamespaceKey_RegenerateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'NamespacesRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.NamespacesRegenerateKeysViaJsonString(SubscriptionId, ResourceGroupName, NamespaceName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceKey_RegenerateViaJsonString.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceKey_RegenerateViaJsonString.cs new file mode 100644 index 000000000000..f6e80cf9ee4e --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespaceKey_RegenerateViaJsonString.cs @@ -0,0 +1,540 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Regenerates the primary or secondary connection strings for the namespace. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusNamespaceKey_RegenerateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates the primary or secondary connection strings for the namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt718977.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.NotSuggestDefaultParameterSet] + public partial class NewAzServiceBusNamespaceKey_RegenerateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Regenerate operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Regenerate operation")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Regenerate operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _namespaceName; + + /// The namespace name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The namespace name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The namespace name", + SerializedName = @"namespaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusNamespaceKey_RegenerateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'NamespacesRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.NamespacesRegenerateKeysViaJsonString(SubscriptionId, ResourceGroupName, NamespaceName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespace_CreateExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespace_CreateExpanded.cs index fe6ae86b30f8..84968852eda5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespace_CreateExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespace_CreateExpanded.cs @@ -6,23 +6,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// - /// Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation - /// is idempotent. + /// Create a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. /// /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusNamespace_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,8 +41,20 @@ public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Ma /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Description of a namespace resource. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbNamespace(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbNamespace(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Alternate name for namespace [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Alternate name for namespace")] @@ -62,6 +77,9 @@ public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -86,6 +104,9 @@ public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Ma PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter DisableLocalAuth { get => _parametersBody.DisableLocalAuth ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.DisableLocalAuth = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -106,9 +127,9 @@ public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"Type of managed service identity.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType IdentityType { get => _parametersBody.IdentityType ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType)""); set => _parametersBody.IdentityType = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None")] + public string IdentityType { get => _parametersBody.IdentityType ?? null; set => _parametersBody.IdentityType = value; } /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -121,9 +142,9 @@ public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"Enumerates the possible value of keySource for Encryption", SerializedName = @"keySource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource KeySource { get => _parametersBody.KeySource ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource)""); set => _parametersBody.KeySource = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + public string KeySource { get => _parametersBody.KeySource ?? null; set => _parametersBody.KeySource = value; } /// Properties of KeyVault [global::System.Management.Automation.AllowEmptyCollection] @@ -134,8 +155,8 @@ public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"Properties of KeyVault", SerializedName = @"keyVaultProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] KeyVaultProperty { get => _parametersBody.KeyVaultProperty ?? null /* arrayOf */; set => _parametersBody.KeyVaultProperty = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties[] KeyVaultProperty { get => _parametersBody.KeyVaultProperty?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.KeyVaultProperty = (value != null ? new System.Collections.Generic.List(value) : null); } /// The Geo-location where the resource lives [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Geo-location where the resource lives")] @@ -164,9 +185,9 @@ public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"The minimum TLS version for the cluster to support, e.g. '1.2'", SerializedName = @"minimumTlsVersion", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion MinimumTlsVersion { get => _parametersBody.MinimumTlsVersion ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion)""); set => _parametersBody.MinimumTlsVersion = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("1.0", "1.1", "1.2")] + public string MinimumTlsVersion { get => _parametersBody.MinimumTlsVersion ?? null; set => _parametersBody.MinimumTlsVersion = value; } /// Backing field for property. private string _name; @@ -194,7 +215,7 @@ public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// /// The number of partitions of a Service Bus namespace. This property is only applicable to Premium SKU namespaces. The default @@ -219,8 +240,8 @@ public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"List of private endpoint connections.", SerializedName = @"privateEndpointConnections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get => _parametersBody.PrivateEndpointConnection ?? null /* arrayOf */; set => _parametersBody.PrivateEndpointConnection = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection) })] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection[] PrivateEndpointConnection { get => _parametersBody.PrivateEndpointConnection?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.PrivateEndpointConnection = (value != null ? new System.Collections.Generic.List(value) : null); } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -248,9 +269,9 @@ public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"This determines if traffic is allowed over public network. By default it is enabled.", SerializedName = @"publicNetworkAccess", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess PublicNetworkAccess { get => _parametersBody.PublicNetworkAccess ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess)""); set => _parametersBody.PublicNetworkAccess = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] + public string PublicNetworkAccess { get => _parametersBody.PublicNetworkAccess ?? null; set => _parametersBody.PublicNetworkAccess = value; } /// Enable Infrastructure Encryption (Double Encryption) [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enable Infrastructure Encryption (Double Encryption)")] @@ -300,9 +321,9 @@ public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"Name of this SKU.", SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName SkuName { get => _parametersBody.SkuName ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName)""); set => _parametersBody.SkuName = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + public string SkuName { get => _parametersBody.SkuName ?? null; set => _parametersBody.SkuName = value; } /// The billing tier of this particular SKU. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The billing tier of this particular SKU.")] @@ -312,9 +333,9 @@ public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"The billing tier of this particular SKU.", SerializedName = @"tier", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier SkuTier { get => _parametersBody.SkuTier ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier)""); set => _parametersBody.SkuTier = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + public string SkuTier { get => _parametersBody.SkuTier ?? null; set => _parametersBody.SkuTier = value; } /// Backing field for property. private string _subscriptionId; @@ -333,7 +354,8 @@ public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Ma [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -346,8 +368,8 @@ public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"Resource tags", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } /// Properties for User Assigned Identities [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExportAs(typeof(global::System.Collections.Hashtable))] @@ -358,8 +380,8 @@ public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"Properties for User Assigned Identities", SerializedName = @"userAssignedIdentities", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities UserAssignedIdentity { get => _parametersBody.UserAssignedIdentity ?? null /* object */; set => _parametersBody.UserAssignedIdentity = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities) })] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities UserAssignedIdentity { get => _parametersBody.UserAssignedIdentity ?? null /* object */; set => _parametersBody.UserAssignedIdentity = value; } /// /// Enabling this property creates a Premium Service Bus Namespace in regions supported availability zones. @@ -379,24 +401,24 @@ public partial class NewAzServiceBusNamespace_CreateExpanded : global::System.Ma /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -434,15 +456,20 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets.NewAzServiceBusName clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; clone._parametersBody = this._parametersBody; + clone.SubscriptionId = this.SubscriptionId; clone.ResourceGroupName = this.ResourceGroupName; clone.Name = this.Name; - clone.SubscriptionId = this.SubscriptionId; return clone; } /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -507,11 +534,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -523,10 +575,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -536,7 +604,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusNamespace_CreateExpanded() { @@ -602,7 +670,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -615,12 +683,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesCreateOrUpdate(ResourceGroupName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -658,12 +726,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -680,15 +748,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -698,12 +766,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -715,8 +783,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespace_CreateViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespace_CreateViaIdentity.cs index 569ff1fc9e69..3b6d9a2fd229 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespace_CreateViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNamespace_CreateViaIdentity.cs @@ -6,23 +6,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// - /// Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation - /// is idempotent. + /// Create a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. /// /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusNamespace_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusNamespace_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,6 +41,18 @@ public partial class NewAzServiceBusNamespace_CreateViaIdentity : global::System /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] @@ -48,6 +63,9 @@ public partial class NewAzServiceBusNamespace_CreateViaIdentity : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -61,6 +79,9 @@ public partial class NewAzServiceBusNamespace_CreateViaIdentity : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -101,7 +122,7 @@ public partial class NewAzServiceBusNamespace_CreateViaIdentity : global::System public global::System.Management.Automation.SwitchParameter NoWait { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace _parameter; /// Description of a namespace resource. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of a namespace resource.", ValueFromPipeline = true)] @@ -110,13 +131,14 @@ public partial class NewAzServiceBusNamespace_CreateViaIdentity : global::System ReadOnly = false, Description = @"Description of a namespace resource.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -139,24 +161,24 @@ public partial class NewAzServiceBusNamespace_CreateViaIdentity : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -200,6 +222,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets.NewAzServiceBusName /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -264,11 +291,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -280,10 +332,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -293,7 +361,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusNamespace_CreateViaIdentity() { @@ -359,7 +427,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -374,11 +442,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.NamespacesCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -387,17 +459,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesCreateOrUpdate(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -435,12 +503,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -457,15 +525,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -475,12 +543,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -492,8 +560,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNetworkRuleSet_CreateExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNetworkRuleSet_CreateExpanded.cs index 51fd9eeff28e..3924dbba61d9 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNetworkRuleSet_CreateExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNetworkRuleSet_CreateExpanded.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Create or update NetworkRuleSet for a Namespace. + /// Create NetworkRuleSet for a Namespace. /// /// [OpenAPI] CreateOrUpdateNetworkRuleSet=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusNetworkRuleSet_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create or update NetworkRuleSet for a Namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create NetworkRuleSet for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusNetworkRuleSet_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,14 +38,29 @@ public partial class NewAzServiceBusNetworkRuleSet_CreateExpanded : global::Syst /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Description of NetworkRuleSet resource. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.NetworkRuleSet(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.NetworkRuleSet(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -54,9 +72,9 @@ public partial class NewAzServiceBusNetworkRuleSet_CreateExpanded : global::Syst ReadOnly = false, Description = @"Default Action for Network Rule Set", SerializedName = @"defaultAction", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction DefaultAction { get => _parametersBody.DefaultAction ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction)""); set => _parametersBody.DefaultAction = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Allow", "Deny")] + public string DefaultAction { get => _parametersBody.DefaultAction ?? null; set => _parametersBody.DefaultAction = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -68,6 +86,9 @@ public partial class NewAzServiceBusNetworkRuleSet_CreateExpanded : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -89,8 +110,8 @@ public partial class NewAzServiceBusNetworkRuleSet_CreateExpanded : global::Syst ReadOnly = false, Description = @"List of IpRules", SerializedName = @"ipRules", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[] IPRule { get => _parametersBody.IPRule ?? null /* arrayOf */; set => _parametersBody.IPRule = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules) })] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules[] IPRule { get => _parametersBody.IPRule?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.IPRule = (value != null ? new System.Collections.Generic.List(value) : null); } /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -120,7 +141,7 @@ public partial class NewAzServiceBusNetworkRuleSet_CreateExpanded : global::Syst /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -148,9 +169,9 @@ public partial class NewAzServiceBusNetworkRuleSet_CreateExpanded : global::Syst ReadOnly = false, Description = @"This determines if traffic is allowed over public network. By default it is enabled.", SerializedName = @"publicNetworkAccess", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag PublicNetworkAccess { get => _parametersBody.PublicNetworkAccess ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag)""); set => _parametersBody.PublicNetworkAccess = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Enabled", "Disabled")] + public string PublicNetworkAccess { get => _parametersBody.PublicNetworkAccess ?? null; set => _parametersBody.PublicNetworkAccess = value; } /// Backing field for property. private string _resourceGroupName; @@ -183,7 +204,8 @@ public partial class NewAzServiceBusNetworkRuleSet_CreateExpanded : global::Syst [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -207,32 +229,32 @@ public partial class NewAzServiceBusNetworkRuleSet_CreateExpanded : global::Syst ReadOnly = false, Description = @"List VirtualNetwork Rules", SerializedName = @"virtualNetworkRules", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[] VirtualNetworkRule { get => _parametersBody.VirtualNetworkRule ?? null /* arrayOf */; set => _parametersBody.VirtualNetworkRule = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules) })] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules[] VirtualNetworkRule { get => _parametersBody.VirtualNetworkRule?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.VirtualNetworkRule = (value != null ? new System.Collections.Generic.List(value) : null); } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -255,6 +277,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -319,8 +346,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -330,7 +382,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusNetworkRuleSet_CreateExpanded() { @@ -384,7 +436,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -397,12 +449,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesCreateOrUpdateNetworkRuleSet(ResourceGroupName, NamespaceName, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdateNetworkRuleSet(SubscriptionId, ResourceGroupName, NamespaceName, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -440,12 +492,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -462,15 +514,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -480,12 +532,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -497,8 +549,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNetworkRuleSet_CreateViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNetworkRuleSet_CreateViaIdentity.cs index c0b4447ebc1e..1febdd5552ea 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNetworkRuleSet_CreateViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusNetworkRuleSet_CreateViaIdentity.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Create or update NetworkRuleSet for a Namespace. + /// Create NetworkRuleSet for a Namespace. /// /// [OpenAPI] CreateOrUpdateNetworkRuleSet=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusNetworkRuleSet_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create or update NetworkRuleSet for a Namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create NetworkRuleSet for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusNetworkRuleSet_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class NewAzServiceBusNetworkRuleSet_CreateViaIdentity : global::S /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class NewAzServiceBusNetworkRuleSet_CreateViaIdentity : global::S [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +106,7 @@ public partial class NewAzServiceBusNetworkRuleSet_CreateViaIdentity : global::S global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet _parameter; /// Description of NetworkRuleSet resource. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of NetworkRuleSet resource.", ValueFromPipeline = true)] @@ -94,13 +115,14 @@ public partial class NewAzServiceBusNetworkRuleSet_CreateViaIdentity : global::S ReadOnly = false, Description = @"Description of NetworkRuleSet resource.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,24 +145,24 @@ public partial class NewAzServiceBusNetworkRuleSet_CreateViaIdentity : global::S /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -238,7 +290,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusNetworkRuleSet_CreateViaIdentity() { @@ -292,7 +344,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,11 +359,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.NamespacesCreateOrUpdateNetworkRuleSetViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdateNetworkRuleSetViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -320,17 +376,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesCreateOrUpdateNetworkRuleSet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdateNetworkRuleSet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -368,12 +420,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -390,15 +442,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -408,12 +460,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -425,8 +477,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusPrivateEndpointConnection_CreateExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusPrivateEndpointConnection_CreateExpanded.cs index 110e0be455a7..b1a5835780d1 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusPrivateEndpointConnection_CreateExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusPrivateEndpointConnection_CreateExpanded.cs @@ -6,20 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates or updates PrivateEndpointConnections of service namespace. + /// Create PrivateEndpointConnections of service namespace. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusPrivateEndpointConnection_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates or updates PrivateEndpointConnections of service namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create PrivateEndpointConnections of service namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusPrivateEndpointConnection_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,14 +39,29 @@ public partial class NewAzServiceBusPrivateEndpointConnection_CreateExpanded : g /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Properties of the PrivateEndpointConnection. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.PrivateEndpointConnection(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnection(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -56,6 +75,9 @@ public partial class NewAzServiceBusPrivateEndpointConnection_CreateExpanded : g [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -111,7 +133,7 @@ public partial class NewAzServiceBusPrivateEndpointConnection_CreateExpanded : g /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The ARM identifier for Private Endpoint. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ARM identifier for Private Endpoint.")] @@ -143,9 +165,9 @@ public partial class NewAzServiceBusPrivateEndpointConnection_CreateExpanded : g ReadOnly = false, Description = @"Status of the connection.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus PrivateLinkServiceConnectionStateStatus { get => _parametersBody.ConnectionState ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus)""); set => _parametersBody.ConnectionState = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] + public string PrivateLinkServiceConnectionStateStatus { get => _parametersBody.ConnectionState ?? null; set => _parametersBody.ConnectionState = value; } /// Provisioning state of the Private Endpoint Connection. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Provisioning state of the Private Endpoint Connection.")] @@ -155,9 +177,9 @@ public partial class NewAzServiceBusPrivateEndpointConnection_CreateExpanded : g ReadOnly = false, Description = @"Provisioning state of the Private Endpoint Connection.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState ProvisioningState { get => _parametersBody.ProvisioningState ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState)""); set => _parametersBody.ProvisioningState = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed")] + public string ProvisioningState { get => _parametersBody.ProvisioningState ?? null; set => _parametersBody.ProvisioningState = value; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -206,7 +228,8 @@ public partial class NewAzServiceBusPrivateEndpointConnection_CreateExpanded : g [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -215,48 +238,48 @@ public partial class NewAzServiceBusPrivateEndpointConnection_CreateExpanded : g /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection /// from the remote call /// /// Determines if the rest of the onAccepted method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -279,6 +302,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -343,8 +371,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -354,7 +407,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusPrivateEndpointConnection_CreateExpanded() { @@ -408,7 +461,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -421,12 +474,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PrivateEndpointConnectionsCreateOrUpdate(SubscriptionId, ResourceGroupName, NamespaceName, Name, _parametersBody, onOk, onCreated, onAccepted, onDefault, this, Pipeline); + await this.Client.PrivateEndpointConnectionsCreateOrUpdate(SubscriptionId, ResourceGroupName, NamespaceName, Name, _parametersBody, onOk, onCreated, onAccepted, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -462,12 +515,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 202 (Accepted). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -479,19 +532,37 @@ protected override void StopProcessing() return ; } // onAccepted - response for 202 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -503,8 +574,26 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } @@ -512,12 +601,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -534,15 +623,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -552,12 +641,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -569,8 +658,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusPrivateEndpointConnection_CreateViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusPrivateEndpointConnection_CreateViaIdentity.cs index ef351a2a578c..075c951366b5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusPrivateEndpointConnection_CreateViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusPrivateEndpointConnection_CreateViaIdentity.cs @@ -6,20 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates or updates PrivateEndpointConnections of service namespace. + /// Create PrivateEndpointConnections of service namespace. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusPrivateEndpointConnection_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates or updates PrivateEndpointConnections of service namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create PrivateEndpointConnections of service namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusPrivateEndpointConnection_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class NewAzServiceBusPrivateEndpointConnection_CreateViaIdentity /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class NewAzServiceBusPrivateEndpointConnection_CreateViaIdentity [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +107,7 @@ public partial class NewAzServiceBusPrivateEndpointConnection_CreateViaIdentity global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection _parameter; /// Properties of the PrivateEndpointConnection. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Properties of the PrivateEndpointConnection.", ValueFromPipeline = true)] @@ -94,13 +116,14 @@ public partial class NewAzServiceBusPrivateEndpointConnection_CreateViaIdentity ReadOnly = false, Description = @"Properties of the PrivateEndpointConnection.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,48 +146,48 @@ public partial class NewAzServiceBusPrivateEndpointConnection_CreateViaIdentity /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection /// from the remote call /// /// Determines if the rest of the onAccepted method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -187,6 +210,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -251,8 +279,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -262,7 +315,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusPrivateEndpointConnection_CreateViaIdentity() { @@ -316,7 +369,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -331,7 +384,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.PrivateEndpointConnectionsCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onCreated, onAccepted, onDefault, this, Pipeline); + await this.Client.PrivateEndpointConnectionsCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onCreated, onAccepted, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } else { @@ -352,13 +405,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateEndpointConnectionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.PrivateEndpointConnectionsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.PrivateEndpointConnectionName ?? null, Parameter, onOk, onCreated, onAccepted, onDefault, this, Pipeline); + await this.Client.PrivateEndpointConnectionsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.PrivateEndpointConnectionName ?? null, Parameter, onOk, onCreated, onAccepted, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -394,12 +447,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 202 (Accepted). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -411,19 +464,37 @@ protected override void StopProcessing() return ; } // onAccepted - response for 202 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -435,8 +506,26 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } @@ -444,12 +533,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -466,15 +555,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -484,12 +573,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -501,8 +590,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusPrivateEndpointConnection_CreateViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusPrivateEndpointConnection_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..265325f78aec --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusPrivateEndpointConnection_CreateViaIdentityNamespace.cs @@ -0,0 +1,629 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create PrivateEndpointConnections of service namespace. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusPrivateEndpointConnection_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create PrivateEndpointConnections of service namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusPrivateEndpointConnection_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The PrivateEndpointConnection name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The PrivateEndpointConnection name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The PrivateEndpointConnection name", + SerializedName = @"privateEndpointConnectionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("PrivateEndpointConnectionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection _parameter; + + /// Properties of the PrivateEndpointConnection. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Properties of the PrivateEndpointConnection.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Properties of the PrivateEndpointConnection.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnAccepted will be called before the regular onAccepted has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + /// from the remote call + /// /// Determines if the rest of the onAccepted method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzServiceBusPrivateEndpointConnection_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'PrivateEndpointConnectionsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/privateEndpointConnections/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.PrivateEndpointConnectionsCreateOrUpdateViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onCreated, onAccepted, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.PrivateEndpointConnectionsCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, Parameter, onOk, onCreated, onAccepted, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 202 (Accepted). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnAccepted(responseMessage, response, ref _returnNow); + // if overrideOnAccepted has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onAccepted - response for 202 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..1531df379a6b --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,664 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create PrivateEndpointConnections of service namespace. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create PrivateEndpointConnections of service namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Properties of the PrivateEndpointConnection. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.PrivateEndpointConnection(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The PrivateEndpointConnection name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The PrivateEndpointConnection name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The PrivateEndpointConnection name", + SerializedName = @"privateEndpointConnectionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("PrivateEndpointConnectionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The ARM identifier for Private Endpoint. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ARM identifier for Private Endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ARM identifier for Private Endpoint.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string PrivateEndpointId { get => _parametersBody.PrivateEndpointId ?? null; set => _parametersBody.PrivateEndpointId = value; } + + /// Description of the connection state. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Description of the connection state.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the connection state.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkServiceConnectionStateDescription { get => _parametersBody.Description ?? null; set => _parametersBody.Description = value; } + + /// Status of the connection. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Status of the connection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of the connection.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] + public string PrivateLinkServiceConnectionStateStatus { get => _parametersBody.ConnectionState ?? null; set => _parametersBody.ConnectionState = value; } + + /// Provisioning state of the Private Endpoint Connection. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Provisioning state of the Private Endpoint Connection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Provisioning state of the Private Endpoint Connection.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed")] + public string ProvisioningState { get => _parametersBody.ProvisioningState ?? null; set => _parametersBody.ProvisioningState = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnAccepted will be called before the regular onAccepted has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + /// from the remote call + /// /// Determines if the rest of the onAccepted method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'PrivateEndpointConnectionsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/privateEndpointConnections/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.PrivateEndpointConnectionsCreateOrUpdateViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onCreated, onAccepted, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.PrivateEndpointConnectionsCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, _parametersBody, onOk, onCreated, onAccepted, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 202 (Accepted). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnAccepted(responseMessage, response, ref _returnNow); + // if overrideOnAccepted has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onAccepted - response for 202 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateExpanded.cs index 7b12fb13b766..bed6b8b29acc 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateExpanded.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates an authorization rule for a queue. + /// Create an authorization rule for a queue. /// /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueueAuthorizationRule_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates an authorization rule for a queue.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create an authorization rule for a queue.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusQueueAuthorizationRule_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,14 +38,29 @@ public partial class NewAzServiceBusQueueAuthorizationRule_CreateExpanded : glob /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Description of a namespace authorization rule. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRule(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class NewAzServiceBusQueueAuthorizationRule_CreateExpanded : glob [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -110,7 +131,7 @@ public partial class NewAzServiceBusQueueAuthorizationRule_CreateExpanded : glob /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -165,9 +186,9 @@ public partial class NewAzServiceBusQueueAuthorizationRule_CreateExpanded : glob ReadOnly = false, Description = @"The rights associated with the rule.", SerializedName = @"rights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[] Rights { get => _parametersBody.Rights ?? null /* arrayOf */; set => _parametersBody.Rights = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + public string[] Rights { get => _parametersBody.Rights?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.Rights = (value != null ? new System.Collections.Generic.List(value) : null); } /// Backing field for property. private string _subscriptionId; @@ -186,7 +207,8 @@ public partial class NewAzServiceBusQueueAuthorizationRule_CreateExpanded : glob [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -195,24 +217,24 @@ public partial class NewAzServiceBusQueueAuthorizationRule_CreateExpanded : glob /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -235,6 +257,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -299,8 +326,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -310,7 +362,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusQueueAuthorizationRule_CreateExpanded() { @@ -364,7 +416,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -377,12 +429,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.QueuesCreateOrUpdateAuthorizationRule(ResourceGroupName, NamespaceName, QueueName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.QueuesCreateOrUpdateAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, QueueName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,QueueName=QueueName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,QueueName=QueueName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -420,12 +472,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -442,15 +494,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, QueueName=QueueName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, QueueName=QueueName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -460,12 +512,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -477,8 +529,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateViaIdentity.cs index e857008f8cdb..c4587e0e5320 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateViaIdentity.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates an authorization rule for a queue. + /// Create an authorization rule for a queue. /// /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueueAuthorizationRule_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates an authorization rule for a queue.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create an authorization rule for a queue.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusQueueAuthorizationRule_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class NewAzServiceBusQueueAuthorizationRule_CreateViaIdentity : g /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class NewAzServiceBusQueueAuthorizationRule_CreateViaIdentity : g [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +106,7 @@ public partial class NewAzServiceBusQueueAuthorizationRule_CreateViaIdentity : g global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule _parameter; /// Description of a namespace authorization rule. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of a namespace authorization rule.", ValueFromPipeline = true)] @@ -94,13 +115,14 @@ public partial class NewAzServiceBusQueueAuthorizationRule_CreateViaIdentity : g ReadOnly = false, Description = @"Description of a namespace authorization rule.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,24 +145,24 @@ public partial class NewAzServiceBusQueueAuthorizationRule_CreateViaIdentity : g /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -238,7 +290,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusQueueAuthorizationRule_CreateViaIdentity() { @@ -292,7 +344,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,11 +359,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.QueuesCreateOrUpdateAuthorizationRuleViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.QueuesCreateOrUpdateAuthorizationRuleViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -328,17 +384,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.QueuesCreateOrUpdateAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.QueueName ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.QueuesCreateOrUpdateAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.QueueName ?? null, InputObject.AuthorizationRuleName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -376,12 +428,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -398,15 +450,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -416,12 +468,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -433,8 +485,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..e2b29873d3cb --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityNamespace.cs @@ -0,0 +1,533 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create an authorization rule for a queue. + /// + /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueueAuthorizationRule_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create an authorization rule for a queue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule _parameter; + + /// Description of a namespace authorization rule. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of a namespace authorization rule.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Description of a namespace authorization rule.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _queueName; + + /// The queue name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The queue name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The queue name.", + SerializedName = @"queueName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string QueueName { get => this._queueName; set => this._queueName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'QueuesCreateOrUpdateAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/queues/{(global::System.Uri.EscapeDataString(this.QueueName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.QueuesCreateOrUpdateAuthorizationRuleViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.QueuesCreateOrUpdateAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, QueueName, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { QueueName=QueueName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..b45a5242ed69 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,535 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create an authorization rule for a queue. + /// + /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueueAuthorizationRule_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create an authorization rule for a queue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Description of a namespace authorization rule. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _queueName; + + /// The queue name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The queue name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The queue name.", + SerializedName = @"queueName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string QueueName { get => this._queueName; set => this._queueName = value; } + + /// The rights associated with the rule. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The rights associated with the rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The rights associated with the rule.", + SerializedName = @"rights", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + public string[] Rights { get => _parametersBody.Rights?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.Rights = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'QueuesCreateOrUpdateAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/queues/{(global::System.Uri.EscapeDataString(this.QueueName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.QueuesCreateOrUpdateAuthorizationRuleViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.QueuesCreateOrUpdateAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, QueueName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { QueueName=QueueName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityQueue.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityQueue.cs new file mode 100644 index 000000000000..fc5b21c95f77 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityQueue.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create an authorization rule for a queue. + /// + /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueueAuthorizationRule_CreateViaIdentityQueue", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create an authorization rule for a queue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityQueue : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule _parameter; + + /// Description of a namespace authorization rule. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of a namespace authorization rule.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Description of a namespace authorization rule.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _queueInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity QueueInputObject { get => this._queueInputObject; set => this._queueInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityQueue() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'QueuesCreateOrUpdateAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (QueueInputObject?.Id != null) + { + this.QueueInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.QueuesCreateOrUpdateAuthorizationRuleViaIdentity(QueueInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == QueueInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.QueueName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.QueueName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + await this.Client.QueuesCreateOrUpdateAuthorizationRule(QueueInputObject.SubscriptionId ?? null, QueueInputObject.ResourceGroupName ?? null, QueueInputObject.NamespaceName ?? null, QueueInputObject.QueueName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityQueueExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityQueueExpanded.cs new file mode 100644 index 000000000000..0bf866ec74b5 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityQueueExpanded.cs @@ -0,0 +1,525 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create an authorization rule for a queue. + /// + /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueueAuthorizationRule_CreateViaIdentityQueueExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create an authorization rule for a queue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityQueueExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Description of a namespace authorization rule. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _queueInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity QueueInputObject { get => this._queueInputObject; set => this._queueInputObject = value; } + + /// The rights associated with the rule. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The rights associated with the rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The rights associated with the rule.", + SerializedName = @"rights", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + public string[] Rights { get => _parametersBody.Rights?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.Rights = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the + /// cmdlet class. + /// + public NewAzServiceBusQueueAuthorizationRule_CreateViaIdentityQueueExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'QueuesCreateOrUpdateAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (QueueInputObject?.Id != null) + { + this.QueueInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.QueuesCreateOrUpdateAuthorizationRuleViaIdentity(QueueInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == QueueInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.QueueName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.QueueName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + await this.Client.QueuesCreateOrUpdateAuthorizationRule(QueueInputObject.SubscriptionId ?? null, QueueInputObject.ResourceGroupName ?? null, QueueInputObject.NamespaceName ?? null, QueueInputObject.QueueName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_Regenerate.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_Regenerate.cs index a4a990af176c..f63e1f0c8e7c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_Regenerate.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_Regenerate.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Regenerates the primary or secondary connection strings to the queue. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueueKey_Regenerate", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates the primary or secondary connection strings to the queue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705606.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusQueueKey_Regenerate : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class NewAzServiceBusQueueKey_Regenerate : global::System.Managem /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class NewAzServiceBusQueueKey_Regenerate : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -105,7 +127,7 @@ public partial class NewAzServiceBusQueueKey_Regenerate : global::System.Managem public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters _parameter; /// /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. @@ -116,13 +138,14 @@ public partial class NewAzServiceBusQueueKey_Regenerate : global::System.Managem ReadOnly = false, Description = @"Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -185,7 +208,8 @@ public partial class NewAzServiceBusQueueKey_Regenerate : global::System.Managem [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -194,24 +218,24 @@ public partial class NewAzServiceBusQueueKey_Regenerate : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -234,6 +258,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -298,8 +327,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -309,7 +363,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusQueueKey_Regenerate() { @@ -363,7 +417,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -376,12 +430,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.QueuesRegenerateKeys(ResourceGroupName, NamespaceName, QueueName, Name, SubscriptionId, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.QueuesRegenerateKeys(SubscriptionId, ResourceGroupName, NamespaceName, QueueName, Name, Parameter, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,QueueName=QueueName,Name=Name,SubscriptionId=SubscriptionId,body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,QueueName=QueueName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -419,12 +473,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -441,15 +495,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, QueueName=QueueName, Name=Name, SubscriptionId=SubscriptionId, body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, QueueName=QueueName, Name=Name, SubscriptionId=SubscriptionId, body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -459,12 +513,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -476,8 +530,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaIdentityNamespace.cs new file mode 100644 index 000000000000..c94f8560b4c7 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaIdentityNamespace.cs @@ -0,0 +1,535 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Regenerates the primary or secondary connection strings to the queue. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueueKey_RegenerateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates the primary or secondary connection strings to the queue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705606.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusQueueKey_RegenerateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters _parameter; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _queueName; + + /// The queue name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The queue name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The queue name.", + SerializedName = @"queueName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string QueueName { get => this._queueName; set => this._queueName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusQueueKey_RegenerateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'QueuesRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/queues/{(global::System.Uri.EscapeDataString(this.QueueName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.QueuesRegenerateKeysViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.QueuesRegenerateKeys(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, QueueName, Name, Parameter, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { QueueName=QueueName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaIdentityNamespaceExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..595d496adbdc --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,550 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Regenerates the primary or secondary connection strings to the queue. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueueKey_RegenerateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates the primary or secondary connection strings to the queue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705606.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusQueueKey_RegenerateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + /// + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.RegenerateAccessKeyParameters(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType", + SerializedName = @"key", + PossibleTypes = new [] { typeof(string) })] + public string Key { get => _parametersBody.Key ?? null; set => _parametersBody.Key = value; } + + /// The access key to regenerate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The access key to regenerate.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The access key to regenerate.", + SerializedName = @"keyType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + public string KeyType { get => _parametersBody.KeyType ?? null; set => _parametersBody.KeyType = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _queueName; + + /// The queue name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The queue name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The queue name.", + SerializedName = @"queueName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string QueueName { get => this._queueName; set => this._queueName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzServiceBusQueueKey_RegenerateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'QueuesRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/queues/{(global::System.Uri.EscapeDataString(this.QueueName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.QueuesRegenerateKeysViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.QueuesRegenerateKeys(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, QueueName, Name, _parametersBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { QueueName=QueueName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaIdentityQueue.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaIdentityQueue.cs new file mode 100644 index 000000000000..96fbc6e9db85 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaIdentityQueue.cs @@ -0,0 +1,525 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Regenerates the primary or secondary connection strings to the queue. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueueKey_RegenerateViaIdentityQueue", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates the primary or secondary connection strings to the queue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705606.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusQueueKey_RegenerateViaIdentityQueue : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters _parameter; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _queueInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity QueueInputObject { get => this._queueInputObject; set => this._queueInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusQueueKey_RegenerateViaIdentityQueue() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'QueuesRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (QueueInputObject?.Id != null) + { + this.QueueInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.QueuesRegenerateKeysViaIdentity(QueueInputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == QueueInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.QueueName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.QueueName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + await this.Client.QueuesRegenerateKeys(QueueInputObject.SubscriptionId ?? null, QueueInputObject.ResourceGroupName ?? null, QueueInputObject.NamespaceName ?? null, QueueInputObject.QueueName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaIdentityQueueExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaIdentityQueueExpanded.cs new file mode 100644 index 000000000000..d5aef80a3c0b --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaIdentityQueueExpanded.cs @@ -0,0 +1,539 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Regenerates the primary or secondary connection strings to the queue. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueueKey_RegenerateViaIdentityQueueExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates the primary or secondary connection strings to the queue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705606.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusQueueKey_RegenerateViaIdentityQueueExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + /// + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.RegenerateAccessKeyParameters(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType", + SerializedName = @"key", + PossibleTypes = new [] { typeof(string) })] + public string Key { get => _parametersBody.Key ?? null; set => _parametersBody.Key = value; } + + /// The access key to regenerate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The access key to regenerate.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The access key to regenerate.", + SerializedName = @"keyType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + public string KeyType { get => _parametersBody.KeyType ?? null; set => _parametersBody.KeyType = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _queueInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity QueueInputObject { get => this._queueInputObject; set => this._queueInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusQueueKey_RegenerateViaIdentityQueueExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'QueuesRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (QueueInputObject?.Id != null) + { + this.QueueInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.QueuesRegenerateKeysViaIdentity(QueueInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == QueueInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.QueueName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.QueueName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + await this.Client.QueuesRegenerateKeys(QueueInputObject.SubscriptionId ?? null, QueueInputObject.ResourceGroupName ?? null, QueueInputObject.NamespaceName ?? null, QueueInputObject.QueueName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaJsonFilePath.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaJsonFilePath.cs new file mode 100644 index 000000000000..9884f534978c --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaJsonFilePath.cs @@ -0,0 +1,556 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Regenerates the primary or secondary connection strings to the queue. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueueKey_RegenerateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates the primary or secondary connection strings to the queue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705606.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.NotSuggestDefaultParameterSet] + public partial class NewAzServiceBusQueueKey_RegenerateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Regenerate operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Regenerate operation")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Regenerate operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _namespaceName; + + /// The namespace name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The namespace name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The namespace name", + SerializedName = @"namespaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _queueName; + + /// The queue name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The queue name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The queue name.", + SerializedName = @"queueName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string QueueName { get => this._queueName; set => this._queueName = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusQueueKey_RegenerateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'QueuesRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.QueuesRegenerateKeysViaJsonString(SubscriptionId, ResourceGroupName, NamespaceName, QueueName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,QueueName=QueueName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaJsonString.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaJsonString.cs new file mode 100644 index 000000000000..c834925322ec --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueueKey_RegenerateViaJsonString.cs @@ -0,0 +1,554 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Regenerates the primary or secondary connection strings to the queue. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueueKey_RegenerateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates the primary or secondary connection strings to the queue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705606.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.NotSuggestDefaultParameterSet] + public partial class NewAzServiceBusQueueKey_RegenerateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Regenerate operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Regenerate operation")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Regenerate operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _namespaceName; + + /// The namespace name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The namespace name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The namespace name", + SerializedName = @"namespaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _queueName; + + /// The queue name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The queue name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The queue name.", + SerializedName = @"queueName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string QueueName { get => this._queueName; set => this._queueName = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusQueueKey_RegenerateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'QueuesRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.QueuesRegenerateKeysViaJsonString(SubscriptionId, ResourceGroupName, NamespaceName, QueueName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,QueueName=QueueName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueue_CreateExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueue_CreateExpanded.cs index a0fe5dadae65..934a3fd114a9 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueue_CreateExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueue_CreateExpanded.cs @@ -6,19 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates or updates a Service Bus queue. This operation is idempotent. + /// Create a Service Bus queue. This operation is idempotent. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueue_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates or updates a Service Bus queue. This operation is idempotent.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a Service Bus queue. This operation is idempotent.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639395.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusQueue_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,8 +38,20 @@ public partial class NewAzServiceBusQueue_CreateExpanded : global::System.Manage /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Description of queue Resource. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbQueue(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbQueue(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// /// Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes. @@ -55,6 +71,9 @@ public partial class NewAzServiceBusQueue_CreateExpanded : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -146,6 +165,9 @@ public partial class NewAzServiceBusQueue_CreateExpanded : global::System.Manage PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter EnablePartitioning { get => _parametersBody.EnablePartitioning ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.EnablePartitioning = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Queue/Topic name to forward the Dead Letter message [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Queue/Topic name to forward the Dead Letter message")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] @@ -278,7 +300,7 @@ public partial class NewAzServiceBusQueue_CreateExpanded : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -340,10 +362,9 @@ public partial class NewAzServiceBusQueue_CreateExpanded : global::System.Manage ReadOnly = false, Description = @"Enumerates the possible values for the status of a messaging entity.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus) })] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChange("Status", "12.0.0", "4.0.0", "2024/05/21", OldParamaterType="EntityStatus", NewParameterType="String")] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus Status { get => _parametersBody.Status ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus)""); set => _parametersBody.Status = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + public string Status { get => _parametersBody.Status ?? null; set => _parametersBody.Status = value; } /// Backing field for property. private string _subscriptionId; @@ -362,7 +383,8 @@ public partial class NewAzServiceBusQueue_CreateExpanded : global::System.Manage [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -371,24 +393,24 @@ public partial class NewAzServiceBusQueue_CreateExpanded : global::System.Manage /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -411,6 +433,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -475,8 +502,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -486,7 +538,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusQueue_CreateExpanded() { @@ -540,7 +592,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -553,12 +605,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.QueuesCreateOrUpdate(ResourceGroupName, NamespaceName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.QueuesCreateOrUpdate(SubscriptionId, ResourceGroupName, NamespaceName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -596,12 +648,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -618,15 +670,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -636,12 +688,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -653,8 +705,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueue_CreateViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueue_CreateViaIdentity.cs index 269ab77615f1..f800097de722 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueue_CreateViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueue_CreateViaIdentity.cs @@ -6,20 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates or updates a Service Bus queue. This operation is idempotent. + /// Create a Service Bus queue. This operation is idempotent. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueue_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates or updates a Service Bus queue. This operation is idempotent.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a Service Bus queue. This operation is idempotent.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639395.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusQueue_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class NewAzServiceBusQueue_CreateViaIdentity : global::System.Man /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class NewAzServiceBusQueue_CreateViaIdentity : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +107,7 @@ public partial class NewAzServiceBusQueue_CreateViaIdentity : global::System.Man global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue _parameter; /// Description of queue Resource. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of queue Resource.", ValueFromPipeline = true)] @@ -94,13 +116,14 @@ public partial class NewAzServiceBusQueue_CreateViaIdentity : global::System.Man ReadOnly = false, Description = @"Description of queue Resource.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,24 +146,24 @@ public partial class NewAzServiceBusQueue_CreateViaIdentity : global::System.Man /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +186,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +255,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -238,7 +291,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusQueue_CreateViaIdentity() { @@ -292,7 +345,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,11 +360,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.QueuesCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.QueuesCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -324,17 +381,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.QueueName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.QueuesCreateOrUpdate(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.QueueName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.QueuesCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.QueueName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -372,12 +425,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -394,15 +447,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -412,12 +465,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -429,8 +482,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueue_CreateViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueue_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..8890d507b00c --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueue_CreateViaIdentityNamespace.cs @@ -0,0 +1,519 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create a Service Bus queue. This operation is idempotent. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueue_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a Service Bus queue. This operation is idempotent.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639395.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusQueue_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The queue name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The queue name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The queue name.", + SerializedName = @"queueName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("QueueName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue _parameter; + + /// Description of queue Resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of queue Resource.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Description of queue Resource.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusQueue_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'QueuesCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/queues/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.QueuesCreateOrUpdateViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.QueuesCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueue_CreateViaIdentityNamespaceExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueue_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..2b12ef53ba99 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusQueue_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,710 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create a Service Bus queue. This operation is idempotent. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusQueue_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a Service Bus queue. This operation is idempotent.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639395.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusQueue_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Description of queue Resource. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbQueue(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// + /// Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.", + SerializedName = @"autoDeleteOnIdle", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + public global::System.TimeSpan AutoDeleteOnIdle { get => _parametersBody.AutoDeleteOnIdle ?? default(global::System.TimeSpan); set => _parametersBody.AutoDeleteOnIdle = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// A value that indicates whether this queue has dead letter support when a message expires. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A value that indicates whether this queue has dead letter support when a message expires.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A value that indicates whether this queue has dead letter support when a message expires.", + SerializedName = @"deadLetteringOnMessageExpiration", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DeadLetteringOnMessageExpiration { get => _parametersBody.DeadLetteringOnMessageExpiration ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.DeadLetteringOnMessageExpiration = value; } + + /// + /// This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the + /// default value used when TimeToLive is not set on a message itself. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.", + SerializedName = @"defaultMessageTimeToLive", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + public global::System.TimeSpan DefaultMessageTimeToLive { get => _parametersBody.DefaultMessageTimeToLive ?? default(global::System.TimeSpan); set => _parametersBody.DefaultMessageTimeToLive = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Defines the duration of the duplicate detection history. The default value is 10 minutes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines the duration of the duplicate detection history. The default value is 10 minutes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the duration of the duplicate detection history. The default value is 10 minutes.", + SerializedName = @"duplicateDetectionHistoryTimeWindow", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + public global::System.TimeSpan DuplicateDetectionHistoryTimeWindow { get => _parametersBody.DuplicateDetectionHistoryTimeWindow ?? default(global::System.TimeSpan); set => _parametersBody.DuplicateDetectionHistoryTimeWindow = value; } + + /// Value that indicates whether server-side batched operations are enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether server-side batched operations are enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether server-side batched operations are enabled.", + SerializedName = @"enableBatchedOperations", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter EnableBatchedOperations { get => _parametersBody.EnableBatchedOperations ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.EnableBatchedOperations = value; } + + /// + /// A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before + /// writing it to persistent storage. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage.", + SerializedName = @"enableExpress", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter EnableExpress { get => _parametersBody.EnableExpress ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.EnableExpress = value; } + + /// + /// A value that indicates whether the queue is to be partitioned across multiple message brokers. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A value that indicates whether the queue is to be partitioned across multiple message brokers.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A value that indicates whether the queue is to be partitioned across multiple message brokers.", + SerializedName = @"enablePartitioning", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter EnablePartitioning { get => _parametersBody.EnablePartitioning ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.EnablePartitioning = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Queue/Topic name to forward the Dead Letter message + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Queue/Topic name to forward the Dead Letter message")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Queue/Topic name to forward the Dead Letter message", + SerializedName = @"forwardDeadLetteredMessagesTo", + PossibleTypes = new [] { typeof(string) })] + public string ForwardDeadLetteredMessagesTo { get => _parametersBody.ForwardDeadLetteredMessagesTo ?? null; set => _parametersBody.ForwardDeadLetteredMessagesTo = value; } + + /// Queue/Topic name to forward the messages + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Queue/Topic name to forward the messages")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Queue/Topic name to forward the messages", + SerializedName = @"forwardTo", + PossibleTypes = new [] { typeof(string) })] + public string ForwardTo { get => _parametersBody.ForwardTo ?? null; set => _parametersBody.ForwardTo = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum + /// value for LockDuration is 5 minutes; the default value is 1 minute. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.", + SerializedName = @"lockDuration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + public global::System.TimeSpan LockDuration { get => _parametersBody.LockDuration ?? default(global::System.TimeSpan); set => _parametersBody.LockDuration = value; } + + /// + /// The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is + /// 10. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is 10.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is 10.", + SerializedName = @"maxDeliveryCount", + PossibleTypes = new [] { typeof(int) })] + public int MaxDeliveryCount { get => _parametersBody.MaxDeliveryCount ?? default(int); set => _parametersBody.MaxDeliveryCount = value; } + + /// + /// Maximum size (in KB) of the message payload that can be accepted by the queue. This property is only used in Premium today + /// and default is 1024. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Maximum size (in KB) of the message payload that can be accepted by the queue. This property is only used in Premium today and default is 1024.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Maximum size (in KB) of the message payload that can be accepted by the queue. This property is only used in Premium today and default is 1024.", + SerializedName = @"maxMessageSizeInKilobytes", + PossibleTypes = new [] { typeof(long) })] + public long MaxMessageSizeInKilobytes { get => _parametersBody.MaxMessageSizeInKilobytes ?? default(long); set => _parametersBody.MaxMessageSizeInKilobytes = value; } + + /// + /// The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024.", + SerializedName = @"maxSizeInMegabytes", + PossibleTypes = new [] { typeof(int) })] + public int MaxSizeInMegabytes { get => _parametersBody.MaxSizeInMegabytes ?? default(int); set => _parametersBody.MaxSizeInMegabytes = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The queue name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The queue name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The queue name.", + SerializedName = @"queueName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("QueueName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// A value indicating if this queue requires duplicate detection. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A value indicating if this queue requires duplicate detection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A value indicating if this queue requires duplicate detection.", + SerializedName = @"requiresDuplicateDetection", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter RequiresDuplicateDetection { get => _parametersBody.RequiresDuplicateDetection ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.RequiresDuplicateDetection = value; } + + /// A value that indicates whether the queue supports the concept of sessions. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A value that indicates whether the queue supports the concept of sessions.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A value that indicates whether the queue supports the concept of sessions.", + SerializedName = @"requiresSession", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter RequiresSession { get => _parametersBody.RequiresSession ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.RequiresSession = value; } + + /// Enumerates the possible values for the status of a messaging entity. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enumerates the possible values for the status of a messaging entity.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enumerates the possible values for the status of a messaging entity.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + public string Status { get => _parametersBody.Status ?? null; set => _parametersBody.Status = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusQueue_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'QueuesCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/queues/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.QueuesCreateOrUpdateViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.QueuesCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateExpanded.cs index 61445a4e4018..9fc7f88aa99c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateExpanded.cs @@ -6,19 +6,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates a new rule and updates an existing rule + /// Create a new rule and updates an existing rule /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusRule_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates a new rule and updates an existing rule")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a new rule and updates an existing rule")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusRule_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,8 +37,20 @@ public partial class NewAzServiceBusRule_CreateExpanded : global::System.Managem /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Description of Rule Resource. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.Rule(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Rule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. @@ -78,6 +93,9 @@ public partial class NewAzServiceBusRule_CreateExpanded : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -101,8 +119,8 @@ public partial class NewAzServiceBusRule_CreateExpanded : global::System.Managem ReadOnly = false, Description = @"dictionary object for custom filters", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICorrelationFilterProperties CorrelationFilterProperty { get => _parametersBody.CorrelationFilterProperty ?? null /* object */; set => _parametersBody.CorrelationFilterProperty = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties CorrelationFilterProperty { get => _parametersBody.CorrelationFilterProperty ?? null /* object */; set => _parametersBody.CorrelationFilterProperty = value; } /// Value that indicates whether the rule action requires preprocessing. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether the rule action requires preprocessing.")] @@ -136,6 +154,9 @@ public partial class NewAzServiceBusRule_CreateExpanded : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Filter type that is evaluated against a BrokeredMessage. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Filter type that is evaluated against a BrokeredMessage.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] @@ -144,9 +165,9 @@ public partial class NewAzServiceBusRule_CreateExpanded : global::System.Managem ReadOnly = false, Description = @"Filter type that is evaluated against a BrokeredMessage.", SerializedName = @"filterType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType FilterType { get => _parametersBody.FilterType ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType)""); set => _parametersBody.FilterType = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SqlFilter", "CorrelationFilter")] + public string FilterType { get => _parametersBody.FilterType ?? null; set => _parametersBody.FilterType = value; } /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] @@ -225,7 +246,7 @@ public partial class NewAzServiceBusRule_CreateExpanded : global::System.Managem /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -343,7 +364,8 @@ public partial class NewAzServiceBusRule_CreateExpanded : global::System.Managem [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -391,24 +413,24 @@ public partial class NewAzServiceBusRule_CreateExpanded : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -431,6 +453,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -495,8 +522,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -506,7 +558,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusRule_CreateExpanded() { @@ -560,7 +612,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -570,15 +622,23 @@ protected override void ProcessRecord() Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); } // get the client instance + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("ActionCompatibilityLevel")) + { + ActionCompatibilityLevel = (int)this.MyInvocation.BoundParameters["ActionCompatibilityLevel"]; + } + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("SqlFilterCompatibilityLevel")) + { + SqlFilterCompatibilityLevel = (int)this.MyInvocation.BoundParameters["SqlFilterCompatibilityLevel"]; + } try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.RulesCreateOrUpdate(ResourceGroupName, NamespaceName, TopicName, SubscriptionName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.RulesCreateOrUpdate(SubscriptionId, ResourceGroupName, NamespaceName, TopicName, SubscriptionName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,SubscriptionName=SubscriptionName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,SubscriptionName=SubscriptionName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -616,12 +676,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -638,15 +698,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, SubscriptionName=SubscriptionName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, SubscriptionName=SubscriptionName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -656,12 +716,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -673,8 +733,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentity.cs index e991c6cd7ef5..5c3d476166f2 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentity.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates a new rule and updates an existing rule + /// Create a new rule and updates an existing rule /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusRule_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates a new rule and updates an existing rule")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a new rule and updates an existing rule")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusRule_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class NewAzServiceBusRule_CreateViaIdentity : global::System.Mana /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class NewAzServiceBusRule_CreateViaIdentity : global::System.Mana [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +106,7 @@ public partial class NewAzServiceBusRule_CreateViaIdentity : global::System.Mana global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule _parameter; /// Description of Rule Resource. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of Rule Resource.", ValueFromPipeline = true)] @@ -94,13 +115,14 @@ public partial class NewAzServiceBusRule_CreateViaIdentity : global::System.Mana ReadOnly = false, Description = @"Description of Rule Resource.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,24 +145,24 @@ public partial class NewAzServiceBusRule_CreateViaIdentity : global::System.Mana /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -238,7 +290,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusRule_CreateViaIdentity() { @@ -292,7 +344,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,11 +359,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.RulesCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.RulesCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -332,17 +388,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.RuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.RulesCreateOrUpdate(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.SubscriptionName ?? null, InputObject.RuleName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.RulesCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.SubscriptionName ?? null, InputObject.RuleName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -380,12 +432,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -402,15 +454,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -420,12 +472,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -437,8 +489,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..f0750d4322bc --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentityNamespace.cs @@ -0,0 +1,546 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create a new rule and updates an existing rule + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusRule_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a new rule and updates an existing rule")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusRule_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The rule name.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule _parameter; + + /// Description of Rule Resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of Rule Resource.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Description of Rule Resource.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionName; + + /// The subscription name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The subscription name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The subscription name.", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionName { get => this._subscriptionName; set => this._subscriptionName = value; } + + /// Backing field for property. + private string _topicName; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusRule_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RulesCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.TopicName.ToString()))}/subscriptions/{(global::System.Uri.EscapeDataString(this.SubscriptionName.ToString()))}/rules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.RulesCreateOrUpdateViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.RulesCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, TopicName, SubscriptionName, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { TopicName=TopicName,SubscriptionName=SubscriptionName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentityNamespaceExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..193782ac0753 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,738 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create a new rule and updates an existing rule + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusRule_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a new rule and updates an existing rule")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusRule_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Description of Rule Resource. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Rule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// + /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.", + SerializedName = @"compatibilityLevel", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotExport] + public int ActionCompatibilityLevel { get => _parametersBody.ActionCompatibilityLevel ?? default(int); set => _parametersBody.ActionCompatibilityLevel = value; } + + /// Value that indicates whether the rule action requires preprocessing. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether the rule action requires preprocessing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether the rule action requires preprocessing.", + SerializedName = @"requiresPreprocessing", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter ActionRequiresPreprocessing { get => _parametersBody.ActionRequiresPreprocessing ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.ActionRequiresPreprocessing = value; } + + /// SQL expression. e.g. MyProperty='ABC' + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "SQL expression. e.g. MyProperty='ABC'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SQL expression. e.g. MyProperty='ABC'", + SerializedName = @"sqlExpression", + PossibleTypes = new [] { typeof(string) })] + public string ActionSqlExpression { get => _parametersBody.ActionSqlExpression ?? null; set => _parametersBody.ActionSqlExpression = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// Content type of the message. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Content type of the message.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Content type of the message.", + SerializedName = @"contentType", + PossibleTypes = new [] { typeof(string) })] + public string ContentType { get => _parametersBody.ContentType ?? null; set => _parametersBody.ContentType = value; } + + /// dictionary object for custom filters + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "dictionary object for custom filters")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"dictionary object for custom filters", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties CorrelationFilterProperty { get => _parametersBody.CorrelationFilterProperty ?? null /* object */; set => _parametersBody.CorrelationFilterProperty = value; } + + /// Value that indicates whether the rule action requires preprocessing. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether the rule action requires preprocessing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether the rule action requires preprocessing.", + SerializedName = @"requiresPreprocessing", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter CorrelationFilterRequiresPreprocessing { get => _parametersBody.CorrelationFilterRequiresPreprocessing ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.CorrelationFilterRequiresPreprocessing = value; } + + /// Identifier of the correlation. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Identifier of the correlation.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Identifier of the correlation.", + SerializedName = @"correlationId", + PossibleTypes = new [] { typeof(string) })] + public string CorrelationId { get => _parametersBody.CorrelationId ?? null; set => _parametersBody.CorrelationId = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Filter type that is evaluated against a BrokeredMessage. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Filter type that is evaluated against a BrokeredMessage.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Filter type that is evaluated against a BrokeredMessage.", + SerializedName = @"filterType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SqlFilter", "CorrelationFilter")] + public string FilterType { get => _parametersBody.FilterType ?? null; set => _parametersBody.FilterType = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Application specific label. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Application specific label.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Application specific label.", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + public string Label { get => _parametersBody.Label ?? null; set => _parametersBody.Label = value; } + + /// Identifier of the message. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Identifier of the message.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Identifier of the message.", + SerializedName = @"messageId", + PossibleTypes = new [] { typeof(string) })] + public string MessageId { get => _parametersBody.MessageId ?? null; set => _parametersBody.MessageId = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The rule name.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Address of the queue to reply to. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Address of the queue to reply to.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Address of the queue to reply to.", + SerializedName = @"replyTo", + PossibleTypes = new [] { typeof(string) })] + public string ReplyTo { get => _parametersBody.ReplyTo ?? null; set => _parametersBody.ReplyTo = value; } + + /// Session identifier to reply to. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Session identifier to reply to.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Session identifier to reply to.", + SerializedName = @"replyToSessionId", + PossibleTypes = new [] { typeof(string) })] + public string ReplyToSessionId { get => _parametersBody.ReplyToSessionId ?? null; set => _parametersBody.ReplyToSessionId = value; } + + /// Session identifier. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Session identifier.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Session identifier.", + SerializedName = @"sessionId", + PossibleTypes = new [] { typeof(string) })] + public string SessionId { get => _parametersBody.SessionId ?? null; set => _parametersBody.SessionId = value; } + + /// The SQL expression. e.g. MyProperty='ABC' + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The SQL expression. e.g. MyProperty='ABC'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The SQL expression. e.g. MyProperty='ABC'", + SerializedName = @"sqlExpression", + PossibleTypes = new [] { typeof(string) })] + public string SqlExpression { get => _parametersBody.SqlExpression ?? null; set => _parametersBody.SqlExpression = value; } + + /// + /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.", + SerializedName = @"compatibilityLevel", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotExport] + public int SqlFilterCompatibilityLevel { get => _parametersBody.SqlFilterCompatibilityLevel ?? default(int); set => _parametersBody.SqlFilterCompatibilityLevel = value; } + + /// Value that indicates whether the rule action requires preprocessing. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether the rule action requires preprocessing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether the rule action requires preprocessing.", + SerializedName = @"requiresPreprocessing", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter SqlFilterRequiresPreprocessing { get => _parametersBody.SqlFilterRequiresPreprocessing ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.SqlFilterRequiresPreprocessing = value; } + + /// Backing field for property. + private string _subscriptionName; + + /// The subscription name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The subscription name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The subscription name.", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionName { get => this._subscriptionName; set => this._subscriptionName = value; } + + /// Address to send to. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Address to send to.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Address to send to.", + SerializedName = @"to", + PossibleTypes = new [] { typeof(string) })] + public string To { get => _parametersBody.To ?? null; set => _parametersBody.To = value; } + + /// Backing field for property. + private string _topicName; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusRule_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RulesCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("ActionCompatibilityLevel")) + { + ActionCompatibilityLevel = (int)this.MyInvocation.BoundParameters["ActionCompatibilityLevel"]; + } + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("SqlFilterCompatibilityLevel")) + { + SqlFilterCompatibilityLevel = (int)this.MyInvocation.BoundParameters["SqlFilterCompatibilityLevel"]; + } + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.TopicName.ToString()))}/subscriptions/{(global::System.Uri.EscapeDataString(this.SubscriptionName.ToString()))}/rules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.RulesCreateOrUpdateViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.RulesCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, TopicName, SubscriptionName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { TopicName=TopicName,SubscriptionName=SubscriptionName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentitySubscription.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentitySubscription.cs new file mode 100644 index 000000000000..252ca97007df --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentitySubscription.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create a new rule and updates an existing rule + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusRule_CreateViaIdentitySubscription", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a new rule and updates an existing rule")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusRule_CreateViaIdentitySubscription : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The rule name.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule _parameter; + + /// Description of Rule Resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of Rule Resource.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Description of Rule Resource.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _subscriptionInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity SubscriptionInputObject { get => this._subscriptionInputObject; set => this._subscriptionInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusRule_CreateViaIdentitySubscription() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RulesCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (SubscriptionInputObject?.Id != null) + { + this.SubscriptionInputObject.Id += $"/rules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.RulesCreateOrUpdateViaIdentity(SubscriptionInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == SubscriptionInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + if (null == SubscriptionInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + if (null == SubscriptionInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + if (null == SubscriptionInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + if (null == SubscriptionInputObject.SubscriptionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.SubscriptionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + await this.Client.RulesCreateOrUpdate(SubscriptionInputObject.SubscriptionId ?? null, SubscriptionInputObject.ResourceGroupName ?? null, SubscriptionInputObject.NamespaceName ?? null, SubscriptionInputObject.TopicName ?? null, SubscriptionInputObject.SubscriptionName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentitySubscriptionExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentitySubscriptionExpanded.cs new file mode 100644 index 000000000000..a9f81b85a910 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentitySubscriptionExpanded.cs @@ -0,0 +1,718 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create a new rule and updates an existing rule + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusRule_CreateViaIdentitySubscriptionExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a new rule and updates an existing rule")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusRule_CreateViaIdentitySubscriptionExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Description of Rule Resource. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Rule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// + /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.", + SerializedName = @"compatibilityLevel", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotExport] + public int ActionCompatibilityLevel { get => _parametersBody.ActionCompatibilityLevel ?? default(int); set => _parametersBody.ActionCompatibilityLevel = value; } + + /// Value that indicates whether the rule action requires preprocessing. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether the rule action requires preprocessing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether the rule action requires preprocessing.", + SerializedName = @"requiresPreprocessing", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter ActionRequiresPreprocessing { get => _parametersBody.ActionRequiresPreprocessing ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.ActionRequiresPreprocessing = value; } + + /// SQL expression. e.g. MyProperty='ABC' + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "SQL expression. e.g. MyProperty='ABC'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SQL expression. e.g. MyProperty='ABC'", + SerializedName = @"sqlExpression", + PossibleTypes = new [] { typeof(string) })] + public string ActionSqlExpression { get => _parametersBody.ActionSqlExpression ?? null; set => _parametersBody.ActionSqlExpression = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// Content type of the message. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Content type of the message.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Content type of the message.", + SerializedName = @"contentType", + PossibleTypes = new [] { typeof(string) })] + public string ContentType { get => _parametersBody.ContentType ?? null; set => _parametersBody.ContentType = value; } + + /// dictionary object for custom filters + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "dictionary object for custom filters")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"dictionary object for custom filters", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties CorrelationFilterProperty { get => _parametersBody.CorrelationFilterProperty ?? null /* object */; set => _parametersBody.CorrelationFilterProperty = value; } + + /// Value that indicates whether the rule action requires preprocessing. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether the rule action requires preprocessing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether the rule action requires preprocessing.", + SerializedName = @"requiresPreprocessing", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter CorrelationFilterRequiresPreprocessing { get => _parametersBody.CorrelationFilterRequiresPreprocessing ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.CorrelationFilterRequiresPreprocessing = value; } + + /// Identifier of the correlation. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Identifier of the correlation.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Identifier of the correlation.", + SerializedName = @"correlationId", + PossibleTypes = new [] { typeof(string) })] + public string CorrelationId { get => _parametersBody.CorrelationId ?? null; set => _parametersBody.CorrelationId = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Filter type that is evaluated against a BrokeredMessage. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Filter type that is evaluated against a BrokeredMessage.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Filter type that is evaluated against a BrokeredMessage.", + SerializedName = @"filterType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SqlFilter", "CorrelationFilter")] + public string FilterType { get => _parametersBody.FilterType ?? null; set => _parametersBody.FilterType = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Application specific label. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Application specific label.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Application specific label.", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + public string Label { get => _parametersBody.Label ?? null; set => _parametersBody.Label = value; } + + /// Identifier of the message. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Identifier of the message.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Identifier of the message.", + SerializedName = @"messageId", + PossibleTypes = new [] { typeof(string) })] + public string MessageId { get => _parametersBody.MessageId ?? null; set => _parametersBody.MessageId = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The rule name.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Address of the queue to reply to. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Address of the queue to reply to.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Address of the queue to reply to.", + SerializedName = @"replyTo", + PossibleTypes = new [] { typeof(string) })] + public string ReplyTo { get => _parametersBody.ReplyTo ?? null; set => _parametersBody.ReplyTo = value; } + + /// Session identifier to reply to. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Session identifier to reply to.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Session identifier to reply to.", + SerializedName = @"replyToSessionId", + PossibleTypes = new [] { typeof(string) })] + public string ReplyToSessionId { get => _parametersBody.ReplyToSessionId ?? null; set => _parametersBody.ReplyToSessionId = value; } + + /// Session identifier. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Session identifier.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Session identifier.", + SerializedName = @"sessionId", + PossibleTypes = new [] { typeof(string) })] + public string SessionId { get => _parametersBody.SessionId ?? null; set => _parametersBody.SessionId = value; } + + /// The SQL expression. e.g. MyProperty='ABC' + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The SQL expression. e.g. MyProperty='ABC'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The SQL expression. e.g. MyProperty='ABC'", + SerializedName = @"sqlExpression", + PossibleTypes = new [] { typeof(string) })] + public string SqlExpression { get => _parametersBody.SqlExpression ?? null; set => _parametersBody.SqlExpression = value; } + + /// + /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.", + SerializedName = @"compatibilityLevel", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotExport] + public int SqlFilterCompatibilityLevel { get => _parametersBody.SqlFilterCompatibilityLevel ?? default(int); set => _parametersBody.SqlFilterCompatibilityLevel = value; } + + /// Value that indicates whether the rule action requires preprocessing. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether the rule action requires preprocessing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether the rule action requires preprocessing.", + SerializedName = @"requiresPreprocessing", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter SqlFilterRequiresPreprocessing { get => _parametersBody.SqlFilterRequiresPreprocessing ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.SqlFilterRequiresPreprocessing = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _subscriptionInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity SubscriptionInputObject { get => this._subscriptionInputObject; set => this._subscriptionInputObject = value; } + + /// Address to send to. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Address to send to.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Address to send to.", + SerializedName = @"to", + PossibleTypes = new [] { typeof(string) })] + public string To { get => _parametersBody.To ?? null; set => _parametersBody.To = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusRule_CreateViaIdentitySubscriptionExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RulesCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("ActionCompatibilityLevel")) + { + ActionCompatibilityLevel = (int)this.MyInvocation.BoundParameters["ActionCompatibilityLevel"]; + } + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("SqlFilterCompatibilityLevel")) + { + SqlFilterCompatibilityLevel = (int)this.MyInvocation.BoundParameters["SqlFilterCompatibilityLevel"]; + } + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (SubscriptionInputObject?.Id != null) + { + this.SubscriptionInputObject.Id += $"/rules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.RulesCreateOrUpdateViaIdentity(SubscriptionInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == SubscriptionInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + if (null == SubscriptionInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + if (null == SubscriptionInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + if (null == SubscriptionInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + if (null == SubscriptionInputObject.SubscriptionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.SubscriptionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + await this.Client.RulesCreateOrUpdate(SubscriptionInputObject.SubscriptionId ?? null, SubscriptionInputObject.ResourceGroupName ?? null, SubscriptionInputObject.NamespaceName ?? null, SubscriptionInputObject.TopicName ?? null, SubscriptionInputObject.SubscriptionName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentityTopic.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentityTopic.cs new file mode 100644 index 000000000000..22f7e756e7f7 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentityTopic.cs @@ -0,0 +1,536 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create a new rule and updates an existing rule + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusRule_CreateViaIdentityTopic", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a new rule and updates an existing rule")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusRule_CreateViaIdentityTopic : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The rule name.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule _parameter; + + /// Description of Rule Resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of Rule Resource.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Description of Rule Resource.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionName; + + /// The subscription name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The subscription name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The subscription name.", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionName { get => this._subscriptionName; set => this._subscriptionName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _topicInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity TopicInputObject { get => this._topicInputObject; set => this._topicInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusRule_CreateViaIdentityTopic() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RulesCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (TopicInputObject?.Id != null) + { + this.TopicInputObject.Id += $"/subscriptions/{(global::System.Uri.EscapeDataString(this.SubscriptionName.ToString()))}/rules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.RulesCreateOrUpdateViaIdentity(TopicInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == TopicInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + await this.Client.RulesCreateOrUpdate(TopicInputObject.SubscriptionId ?? null, TopicInputObject.ResourceGroupName ?? null, TopicInputObject.NamespaceName ?? null, TopicInputObject.TopicName ?? null, SubscriptionName, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionName=SubscriptionName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentityTopicExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentityTopicExpanded.cs new file mode 100644 index 000000000000..86fd01a3d860 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusRule_CreateViaIdentityTopicExpanded.cs @@ -0,0 +1,728 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create a new rule and updates an existing rule + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusRule_CreateViaIdentityTopicExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a new rule and updates an existing rule")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusRule_CreateViaIdentityTopicExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Description of Rule Resource. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Rule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// + /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.", + SerializedName = @"compatibilityLevel", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotExport] + public int ActionCompatibilityLevel { get => _parametersBody.ActionCompatibilityLevel ?? default(int); set => _parametersBody.ActionCompatibilityLevel = value; } + + /// Value that indicates whether the rule action requires preprocessing. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether the rule action requires preprocessing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether the rule action requires preprocessing.", + SerializedName = @"requiresPreprocessing", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter ActionRequiresPreprocessing { get => _parametersBody.ActionRequiresPreprocessing ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.ActionRequiresPreprocessing = value; } + + /// SQL expression. e.g. MyProperty='ABC' + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "SQL expression. e.g. MyProperty='ABC'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SQL expression. e.g. MyProperty='ABC'", + SerializedName = @"sqlExpression", + PossibleTypes = new [] { typeof(string) })] + public string ActionSqlExpression { get => _parametersBody.ActionSqlExpression ?? null; set => _parametersBody.ActionSqlExpression = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// Content type of the message. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Content type of the message.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Content type of the message.", + SerializedName = @"contentType", + PossibleTypes = new [] { typeof(string) })] + public string ContentType { get => _parametersBody.ContentType ?? null; set => _parametersBody.ContentType = value; } + + /// dictionary object for custom filters + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "dictionary object for custom filters")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"dictionary object for custom filters", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICorrelationFilterProperties CorrelationFilterProperty { get => _parametersBody.CorrelationFilterProperty ?? null /* object */; set => _parametersBody.CorrelationFilterProperty = value; } + + /// Value that indicates whether the rule action requires preprocessing. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether the rule action requires preprocessing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether the rule action requires preprocessing.", + SerializedName = @"requiresPreprocessing", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter CorrelationFilterRequiresPreprocessing { get => _parametersBody.CorrelationFilterRequiresPreprocessing ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.CorrelationFilterRequiresPreprocessing = value; } + + /// Identifier of the correlation. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Identifier of the correlation.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Identifier of the correlation.", + SerializedName = @"correlationId", + PossibleTypes = new [] { typeof(string) })] + public string CorrelationId { get => _parametersBody.CorrelationId ?? null; set => _parametersBody.CorrelationId = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Filter type that is evaluated against a BrokeredMessage. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Filter type that is evaluated against a BrokeredMessage.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Filter type that is evaluated against a BrokeredMessage.", + SerializedName = @"filterType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SqlFilter", "CorrelationFilter")] + public string FilterType { get => _parametersBody.FilterType ?? null; set => _parametersBody.FilterType = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Application specific label. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Application specific label.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Application specific label.", + SerializedName = @"label", + PossibleTypes = new [] { typeof(string) })] + public string Label { get => _parametersBody.Label ?? null; set => _parametersBody.Label = value; } + + /// Identifier of the message. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Identifier of the message.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Identifier of the message.", + SerializedName = @"messageId", + PossibleTypes = new [] { typeof(string) })] + public string MessageId { get => _parametersBody.MessageId ?? null; set => _parametersBody.MessageId = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The rule name.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Address of the queue to reply to. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Address of the queue to reply to.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Address of the queue to reply to.", + SerializedName = @"replyTo", + PossibleTypes = new [] { typeof(string) })] + public string ReplyTo { get => _parametersBody.ReplyTo ?? null; set => _parametersBody.ReplyTo = value; } + + /// Session identifier to reply to. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Session identifier to reply to.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Session identifier to reply to.", + SerializedName = @"replyToSessionId", + PossibleTypes = new [] { typeof(string) })] + public string ReplyToSessionId { get => _parametersBody.ReplyToSessionId ?? null; set => _parametersBody.ReplyToSessionId = value; } + + /// Session identifier. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Session identifier.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Session identifier.", + SerializedName = @"sessionId", + PossibleTypes = new [] { typeof(string) })] + public string SessionId { get => _parametersBody.SessionId ?? null; set => _parametersBody.SessionId = value; } + + /// The SQL expression. e.g. MyProperty='ABC' + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The SQL expression. e.g. MyProperty='ABC'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The SQL expression. e.g. MyProperty='ABC'", + SerializedName = @"sqlExpression", + PossibleTypes = new [] { typeof(string) })] + public string SqlExpression { get => _parametersBody.SqlExpression ?? null; set => _parametersBody.SqlExpression = value; } + + /// + /// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.", + SerializedName = @"compatibilityLevel", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotExport] + public int SqlFilterCompatibilityLevel { get => _parametersBody.SqlFilterCompatibilityLevel ?? default(int); set => _parametersBody.SqlFilterCompatibilityLevel = value; } + + /// Value that indicates whether the rule action requires preprocessing. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether the rule action requires preprocessing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether the rule action requires preprocessing.", + SerializedName = @"requiresPreprocessing", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter SqlFilterRequiresPreprocessing { get => _parametersBody.SqlFilterRequiresPreprocessing ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.SqlFilterRequiresPreprocessing = value; } + + /// Backing field for property. + private string _subscriptionName; + + /// The subscription name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The subscription name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The subscription name.", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionName { get => this._subscriptionName; set => this._subscriptionName = value; } + + /// Address to send to. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Address to send to.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Address to send to.", + SerializedName = @"to", + PossibleTypes = new [] { typeof(string) })] + public string To { get => _parametersBody.To ?? null; set => _parametersBody.To = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _topicInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity TopicInputObject { get => this._topicInputObject; set => this._topicInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusRule_CreateViaIdentityTopicExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RulesCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("ActionCompatibilityLevel")) + { + ActionCompatibilityLevel = (int)this.MyInvocation.BoundParameters["ActionCompatibilityLevel"]; + } + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("SqlFilterCompatibilityLevel")) + { + SqlFilterCompatibilityLevel = (int)this.MyInvocation.BoundParameters["SqlFilterCompatibilityLevel"]; + } + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (TopicInputObject?.Id != null) + { + this.TopicInputObject.Id += $"/subscriptions/{(global::System.Uri.EscapeDataString(this.SubscriptionName.ToString()))}/rules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.RulesCreateOrUpdateViaIdentity(TopicInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == TopicInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + await this.Client.RulesCreateOrUpdate(TopicInputObject.SubscriptionId ?? null, TopicInputObject.ResourceGroupName ?? null, TopicInputObject.NamespaceName ?? null, TopicInputObject.TopicName ?? null, SubscriptionName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionName=SubscriptionName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateExpanded.cs index 810cc3dd9784..3d75fc5c7122 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateExpanded.cs @@ -6,19 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates a topic subscription. + /// Create a topic subscription. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusSubscription_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates a topic subscription.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a topic subscription.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusSubscription_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,8 +38,20 @@ public partial class NewAzServiceBusSubscription_CreateExpanded : global::System /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Description of subscription resource. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbSubscription(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscription(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// /// Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes. @@ -55,6 +71,9 @@ public partial class NewAzServiceBusSubscription_CreateExpanded : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -145,6 +164,9 @@ public partial class NewAzServiceBusSubscription_CreateExpanded : global::System PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter EnableBatchedOperations { get => _parametersBody.EnableBatchedOperations ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.EnableBatchedOperations = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Queue/Topic name to forward the Dead Letter message [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Queue/Topic name to forward the Dead Letter message")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] @@ -284,7 +306,7 @@ public partial class NewAzServiceBusSubscription_CreateExpanded : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -335,10 +357,9 @@ public partial class NewAzServiceBusSubscription_CreateExpanded : global::System ReadOnly = false, Description = @"Enumerates the possible values for the status of a messaging entity.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus) })] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChange("Status", "12.0.0", "4.0.0", "2024/05/21", OldParamaterType="EntityStatus", NewParameterType="String")] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus Status { get => _parametersBody.Status ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus)""); set => _parametersBody.Status = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + public string Status { get => _parametersBody.Status ?? null; set => _parametersBody.Status = value; } /// Backing field for property. private string _subscriptionId; @@ -357,7 +378,8 @@ public partial class NewAzServiceBusSubscription_CreateExpanded : global::System [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -380,24 +402,24 @@ public partial class NewAzServiceBusSubscription_CreateExpanded : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -420,6 +442,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -484,8 +511,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -495,7 +547,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusSubscription_CreateExpanded() { @@ -549,7 +601,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -562,12 +614,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SubscriptionsCreateOrUpdate(ResourceGroupName, NamespaceName, TopicName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.SubscriptionsCreateOrUpdate(SubscriptionId, ResourceGroupName, NamespaceName, TopicName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -605,12 +657,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -627,15 +679,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -645,12 +697,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -662,8 +714,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateViaIdentity.cs index f1255dd36834..f417ff183441 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateViaIdentity.cs @@ -6,20 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates a topic subscription. + /// Create a topic subscription. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusSubscription_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates a topic subscription.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a topic subscription.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusSubscription_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class NewAzServiceBusSubscription_CreateViaIdentity : global::Sys /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class NewAzServiceBusSubscription_CreateViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +107,7 @@ public partial class NewAzServiceBusSubscription_CreateViaIdentity : global::Sys global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription _parameter; /// Description of subscription resource. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of subscription resource.", ValueFromPipeline = true)] @@ -94,13 +116,14 @@ public partial class NewAzServiceBusSubscription_CreateViaIdentity : global::Sys ReadOnly = false, Description = @"Description of subscription resource.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,24 +146,24 @@ public partial class NewAzServiceBusSubscription_CreateViaIdentity : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +186,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +255,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -238,7 +291,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusSubscription_CreateViaIdentity() { @@ -292,7 +345,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,11 +360,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.SubscriptionsCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.SubscriptionsCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -328,17 +385,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.SubscriptionsCreateOrUpdate(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.SubscriptionName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.SubscriptionsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.SubscriptionName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -376,12 +429,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -398,15 +451,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -416,12 +469,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -433,8 +486,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..a19bea73e43d --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateViaIdentityNamespace.cs @@ -0,0 +1,533 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create a topic subscription. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusSubscription_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a topic subscription.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusSubscription_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The subscription name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The subscription name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The subscription name.", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SubscriptionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription _parameter; + + /// Description of subscription resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of subscription resource.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Description of subscription resource.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _topicName; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusSubscription_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SubscriptionsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.TopicName.ToString()))}/subscriptions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.SubscriptionsCreateOrUpdateViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.SubscriptionsCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, TopicName, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { TopicName=TopicName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateViaIdentityNamespaceExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..461fc8fd2631 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,720 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create a topic subscription. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusSubscription_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a topic subscription.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusSubscription_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Description of subscription resource. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscription(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// + /// Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.", + SerializedName = @"autoDeleteOnIdle", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + public global::System.TimeSpan AutoDeleteOnIdle { get => _parametersBody.AutoDeleteOnIdle ?? default(global::System.TimeSpan); set => _parametersBody.AutoDeleteOnIdle = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// Indicates the Client ID of the application that created the client-affine subscription. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the Client ID of the application that created the client-affine subscription.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the Client ID of the application that created the client-affine subscription.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + public string ClientId { get => _parametersBody.ClientId ?? null; set => _parametersBody.ClientId = value; } + + /// + /// Value that indicates whether a subscription has dead letter support on filter evaluation exceptions. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.", + SerializedName = @"deadLetteringOnFilterEvaluationExceptions", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DeadLetteringOnFilterEvaluationException { get => _parametersBody.DeadLetteringOnFilterEvaluationException ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.DeadLetteringOnFilterEvaluationException = value; } + + /// + /// Value that indicates whether a subscription has dead letter support when a message expires. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether a subscription has dead letter support when a message expires.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether a subscription has dead letter support when a message expires.", + SerializedName = @"deadLetteringOnMessageExpiration", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DeadLetteringOnMessageExpiration { get => _parametersBody.DeadLetteringOnMessageExpiration ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.DeadLetteringOnMessageExpiration = value; } + + /// + /// This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the + /// default value used when TimeToLive is not set on a message itself. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.", + SerializedName = @"defaultMessageTimeToLive", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + public global::System.TimeSpan DefaultMessageTimeToLive { get => _parametersBody.DefaultMessageTimeToLive ?? default(global::System.TimeSpan); set => _parametersBody.DefaultMessageTimeToLive = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Defines the duration of the duplicate detection history. The default value is 10 minutes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines the duration of the duplicate detection history. The default value is 10 minutes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the duration of the duplicate detection history. The default value is 10 minutes.", + SerializedName = @"duplicateDetectionHistoryTimeWindow", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + public global::System.TimeSpan DuplicateDetectionHistoryTimeWindow { get => _parametersBody.DuplicateDetectionHistoryTimeWindow ?? default(global::System.TimeSpan); set => _parametersBody.DuplicateDetectionHistoryTimeWindow = value; } + + /// Value that indicates whether server-side batched operations are enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether server-side batched operations are enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether server-side batched operations are enabled.", + SerializedName = @"enableBatchedOperations", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter EnableBatchedOperations { get => _parametersBody.EnableBatchedOperations ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.EnableBatchedOperations = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Queue/Topic name to forward the Dead Letter message + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Queue/Topic name to forward the Dead Letter message")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Queue/Topic name to forward the Dead Letter message", + SerializedName = @"forwardDeadLetteredMessagesTo", + PossibleTypes = new [] { typeof(string) })] + public string ForwardDeadLetteredMessagesTo { get => _parametersBody.ForwardDeadLetteredMessagesTo ?? null; set => _parametersBody.ForwardDeadLetteredMessagesTo = value; } + + /// Queue/Topic name to forward the messages + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Queue/Topic name to forward the messages")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Queue/Topic name to forward the messages", + SerializedName = @"forwardTo", + PossibleTypes = new [] { typeof(string) })] + public string ForwardTo { get => _parametersBody.ForwardTo ?? null; set => _parametersBody.ForwardTo = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Value that indicates whether the subscription has an affinity to the client id. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether the subscription has an affinity to the client id.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether the subscription has an affinity to the client id.", + SerializedName = @"isClientAffine", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsClientAffine { get => _parametersBody.IsClientAffine ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.IsClientAffine = value; } + + /// + /// For client-affine subscriptions, this value indicates whether the subscription is durable or not. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "For client-affine subscriptions, this value indicates whether the subscription is durable or not.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"For client-affine subscriptions, this value indicates whether the subscription is durable or not.", + SerializedName = @"isDurable", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsDurable { get => _parametersBody.IsDurable ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.IsDurable = value; } + + /// + /// For client-affine subscriptions, this value indicates whether the subscription is shared or not. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "For client-affine subscriptions, this value indicates whether the subscription is shared or not.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"For client-affine subscriptions, this value indicates whether the subscription is shared or not.", + SerializedName = @"isShared", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsShared { get => _parametersBody.IsShared ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.IsShared = value; } + + /// + /// Timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum + /// value for LockDuration is 5 minutes; the default value is 1 minute. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.", + SerializedName = @"lockDuration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + public global::System.TimeSpan LockDuration { get => _parametersBody.LockDuration ?? default(global::System.TimeSpan); set => _parametersBody.LockDuration = value; } + + /// Number of maximum deliveries. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Number of maximum deliveries.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of maximum deliveries.", + SerializedName = @"maxDeliveryCount", + PossibleTypes = new [] { typeof(int) })] + public int MaxDeliveryCount { get => _parametersBody.MaxDeliveryCount ?? default(int); set => _parametersBody.MaxDeliveryCount = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The subscription name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The subscription name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The subscription name.", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SubscriptionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Value indicating if a subscription supports the concept of sessions. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value indicating if a subscription supports the concept of sessions.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value indicating if a subscription supports the concept of sessions.", + SerializedName = @"requiresSession", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter RequiresSession { get => _parametersBody.RequiresSession ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.RequiresSession = value; } + + /// Enumerates the possible values for the status of a messaging entity. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enumerates the possible values for the status of a messaging entity.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enumerates the possible values for the status of a messaging entity.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + public string Status { get => _parametersBody.Status ?? null; set => _parametersBody.Status = value; } + + /// Backing field for property. + private string _topicName; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzServiceBusSubscription_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SubscriptionsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.TopicName.ToString()))}/subscriptions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.SubscriptionsCreateOrUpdateViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.SubscriptionsCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, TopicName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { TopicName=TopicName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateViaIdentityTopic.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateViaIdentityTopic.cs new file mode 100644 index 000000000000..43d7cc231a1d --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateViaIdentityTopic.cs @@ -0,0 +1,523 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create a topic subscription. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusSubscription_CreateViaIdentityTopic", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a topic subscription.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusSubscription_CreateViaIdentityTopic : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The subscription name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The subscription name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The subscription name.", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SubscriptionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription _parameter; + + /// Description of subscription resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of subscription resource.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Description of subscription resource.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _topicInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity TopicInputObject { get => this._topicInputObject; set => this._topicInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusSubscription_CreateViaIdentityTopic() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SubscriptionsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (TopicInputObject?.Id != null) + { + this.TopicInputObject.Id += $"/subscriptions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.SubscriptionsCreateOrUpdateViaIdentity(TopicInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == TopicInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + await this.Client.SubscriptionsCreateOrUpdate(TopicInputObject.SubscriptionId ?? null, TopicInputObject.ResourceGroupName ?? null, TopicInputObject.NamespaceName ?? null, TopicInputObject.TopicName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateViaIdentityTopicExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateViaIdentityTopicExpanded.cs new file mode 100644 index 000000000000..578b227cd9c4 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusSubscription_CreateViaIdentityTopicExpanded.cs @@ -0,0 +1,709 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create a topic subscription. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusSubscription_CreateViaIdentityTopicExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a topic subscription.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusSubscription_CreateViaIdentityTopicExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Description of subscription resource. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbSubscription(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// + /// Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.", + SerializedName = @"autoDeleteOnIdle", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + public global::System.TimeSpan AutoDeleteOnIdle { get => _parametersBody.AutoDeleteOnIdle ?? default(global::System.TimeSpan); set => _parametersBody.AutoDeleteOnIdle = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// Indicates the Client ID of the application that created the client-affine subscription. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the Client ID of the application that created the client-affine subscription.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the Client ID of the application that created the client-affine subscription.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + public string ClientId { get => _parametersBody.ClientId ?? null; set => _parametersBody.ClientId = value; } + + /// + /// Value that indicates whether a subscription has dead letter support on filter evaluation exceptions. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.", + SerializedName = @"deadLetteringOnFilterEvaluationExceptions", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DeadLetteringOnFilterEvaluationException { get => _parametersBody.DeadLetteringOnFilterEvaluationException ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.DeadLetteringOnFilterEvaluationException = value; } + + /// + /// Value that indicates whether a subscription has dead letter support when a message expires. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether a subscription has dead letter support when a message expires.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether a subscription has dead letter support when a message expires.", + SerializedName = @"deadLetteringOnMessageExpiration", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DeadLetteringOnMessageExpiration { get => _parametersBody.DeadLetteringOnMessageExpiration ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.DeadLetteringOnMessageExpiration = value; } + + /// + /// This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the + /// default value used when TimeToLive is not set on a message itself. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.", + SerializedName = @"defaultMessageTimeToLive", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + public global::System.TimeSpan DefaultMessageTimeToLive { get => _parametersBody.DefaultMessageTimeToLive ?? default(global::System.TimeSpan); set => _parametersBody.DefaultMessageTimeToLive = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Defines the duration of the duplicate detection history. The default value is 10 minutes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines the duration of the duplicate detection history. The default value is 10 minutes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the duration of the duplicate detection history. The default value is 10 minutes.", + SerializedName = @"duplicateDetectionHistoryTimeWindow", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + public global::System.TimeSpan DuplicateDetectionHistoryTimeWindow { get => _parametersBody.DuplicateDetectionHistoryTimeWindow ?? default(global::System.TimeSpan); set => _parametersBody.DuplicateDetectionHistoryTimeWindow = value; } + + /// Value that indicates whether server-side batched operations are enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether server-side batched operations are enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether server-side batched operations are enabled.", + SerializedName = @"enableBatchedOperations", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter EnableBatchedOperations { get => _parametersBody.EnableBatchedOperations ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.EnableBatchedOperations = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Queue/Topic name to forward the Dead Letter message + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Queue/Topic name to forward the Dead Letter message")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Queue/Topic name to forward the Dead Letter message", + SerializedName = @"forwardDeadLetteredMessagesTo", + PossibleTypes = new [] { typeof(string) })] + public string ForwardDeadLetteredMessagesTo { get => _parametersBody.ForwardDeadLetteredMessagesTo ?? null; set => _parametersBody.ForwardDeadLetteredMessagesTo = value; } + + /// Queue/Topic name to forward the messages + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Queue/Topic name to forward the messages")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Queue/Topic name to forward the messages", + SerializedName = @"forwardTo", + PossibleTypes = new [] { typeof(string) })] + public string ForwardTo { get => _parametersBody.ForwardTo ?? null; set => _parametersBody.ForwardTo = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Value that indicates whether the subscription has an affinity to the client id. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether the subscription has an affinity to the client id.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether the subscription has an affinity to the client id.", + SerializedName = @"isClientAffine", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsClientAffine { get => _parametersBody.IsClientAffine ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.IsClientAffine = value; } + + /// + /// For client-affine subscriptions, this value indicates whether the subscription is durable or not. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "For client-affine subscriptions, this value indicates whether the subscription is durable or not.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"For client-affine subscriptions, this value indicates whether the subscription is durable or not.", + SerializedName = @"isDurable", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsDurable { get => _parametersBody.IsDurable ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.IsDurable = value; } + + /// + /// For client-affine subscriptions, this value indicates whether the subscription is shared or not. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "For client-affine subscriptions, this value indicates whether the subscription is shared or not.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"For client-affine subscriptions, this value indicates whether the subscription is shared or not.", + SerializedName = @"isShared", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsShared { get => _parametersBody.IsShared ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.IsShared = value; } + + /// + /// Timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum + /// value for LockDuration is 5 minutes; the default value is 1 minute. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.", + SerializedName = @"lockDuration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + public global::System.TimeSpan LockDuration { get => _parametersBody.LockDuration ?? default(global::System.TimeSpan); set => _parametersBody.LockDuration = value; } + + /// Number of maximum deliveries. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Number of maximum deliveries.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of maximum deliveries.", + SerializedName = @"maxDeliveryCount", + PossibleTypes = new [] { typeof(int) })] + public int MaxDeliveryCount { get => _parametersBody.MaxDeliveryCount ?? default(int); set => _parametersBody.MaxDeliveryCount = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The subscription name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The subscription name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The subscription name.", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SubscriptionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Value indicating if a subscription supports the concept of sessions. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value indicating if a subscription supports the concept of sessions.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value indicating if a subscription supports the concept of sessions.", + SerializedName = @"requiresSession", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter RequiresSession { get => _parametersBody.RequiresSession ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.RequiresSession = value; } + + /// Enumerates the possible values for the status of a messaging entity. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enumerates the possible values for the status of a messaging entity.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enumerates the possible values for the status of a messaging entity.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + public string Status { get => _parametersBody.Status ?? null; set => _parametersBody.Status = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _topicInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity TopicInputObject { get => this._topicInputObject; set => this._topicInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusSubscription_CreateViaIdentityTopicExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SubscriptionsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (TopicInputObject?.Id != null) + { + this.TopicInputObject.Id += $"/subscriptions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.SubscriptionsCreateOrUpdateViaIdentity(TopicInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == TopicInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + await this.Client.SubscriptionsCreateOrUpdate(TopicInputObject.SubscriptionId ?? null, TopicInputObject.ResourceGroupName ?? null, TopicInputObject.NamespaceName ?? null, TopicInputObject.TopicName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateExpanded.cs index a458781cf83a..644c1dc97b40 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateExpanded.cs @@ -6,20 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates an authorization rule for the specified topic. + /// Create an authorization rule for the specified topic. /// /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopicAuthorizationRule_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates an authorization rule for the specified topic.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create an authorization rule for the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720678.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusTopicAuthorizationRule_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,14 +39,29 @@ public partial class NewAzServiceBusTopicAuthorizationRule_CreateExpanded : glob /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Description of a namespace authorization rule. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbAuthorizationRule(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -56,6 +75,9 @@ public partial class NewAzServiceBusTopicAuthorizationRule_CreateExpanded : glob [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -110,7 +132,7 @@ public partial class NewAzServiceBusTopicAuthorizationRule_CreateExpanded : glob /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -151,9 +173,9 @@ public partial class NewAzServiceBusTopicAuthorizationRule_CreateExpanded : glob ReadOnly = false, Description = @"The rights associated with the rule.", SerializedName = @"rights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[] Rights { get => _parametersBody.Rights ?? null /* arrayOf */; set => _parametersBody.Rights = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + public string[] Rights { get => _parametersBody.Rights?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.Rights = (value != null ? new System.Collections.Generic.List(value) : null); } /// Backing field for property. private string _subscriptionId; @@ -172,7 +194,8 @@ public partial class NewAzServiceBusTopicAuthorizationRule_CreateExpanded : glob [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -195,24 +218,24 @@ public partial class NewAzServiceBusTopicAuthorizationRule_CreateExpanded : glob /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -235,6 +258,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -299,8 +327,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -310,7 +363,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusTopicAuthorizationRule_CreateExpanded() { @@ -364,7 +417,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -377,12 +430,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.TopicsCreateOrUpdateAuthorizationRule(ResourceGroupName, NamespaceName, TopicName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.TopicsCreateOrUpdateAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, TopicName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -420,12 +473,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -442,15 +495,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -460,12 +513,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -477,8 +530,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateViaIdentity.cs index ed43e9faffb2..dfd641811ec6 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateViaIdentity.cs @@ -6,20 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates an authorization rule for the specified topic. + /// Create an authorization rule for the specified topic. /// /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopicAuthorizationRule_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates an authorization rule for the specified topic.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create an authorization rule for the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720678.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusTopicAuthorizationRule_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class NewAzServiceBusTopicAuthorizationRule_CreateViaIdentity : g /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class NewAzServiceBusTopicAuthorizationRule_CreateViaIdentity : g [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +107,7 @@ public partial class NewAzServiceBusTopicAuthorizationRule_CreateViaIdentity : g global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule _parameter; /// Description of a namespace authorization rule. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of a namespace authorization rule.", ValueFromPipeline = true)] @@ -94,13 +116,14 @@ public partial class NewAzServiceBusTopicAuthorizationRule_CreateViaIdentity : g ReadOnly = false, Description = @"Description of a namespace authorization rule.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,24 +146,24 @@ public partial class NewAzServiceBusTopicAuthorizationRule_CreateViaIdentity : g /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +186,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +255,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -238,7 +291,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusTopicAuthorizationRule_CreateViaIdentity() { @@ -292,7 +345,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,11 +360,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.TopicsCreateOrUpdateAuthorizationRuleViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.TopicsCreateOrUpdateAuthorizationRuleViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -328,17 +385,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.TopicsCreateOrUpdateAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.TopicsCreateOrUpdateAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.AuthorizationRuleName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -376,12 +429,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -398,15 +451,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -416,12 +469,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -433,8 +486,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..b21056631946 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityNamespace.cs @@ -0,0 +1,534 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create an authorization rule for the specified topic. + /// + /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopicAuthorizationRule_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create an authorization rule for the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720678.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule _parameter; + + /// Description of a namespace authorization rule. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of a namespace authorization rule.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Description of a namespace authorization rule.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _topicName; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TopicsCreateOrUpdateAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.TopicName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TopicsCreateOrUpdateAuthorizationRuleViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.TopicsCreateOrUpdateAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, TopicName, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { TopicName=TopicName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..4a3cb4ca0a76 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,536 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create an authorization rule for the specified topic. + /// + /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopicAuthorizationRule_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create an authorization rule for the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720678.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Description of a namespace authorization rule. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The rights associated with the rule. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The rights associated with the rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The rights associated with the rule.", + SerializedName = @"rights", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + public string[] Rights { get => _parametersBody.Rights?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.Rights = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Backing field for property. + private string _topicName; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TopicsCreateOrUpdateAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.TopicName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TopicsCreateOrUpdateAuthorizationRuleViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.TopicsCreateOrUpdateAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, TopicName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { TopicName=TopicName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityTopic.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityTopic.cs new file mode 100644 index 000000000000..b8212e96bed4 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityTopic.cs @@ -0,0 +1,523 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create an authorization rule for the specified topic. + /// + /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopicAuthorizationRule_CreateViaIdentityTopic", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create an authorization rule for the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720678.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityTopic : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule _parameter; + + /// Description of a namespace authorization rule. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of a namespace authorization rule.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Description of a namespace authorization rule.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _topicInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity TopicInputObject { get => this._topicInputObject; set => this._topicInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityTopic() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TopicsCreateOrUpdateAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (TopicInputObject?.Id != null) + { + this.TopicInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TopicsCreateOrUpdateAuthorizationRuleViaIdentity(TopicInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == TopicInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + await this.Client.TopicsCreateOrUpdateAuthorizationRule(TopicInputObject.SubscriptionId ?? null, TopicInputObject.ResourceGroupName ?? null, TopicInputObject.NamespaceName ?? null, TopicInputObject.TopicName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityTopicExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityTopicExpanded.cs new file mode 100644 index 000000000000..e781bb54879e --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityTopicExpanded.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create an authorization rule for the specified topic. + /// + /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopicAuthorizationRule_CreateViaIdentityTopicExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create an authorization rule for the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720678.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityTopicExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Description of a namespace authorization rule. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbAuthorizationRule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The rights associated with the rule. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The rights associated with the rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The rights associated with the rule.", + SerializedName = @"rights", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + public string[] Rights { get => _parametersBody.Rights?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.Rights = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _topicInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity TopicInputObject { get => this._topicInputObject; set => this._topicInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the + /// cmdlet class. + /// + public NewAzServiceBusTopicAuthorizationRule_CreateViaIdentityTopicExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TopicsCreateOrUpdateAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (TopicInputObject?.Id != null) + { + this.TopicInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TopicsCreateOrUpdateAuthorizationRuleViaIdentity(TopicInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == TopicInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + await this.Client.TopicsCreateOrUpdateAuthorizationRule(TopicInputObject.SubscriptionId ?? null, TopicInputObject.ResourceGroupName ?? null, TopicInputObject.NamespaceName ?? null, TopicInputObject.TopicName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_Regenerate.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_Regenerate.cs index 35dd96a53e04..b1964e86573d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_Regenerate.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_Regenerate.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Regenerates primary or secondary connection strings for the topic. @@ -14,12 +16,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopicKey_Regenerate", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates primary or secondary connection strings for the topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720679.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusTopicKey_Regenerate : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class NewAzServiceBusTopicKey_Regenerate : global::System.Managem /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class NewAzServiceBusTopicKey_Regenerate : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -105,7 +127,7 @@ public partial class NewAzServiceBusTopicKey_Regenerate : global::System.Managem public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters _parameter; /// /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. @@ -116,13 +138,14 @@ public partial class NewAzServiceBusTopicKey_Regenerate : global::System.Managem ReadOnly = false, Description = @"Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -171,7 +194,8 @@ public partial class NewAzServiceBusTopicKey_Regenerate : global::System.Managem [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -194,24 +218,24 @@ public partial class NewAzServiceBusTopicKey_Regenerate : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -234,6 +258,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -298,8 +327,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -309,7 +363,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusTopicKey_Regenerate() { @@ -363,7 +417,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -376,12 +430,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.TopicsRegenerateKeys(ResourceGroupName, NamespaceName, TopicName, Name, SubscriptionId, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.TopicsRegenerateKeys(SubscriptionId, ResourceGroupName, NamespaceName, TopicName, Name, Parameter, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name,SubscriptionId=SubscriptionId,body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -419,12 +473,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -441,15 +495,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, Name=Name, SubscriptionId=SubscriptionId, body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, Name=Name, SubscriptionId=SubscriptionId, body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -459,12 +513,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -476,8 +530,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaIdentityNamespace.cs new file mode 100644 index 000000000000..5252be4bee4a --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaIdentityNamespace.cs @@ -0,0 +1,535 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Regenerates primary or secondary connection strings for the topic. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopicKey_RegenerateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates primary or secondary connection strings for the topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720679.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusTopicKey_RegenerateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters _parameter; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _topicName; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusTopicKey_RegenerateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TopicsRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.TopicName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TopicsRegenerateKeysViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.TopicsRegenerateKeys(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, TopicName, Name, Parameter, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { TopicName=TopicName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaIdentityNamespaceExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..5218a8c60058 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,550 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Regenerates primary or secondary connection strings for the topic. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopicKey_RegenerateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates primary or secondary connection strings for the topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720679.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusTopicKey_RegenerateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + /// + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.RegenerateAccessKeyParameters(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType", + SerializedName = @"key", + PossibleTypes = new [] { typeof(string) })] + public string Key { get => _parametersBody.Key ?? null; set => _parametersBody.Key = value; } + + /// The access key to regenerate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The access key to regenerate.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The access key to regenerate.", + SerializedName = @"keyType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + public string KeyType { get => _parametersBody.KeyType ?? null; set => _parametersBody.KeyType = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _topicName; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzServiceBusTopicKey_RegenerateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TopicsRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.TopicName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TopicsRegenerateKeysViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.TopicsRegenerateKeys(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, TopicName, Name, _parametersBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { TopicName=TopicName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaIdentityTopic.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaIdentityTopic.cs new file mode 100644 index 000000000000..b3f984c09403 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaIdentityTopic.cs @@ -0,0 +1,525 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Regenerates primary or secondary connection strings for the topic. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopicKey_RegenerateViaIdentityTopic", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates primary or secondary connection strings for the topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720679.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusTopicKey_RegenerateViaIdentityTopic : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters _parameter; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _topicInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity TopicInputObject { get => this._topicInputObject; set => this._topicInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusTopicKey_RegenerateViaIdentityTopic() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TopicsRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (TopicInputObject?.Id != null) + { + this.TopicInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TopicsRegenerateKeysViaIdentity(TopicInputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == TopicInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + await this.Client.TopicsRegenerateKeys(TopicInputObject.SubscriptionId ?? null, TopicInputObject.ResourceGroupName ?? null, TopicInputObject.NamespaceName ?? null, TopicInputObject.TopicName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaIdentityTopicExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaIdentityTopicExpanded.cs new file mode 100644 index 000000000000..19537356fc89 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaIdentityTopicExpanded.cs @@ -0,0 +1,539 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Regenerates primary or secondary connection strings for the topic. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopicKey_RegenerateViaIdentityTopicExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates primary or secondary connection strings for the topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720679.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusTopicKey_RegenerateViaIdentityTopicExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + /// + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.RegenerateAccessKeyParameters(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType", + SerializedName = @"key", + PossibleTypes = new [] { typeof(string) })] + public string Key { get => _parametersBody.Key ?? null; set => _parametersBody.Key = value; } + + /// The access key to regenerate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The access key to regenerate.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The access key to regenerate.", + SerializedName = @"keyType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + public string KeyType { get => _parametersBody.KeyType ?? null; set => _parametersBody.KeyType = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _topicInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity TopicInputObject { get => this._topicInputObject; set => this._topicInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusTopicKey_RegenerateViaIdentityTopicExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TopicsRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (TopicInputObject?.Id != null) + { + this.TopicInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TopicsRegenerateKeysViaIdentity(TopicInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == TopicInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + await this.Client.TopicsRegenerateKeys(TopicInputObject.SubscriptionId ?? null, TopicInputObject.ResourceGroupName ?? null, TopicInputObject.NamespaceName ?? null, TopicInputObject.TopicName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaJsonFilePath.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaJsonFilePath.cs new file mode 100644 index 000000000000..86c31df4c43e --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaJsonFilePath.cs @@ -0,0 +1,556 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Regenerates primary or secondary connection strings for the topic. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopicKey_RegenerateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates primary or secondary connection strings for the topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720679.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.NotSuggestDefaultParameterSet] + public partial class NewAzServiceBusTopicKey_RegenerateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Regenerate operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Regenerate operation")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Regenerate operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _namespaceName; + + /// The namespace name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The namespace name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The namespace name", + SerializedName = @"namespaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private string _topicName; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusTopicKey_RegenerateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TopicsRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TopicsRegenerateKeysViaJsonString(SubscriptionId, ResourceGroupName, NamespaceName, TopicName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaJsonString.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaJsonString.cs new file mode 100644 index 000000000000..33efc38522cf --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopicKey_RegenerateViaJsonString.cs @@ -0,0 +1,554 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Regenerates primary or secondary connection strings for the topic. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopicKey_RegenerateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Regenerates primary or secondary connection strings for the topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720679.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2022-10-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.NotSuggestDefaultParameterSet] + public partial class NewAzServiceBusTopicKey_RegenerateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Regenerate operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Regenerate operation")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Regenerate operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _namespaceName; + + /// The namespace name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The namespace name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The namespace name", + SerializedName = @"namespaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private string _topicName; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusTopicKey_RegenerateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TopicsRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TopicsRegenerateKeysViaJsonString(SubscriptionId, ResourceGroupName, NamespaceName, TopicName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopic_CreateExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopic_CreateExpanded.cs index 444c646a15e7..c07a90728ceb 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopic_CreateExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopic_CreateExpanded.cs @@ -6,19 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates a topic in the specified namespace. + /// Create a topic in the specified namespace. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopic_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates a topic in the specified namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a topic in the specified namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusTopic_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,8 +38,20 @@ public partial class NewAzServiceBusTopic_CreateExpanded : global::System.Manage /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Description of topic resource. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.SbTopic(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbTopic(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// /// Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes. @@ -55,6 +71,9 @@ public partial class NewAzServiceBusTopic_CreateExpanded : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -133,6 +152,9 @@ public partial class NewAzServiceBusTopic_CreateExpanded : global::System.Manage PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter EnablePartitioning { get => _parametersBody.EnablePartitioning ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.EnablePartitioning = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -215,7 +237,7 @@ public partial class NewAzServiceBusTopic_CreateExpanded : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -266,10 +288,9 @@ public partial class NewAzServiceBusTopic_CreateExpanded : global::System.Manage ReadOnly = false, Description = @"Enumerates the possible values for the status of a messaging entity.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus) })] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.ParameterBreakingChange("Status", "12.0.0", "4.0.0", "2024/05/21", OldParamaterType="EntityStatus", NewParameterType="String")] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus))] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus Status { get => _parametersBody.Status ?? ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus)""); set => _parametersBody.Status = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + public string Status { get => _parametersBody.Status ?? null; set => _parametersBody.Status = value; } /// Backing field for property. private string _subscriptionId; @@ -288,7 +309,8 @@ public partial class NewAzServiceBusTopic_CreateExpanded : global::System.Manage [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -308,24 +330,24 @@ public partial class NewAzServiceBusTopic_CreateExpanded : global::System.Manage /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -348,6 +370,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -412,8 +439,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -423,7 +475,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusTopic_CreateExpanded() { @@ -477,7 +529,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -490,12 +542,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.TopicsCreateOrUpdate(ResourceGroupName, NamespaceName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.TopicsCreateOrUpdate(SubscriptionId, ResourceGroupName, NamespaceName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -533,12 +585,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -555,15 +607,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -573,12 +625,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -590,8 +642,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopic_CreateViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopic_CreateViaIdentity.cs index 8d2e8c647877..6b628796dfc4 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopic_CreateViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopic_CreateViaIdentity.cs @@ -6,20 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; - /// Creates a topic in the specified namespace. + /// Create a topic in the specified namespace. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopic_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates a topic in the specified namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a topic in the specified namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzServiceBusTopic_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class NewAzServiceBusTopic_CreateViaIdentity : global::System.Man /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class NewAzServiceBusTopic_CreateViaIdentity : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +107,7 @@ public partial class NewAzServiceBusTopic_CreateViaIdentity : global::System.Man global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic _parameter; /// Description of topic resource. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of topic resource.", ValueFromPipeline = true)] @@ -94,13 +116,14 @@ public partial class NewAzServiceBusTopic_CreateViaIdentity : global::System.Man ReadOnly = false, Description = @"Description of topic resource.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,24 +146,24 @@ public partial class NewAzServiceBusTopic_CreateViaIdentity : global::System.Man /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +186,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +255,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -238,7 +291,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzServiceBusTopic_CreateViaIdentity() { @@ -292,7 +345,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,11 +360,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.TopicsCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.TopicsCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -324,17 +381,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.TopicsCreateOrUpdate(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.TopicsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -372,12 +425,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -394,15 +447,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -412,12 +465,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -429,8 +482,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopic_CreateViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopic_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..f676b0d0f784 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopic_CreateViaIdentityNamespace.cs @@ -0,0 +1,519 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create a topic in the specified namespace. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopic_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a topic in the specified namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusTopic_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TopicName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic _parameter; + + /// Description of topic resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of topic resource.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Description of topic resource.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusTopic_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TopicsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TopicsCreateOrUpdateViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.TopicsCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopic_CreateViaIdentityNamespaceExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopic_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..26b529a44bb1 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/NewAzServiceBusTopic_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,647 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Create a topic in the specified namespace. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzServiceBusTopic_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create a topic in the specified namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}", ApiVersion = "2022-10-01-preview")] + public partial class NewAzServiceBusTopic_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Description of topic resource. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.SbTopic(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// + /// Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.", + SerializedName = @"autoDeleteOnIdle", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + public global::System.TimeSpan AutoDeleteOnIdle { get => _parametersBody.AutoDeleteOnIdle ?? default(global::System.TimeSpan); set => _parametersBody.AutoDeleteOnIdle = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the + /// default value used when TimeToLive is not set on a message itself. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.", + SerializedName = @"defaultMessageTimeToLive", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + public global::System.TimeSpan DefaultMessageTimeToLive { get => _parametersBody.DefaultMessageTimeToLive ?? default(global::System.TimeSpan); set => _parametersBody.DefaultMessageTimeToLive = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Defines the duration of the duplicate detection history. The default value is 10 minutes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines the duration of the duplicate detection history. The default value is 10 minutes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the duration of the duplicate detection history. The default value is 10 minutes.", + SerializedName = @"duplicateDetectionHistoryTimeWindow", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + public global::System.TimeSpan DuplicateDetectionHistoryTimeWindow { get => _parametersBody.DuplicateDetectionHistoryTimeWindow ?? default(global::System.TimeSpan); set => _parametersBody.DuplicateDetectionHistoryTimeWindow = value; } + + /// Value that indicates whether server-side batched operations are enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether server-side batched operations are enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether server-side batched operations are enabled.", + SerializedName = @"enableBatchedOperations", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter EnableBatchedOperations { get => _parametersBody.EnableBatchedOperations ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.EnableBatchedOperations = value; } + + /// + /// Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before + /// writing it to persistent storage. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.", + SerializedName = @"enableExpress", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter EnableExpress { get => _parametersBody.EnableExpress ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.EnableExpress = value; } + + /// + /// Value that indicates whether the topic to be partitioned across multiple message brokers is enabled. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether the topic to be partitioned across multiple message brokers is enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether the topic to be partitioned across multiple message brokers is enabled.", + SerializedName = @"enablePartitioning", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter EnablePartitioning { get => _parametersBody.EnablePartitioning ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.EnablePartitioning = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today + /// and default is 1024. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024.", + SerializedName = @"maxMessageSizeInKilobytes", + PossibleTypes = new [] { typeof(long) })] + public long MaxMessageSizeInKilobytes { get => _parametersBody.MaxMessageSizeInKilobytes ?? default(long); set => _parametersBody.MaxMessageSizeInKilobytes = value; } + + /// + /// Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024.", + SerializedName = @"maxSizeInMegabytes", + PossibleTypes = new [] { typeof(int) })] + public int MaxSizeInMegabytes { get => _parametersBody.MaxSizeInMegabytes ?? default(int); set => _parametersBody.MaxSizeInMegabytes = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TopicName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Value indicating if this topic requires duplicate detection. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value indicating if this topic requires duplicate detection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value indicating if this topic requires duplicate detection.", + SerializedName = @"requiresDuplicateDetection", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter RequiresDuplicateDetection { get => _parametersBody.RequiresDuplicateDetection ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.RequiresDuplicateDetection = value; } + + /// Enumerates the possible values for the status of a messaging entity. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enumerates the possible values for the status of a messaging entity.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enumerates the possible values for the status of a messaging entity.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + public string Status { get => _parametersBody.Status ?? null; set => _parametersBody.Status = value; } + + /// Value that indicates whether the topic supports ordering. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value that indicates whether the topic supports ordering.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value that indicates whether the topic supports ordering.", + SerializedName = @"supportOrdering", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter SupportOrdering { get => _parametersBody.SupportOrdering ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.SupportOrdering = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzServiceBusTopic_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TopicsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TopicsCreateOrUpdateViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.TopicsCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusGeoDRConfiguration_Delete.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusGeoDRConfiguration_Delete.cs index 6f8926058b76..06c6817fe572 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusGeoDRConfiguration_Delete.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusGeoDRConfiguration_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes an Alias(Disaster Recovery configuration) @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusGeoDRConfiguration_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzServiceBusGeoDRConfiguration_Delete : global::Syste /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzServiceBusGeoDRConfiguration_Delete : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -113,7 +134,7 @@ public partial class RemoveAzServiceBusGeoDRConfiguration_Delete : global::Syste /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -162,7 +183,8 @@ public partial class RemoveAzServiceBusGeoDRConfiguration_Delete : global::Syste [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -171,12 +193,12 @@ public partial class RemoveAzServiceBusGeoDRConfiguration_Delete : global::Syste /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -219,6 +241,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -283,8 +310,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -340,7 +392,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -353,12 +405,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsDelete(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsDelete(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -371,7 +423,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusGeoDRConfiguration_Delete() { @@ -404,12 +456,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,15 +478,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusGeoDRConfiguration_DeleteViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusGeoDRConfiguration_DeleteViaIdentity.cs index 4d8063804fe8..54944b602eee 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusGeoDRConfiguration_DeleteViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusGeoDRConfiguration_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes an Alias(Disaster Recovery configuration) @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusGeoDRConfiguration_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzServiceBusGeoDRConfiguration_DeleteViaIdentity : gl /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzServiceBusGeoDRConfiguration_DeleteViaIdentity : gl [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -93,7 +114,7 @@ public partial class RemoveAzServiceBusGeoDRConfiguration_DeleteViaIdentity : gl /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -116,12 +137,12 @@ public partial class RemoveAzServiceBusGeoDRConfiguration_DeleteViaIdentity : gl /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -164,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -228,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -285,7 +336,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -305,6 +356,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -317,17 +372,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Alias"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DisasterRecoveryConfigsDelete(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -340,7 +391,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusGeoDRConfiguration_DeleteViaIdentity() { @@ -373,12 +424,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -395,7 +446,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusGeoDRConfiguration_DeleteViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusGeoDRConfiguration_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..bc6c40757e59 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusGeoDRConfiguration_DeleteViaIdentityNamespace.cs @@ -0,0 +1,525 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Deletes an Alias(Disaster Recovery configuration) + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusGeoDRConfiguration_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes an Alias(Disaster Recovery configuration)")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2022-10-01-preview")] + public partial class RemoveAzServiceBusGeoDRConfiguration_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/disasterRecoveryConfigs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsDeleteViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.DisasterRecoveryConfigsDelete(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public RemoveAzServiceBusGeoDRConfiguration_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusMigration_Delete.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusMigration_Delete.cs index 78c22924f2dd..808a2e93d2db 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusMigration_Delete.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusMigration_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes a MigrationConfiguration @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusMigration_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzServiceBusMigration_Delete : global::System.Managem /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzServiceBusMigration_Delete : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -99,7 +120,7 @@ public partial class RemoveAzServiceBusMigration_Delete : global::System.Managem /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -148,7 +169,8 @@ public partial class RemoveAzServiceBusMigration_Delete : global::System.Managem [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -157,12 +179,12 @@ public partial class RemoveAzServiceBusMigration_Delete : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -205,6 +227,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -269,8 +296,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -326,7 +378,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -339,12 +391,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.MigrationConfigsDelete(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.MigrationConfigsDelete(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -357,7 +409,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusMigration_Delete() { @@ -390,12 +442,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,15 +464,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusMigration_DeleteViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusMigration_DeleteViaIdentity.cs index b8f3358801e1..45cfa8b8682b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusMigration_DeleteViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusMigration_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes a MigrationConfiguration @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusMigration_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzServiceBusMigration_DeleteViaIdentity : global::Sys /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzServiceBusMigration_DeleteViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -93,7 +114,7 @@ public partial class RemoveAzServiceBusMigration_DeleteViaIdentity : global::Sys /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -116,12 +137,12 @@ public partial class RemoveAzServiceBusMigration_DeleteViaIdentity : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -164,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -228,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -285,7 +336,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -305,6 +356,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -313,17 +368,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.MigrationConfigsDelete(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.MigrationConfigsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -336,7 +387,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusMigration_DeleteViaIdentity() { @@ -369,12 +420,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -391,7 +442,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespaceAuthorizationRule_Delete.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespaceAuthorizationRule_Delete.cs index c4591e9fad1a..edba351a4e8a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespaceAuthorizationRule_Delete.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespaceAuthorizationRule_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes a namespace authorization rule. @@ -16,10 +18,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusNamespaceAuthorizationRule_Delete", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a namespace authorization rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639417.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusNamespaceAuthorizationRule_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class RemoveAzServiceBusNamespaceAuthorizationRule_Delete : globa /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class RemoveAzServiceBusNamespaceAuthorizationRule_Delete : globa [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -114,7 +136,7 @@ public partial class RemoveAzServiceBusNamespaceAuthorizationRule_Delete : globa /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -163,7 +185,8 @@ public partial class RemoveAzServiceBusNamespaceAuthorizationRule_Delete : globa [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -172,12 +195,12 @@ public partial class RemoveAzServiceBusNamespaceAuthorizationRule_Delete : globa /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -220,6 +243,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -284,8 +312,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -341,7 +394,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -354,12 +407,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesDeleteAuthorizationRule(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.NamespacesDeleteAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -372,7 +425,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusNamespaceAuthorizationRule_Delete() { @@ -405,12 +458,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,15 +480,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespaceAuthorizationRule_DeleteViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespaceAuthorizationRule_DeleteViaIdentity.cs index befb2ae86f01..815dc8330fb8 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespaceAuthorizationRule_DeleteViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespaceAuthorizationRule_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes a namespace authorization rule. @@ -16,10 +18,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusNamespaceAuthorizationRule_DeleteViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a namespace authorization rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639417.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusNamespaceAuthorizationRule_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class RemoveAzServiceBusNamespaceAuthorizationRule_DeleteViaIdent /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class RemoveAzServiceBusNamespaceAuthorizationRule_DeleteViaIdent [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -94,7 +116,7 @@ public partial class RemoveAzServiceBusNamespaceAuthorizationRule_DeleteViaIdent /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -117,12 +139,12 @@ public partial class RemoveAzServiceBusNamespaceAuthorizationRule_DeleteViaIdent /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -165,6 +187,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -229,8 +256,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -286,7 +338,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -306,6 +358,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -318,17 +374,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesDeleteAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.NamespacesDeleteAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.AuthorizationRuleName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -341,7 +393,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet + /// Initializes a new instance of the cmdlet /// class. /// public RemoveAzServiceBusNamespaceAuthorizationRule_DeleteViaIdentity() @@ -375,12 +427,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -397,7 +449,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespaceAuthorizationRule_DeleteViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespaceAuthorizationRule_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..919f11d7a6c3 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespaceAuthorizationRule_DeleteViaIdentityNamespace.cs @@ -0,0 +1,527 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Deletes a namespace authorization rule. + /// + /// [OpenAPI] DeleteAuthorizationRule=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusNamespaceAuthorizationRule_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a namespace authorization rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639417.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class RemoveAzServiceBusNamespaceAuthorizationRule_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'NamespacesDeleteAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/AuthorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.NamespacesDeleteAuthorizationRuleViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.NamespacesDeleteAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzServiceBusNamespaceAuthorizationRule_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespace_Delete.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespace_Delete.cs index f66db6712b29..fd9d0e9c29c5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespace_Delete.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespace_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// @@ -18,10 +20,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::System.Management.Automation.Alias("Remove-AzServiceBusNamespaceV2")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes an existing namespace. This operation also removes all associated resources under the namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusNamespace_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,6 +41,18 @@ public partial class RemoveAzServiceBusNamespace_Delete : global::System.Managem /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] @@ -47,6 +63,9 @@ public partial class RemoveAzServiceBusNamespace_Delete : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -60,6 +79,9 @@ public partial class RemoveAzServiceBusNamespace_Delete : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -116,7 +138,7 @@ public partial class RemoveAzServiceBusNamespace_Delete : global::System.Managem /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -165,7 +187,8 @@ public partial class RemoveAzServiceBusNamespace_Delete : global::System.Managem [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -174,12 +197,12 @@ public partial class RemoveAzServiceBusNamespace_Delete : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -236,15 +259,20 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets.RemoveAzServiceBusN clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; clone.ResourceGroupName = this.ResourceGroupName; clone.Name = this.Name; - clone.SubscriptionId = this.SubscriptionId; return clone; } /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -309,11 +337,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -325,10 +378,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -396,7 +465,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -409,12 +478,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesDelete(ResourceGroupName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.NamespacesDelete(SubscriptionId, ResourceGroupName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -427,7 +496,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusNamespace_Delete() { @@ -460,12 +529,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -482,15 +551,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespace_DeleteViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespace_DeleteViaIdentity.cs index 7310f0a91c1e..263d4f020d17 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespace_DeleteViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusNamespace_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// @@ -18,10 +20,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::System.Management.Automation.Alias("Remove-AzServiceBusNamespaceV2")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes an existing namespace. This operation also removes all associated resources under the namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusNamespace_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,6 +41,18 @@ public partial class RemoveAzServiceBusNamespace_DeleteViaIdentity : global::Sys /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] @@ -47,6 +63,9 @@ public partial class RemoveAzServiceBusNamespace_DeleteViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -60,6 +79,9 @@ public partial class RemoveAzServiceBusNamespace_DeleteViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -109,7 +131,7 @@ public partial class RemoveAzServiceBusNamespace_DeleteViaIdentity : global::Sys /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -132,12 +154,12 @@ public partial class RemoveAzServiceBusNamespace_DeleteViaIdentity : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -200,6 +222,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets.RemoveAzServiceBusN /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -264,11 +291,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -280,10 +332,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -351,7 +419,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -371,6 +439,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -379,17 +451,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesDelete(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.NamespacesDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -402,7 +470,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusNamespace_DeleteViaIdentity() { @@ -435,12 +503,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -457,7 +525,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusPrivateEndpointConnection_Delete.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusPrivateEndpointConnection_Delete.cs index 1432fe18ab1f..e27b63c403ae 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusPrivateEndpointConnection_Delete.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusPrivateEndpointConnection_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes an existing Private Endpoint Connection. @@ -15,10 +17,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusPrivateEndpointConnection_Delete", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes an existing Private Endpoint Connection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusPrivateEndpointConnection_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,6 +38,18 @@ public partial class RemoveAzServiceBusPrivateEndpointConnection_Delete : global /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] @@ -44,6 +60,9 @@ public partial class RemoveAzServiceBusPrivateEndpointConnection_Delete : global [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -57,6 +76,9 @@ public partial class RemoveAzServiceBusPrivateEndpointConnection_Delete : global [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -127,7 +149,7 @@ public partial class RemoveAzServiceBusPrivateEndpointConnection_Delete : global /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -176,7 +198,8 @@ public partial class RemoveAzServiceBusPrivateEndpointConnection_Delete : global [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -185,12 +208,12 @@ public partial class RemoveAzServiceBusPrivateEndpointConnection_Delete : global /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -247,9 +270,9 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets.RemoveAzServiceBusP clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; clone.ResourceGroupName = this.ResourceGroupName; clone.NamespaceName = this.NamespaceName; - clone.SubscriptionId = this.SubscriptionId; clone.Name = this.Name; return clone; } @@ -257,6 +280,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets.RemoveAzServiceBusP /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -321,11 +349,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -337,10 +390,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -408,7 +477,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -421,12 +490,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PrivateEndpointConnectionsDelete(ResourceGroupName, NamespaceName, SubscriptionId, Name, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.PrivateEndpointConnectionsDelete(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -439,7 +508,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusPrivateEndpointConnection_Delete() { @@ -472,12 +541,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -494,15 +563,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, Name=Name }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdentity.cs index 22f023671c91..03500277f0ba 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes an existing Private Endpoint Connection. @@ -15,10 +17,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusPrivateEndpointConnection_DeleteViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes an existing Private Endpoint Connection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,6 +38,18 @@ public partial class RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdenti /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] @@ -44,6 +60,9 @@ public partial class RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdenti [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -57,6 +76,9 @@ public partial class RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdenti [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -106,7 +128,7 @@ public partial class RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdenti /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -129,12 +151,12 @@ public partial class RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdenti /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -199,6 +221,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets.RemoveAzServiceBusP /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -263,11 +290,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -279,10 +331,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -350,7 +418,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -370,6 +438,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -378,21 +450,17 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } if (null == InputObject.PrivateEndpointConnectionName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateEndpointConnectionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.PrivateEndpointConnectionsDelete(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, InputObject.PrivateEndpointConnectionName ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.PrivateEndpointConnectionsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.PrivateEndpointConnectionName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -405,7 +473,8 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet + /// class. /// public RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdentity() { @@ -438,12 +507,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -460,7 +529,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..f6e496d33abd --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdentityNamespace.cs @@ -0,0 +1,609 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Deletes an existing Private Endpoint Connection. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusPrivateEndpointConnection_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes an existing Private Endpoint Connection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2022-10-01-preview")] + public partial class RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The PrivateEndpointConnection name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The PrivateEndpointConnection name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The PrivateEndpointConnection name", + SerializedName = @"privateEndpointConnectionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("PrivateEndpointConnectionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdentityNamespace + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets.RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdentityNamespace Clone() + { + var clone = new RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdentityNamespace(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'PrivateEndpointConnectionsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/privateEndpointConnections/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.PrivateEndpointConnectionsDeleteViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.PrivateEndpointConnectionsDelete(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the + /// cmdlet class. + /// + public RemoveAzServiceBusPrivateEndpointConnection_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueueAuthorizationRule_Delete.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueueAuthorizationRule_Delete.cs index b9302accb2fc..763a3dc612c0 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueueAuthorizationRule_Delete.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueueAuthorizationRule_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes a queue authorization rule. @@ -16,10 +18,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusQueueAuthorizationRule_Delete", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a queue authorization rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705609.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusQueueAuthorizationRule_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class RemoveAzServiceBusQueueAuthorizationRule_Delete : global::S /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class RemoveAzServiceBusQueueAuthorizationRule_Delete : global::S [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -114,7 +136,7 @@ public partial class RemoveAzServiceBusQueueAuthorizationRule_Delete : global::S /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -177,7 +199,8 @@ public partial class RemoveAzServiceBusQueueAuthorizationRule_Delete : global::S [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -186,12 +209,12 @@ public partial class RemoveAzServiceBusQueueAuthorizationRule_Delete : global::S /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -234,6 +257,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -298,8 +326,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -355,7 +408,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -368,12 +421,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.QueuesDeleteAuthorizationRule(ResourceGroupName, NamespaceName, QueueName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.QueuesDeleteAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, QueueName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,QueueName=QueueName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,QueueName=QueueName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -386,7 +439,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusQueueAuthorizationRule_Delete() { @@ -419,12 +472,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -441,15 +494,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, QueueName=QueueName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, QueueName=QueueName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentity.cs index d5b8f37a2d48..4c8e11ec964b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes a queue authorization rule. @@ -16,10 +18,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusQueueAuthorizationRule_DeleteViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a queue authorization rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705609.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentity /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentity [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -94,7 +116,7 @@ public partial class RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentity /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -117,12 +139,12 @@ public partial class RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentity /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -165,6 +187,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -229,8 +256,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -286,7 +338,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -306,6 +358,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -322,17 +378,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.QueuesDeleteAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.QueueName ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.QueuesDeleteAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.QueueName ?? null, InputObject.AuthorizationRuleName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -345,7 +397,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentity() { @@ -378,12 +430,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -400,7 +452,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..39125d60f025 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentityNamespace.cs @@ -0,0 +1,541 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Deletes a queue authorization rule. + /// + /// [OpenAPI] DeleteAuthorizationRule=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusQueueAuthorizationRule_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a queue authorization rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705609.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _queueName; + + /// The queue name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The queue name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The queue name.", + SerializedName = @"queueName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string QueueName { get => this._queueName; set => this._queueName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'QueuesDeleteAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/queues/{(global::System.Uri.EscapeDataString(this.QueueName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.QueuesDeleteAuthorizationRuleViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.QueuesDeleteAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, QueueName, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { QueueName=QueueName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentityQueue.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentityQueue.cs new file mode 100644 index 000000000000..01e078aca29f --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentityQueue.cs @@ -0,0 +1,531 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Deletes a queue authorization rule. + /// + /// [OpenAPI] DeleteAuthorizationRule=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusQueueAuthorizationRule_DeleteViaIdentityQueue", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a queue authorization rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt705609.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentityQueue : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _queueInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity QueueInputObject { get => this._queueInputObject; set => this._queueInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'QueuesDeleteAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (QueueInputObject?.Id != null) + { + this.QueueInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.QueuesDeleteAuthorizationRuleViaIdentity(QueueInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == QueueInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + if (null == QueueInputObject.QueueName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("QueueInputObject has null value for QueueInputObject.QueueName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, QueueInputObject) ); + } + await this.Client.QueuesDeleteAuthorizationRule(QueueInputObject.SubscriptionId ?? null, QueueInputObject.ResourceGroupName ?? null, QueueInputObject.NamespaceName ?? null, QueueInputObject.QueueName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public RemoveAzServiceBusQueueAuthorizationRule_DeleteViaIdentityQueue() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueue_Delete.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueue_Delete.cs index c646a2cbed0b..972a1001e077 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueue_Delete.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueue_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes a queue from the specified namespace in a resource group. @@ -15,10 +17,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusQueue_Delete", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a queue from the specified namespace in a resource group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639411.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusQueue_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class RemoveAzServiceBusQueue_Delete : global::System.Management. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +71,9 @@ public partial class RemoveAzServiceBusQueue_Delete : global::System.Management. [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -114,7 +136,7 @@ public partial class RemoveAzServiceBusQueue_Delete : global::System.Management. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -163,7 +185,8 @@ public partial class RemoveAzServiceBusQueue_Delete : global::System.Management. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -172,12 +195,12 @@ public partial class RemoveAzServiceBusQueue_Delete : global::System.Management. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -220,6 +243,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -284,8 +312,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -341,7 +394,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -354,12 +407,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.QueuesDelete(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.QueuesDelete(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -372,7 +425,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusQueue_Delete() { @@ -405,12 +458,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,15 +480,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueue_DeleteViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueue_DeleteViaIdentity.cs index d9e72b94f5cc..aeb42ae15f85 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueue_DeleteViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueue_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes a queue from the specified namespace in a resource group. @@ -15,10 +17,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusQueue_DeleteViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a queue from the specified namespace in a resource group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639411.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusQueue_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class RemoveAzServiceBusQueue_DeleteViaIdentity : global::System. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +71,9 @@ public partial class RemoveAzServiceBusQueue_DeleteViaIdentity : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -93,7 +115,7 @@ public partial class RemoveAzServiceBusQueue_DeleteViaIdentity : global::System. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -116,12 +138,12 @@ public partial class RemoveAzServiceBusQueue_DeleteViaIdentity : global::System. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -164,6 +186,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -228,8 +255,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -285,7 +337,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -305,6 +357,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -317,17 +373,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.QueueName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.QueuesDelete(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.QueueName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.QueuesDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.QueueName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -340,7 +392,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusQueue_DeleteViaIdentity() { @@ -373,12 +425,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -395,7 +447,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueue_DeleteViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueue_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..b243d2213195 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusQueue_DeleteViaIdentityNamespace.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Deletes a queue from the specified namespace in a resource group. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusQueue_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a queue from the specified namespace in a resource group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639411.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}", ApiVersion = "2022-10-01-preview")] + public partial class RemoveAzServiceBusQueue_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The queue name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The queue name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The queue name.", + SerializedName = @"queueName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("QueueName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'QueuesDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/queues/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.QueuesDeleteViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.QueuesDelete(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzServiceBusQueue_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_Delete.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_Delete.cs index cfc58023541f..704d748d518d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_Delete.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes an existing rule. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusRule_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzServiceBusRule_Delete : global::System.Management.A /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzServiceBusRule_Delete : global::System.Management.A [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -114,7 +135,7 @@ public partial class RemoveAzServiceBusRule_Delete : global::System.Management.A /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -163,7 +184,8 @@ public partial class RemoveAzServiceBusRule_Delete : global::System.Management.A [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -200,12 +222,12 @@ public partial class RemoveAzServiceBusRule_Delete : global::System.Management.A /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -248,6 +270,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -312,8 +339,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -369,7 +421,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -382,12 +434,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.RulesDelete(ResourceGroupName, NamespaceName, TopicName, SubscriptionName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.RulesDelete(SubscriptionId, ResourceGroupName, NamespaceName, TopicName, SubscriptionName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,SubscriptionName=SubscriptionName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,SubscriptionName=SubscriptionName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -400,7 +452,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusRule_Delete() { @@ -433,12 +485,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -455,15 +507,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, SubscriptionName=SubscriptionName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, SubscriptionName=SubscriptionName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_DeleteViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_DeleteViaIdentity.cs index 3b76143bc1af..12651670630f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_DeleteViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes an existing rule. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusRule_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzServiceBusRule_DeleteViaIdentity : global::System.M /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzServiceBusRule_DeleteViaIdentity : global::System.M [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -93,7 +114,7 @@ public partial class RemoveAzServiceBusRule_DeleteViaIdentity : global::System.M /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -116,12 +137,12 @@ public partial class RemoveAzServiceBusRule_DeleteViaIdentity : global::System.M /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -164,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -228,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -285,7 +336,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -305,6 +356,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -325,17 +380,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.RuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.RulesDelete(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.SubscriptionName ?? null, InputObject.RuleName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.RulesDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.SubscriptionName ?? null, InputObject.RuleName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -348,7 +399,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusRule_DeleteViaIdentity() { @@ -381,12 +432,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -403,7 +454,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_DeleteViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..ebaed9ca301a --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_DeleteViaIdentityNamespace.cs @@ -0,0 +1,553 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Deletes an existing rule. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusRule_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes an existing rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] + public partial class RemoveAzServiceBusRule_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The rule name.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionName; + + /// The subscription name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The subscription name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The subscription name.", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionName { get => this._subscriptionName; set => this._subscriptionName = value; } + + /// Backing field for property. + private string _topicName; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RulesDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.TopicName.ToString()))}/subscriptions/{(global::System.Uri.EscapeDataString(this.SubscriptionName.ToString()))}/rules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.RulesDeleteViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.RulesDelete(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, TopicName, SubscriptionName, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { TopicName=TopicName,SubscriptionName=SubscriptionName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzServiceBusRule_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_DeleteViaIdentitySubscription.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_DeleteViaIdentitySubscription.cs new file mode 100644 index 000000000000..af2a2fca2290 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_DeleteViaIdentitySubscription.cs @@ -0,0 +1,533 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Deletes an existing rule. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusRule_DeleteViaIdentitySubscription", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes an existing rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] + public partial class RemoveAzServiceBusRule_DeleteViaIdentitySubscription : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The rule name.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _subscriptionInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity SubscriptionInputObject { get => this._subscriptionInputObject; set => this._subscriptionInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RulesDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (SubscriptionInputObject?.Id != null) + { + this.SubscriptionInputObject.Id += $"/rules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.RulesDeleteViaIdentity(SubscriptionInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == SubscriptionInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + if (null == SubscriptionInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + if (null == SubscriptionInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + if (null == SubscriptionInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + if (null == SubscriptionInputObject.SubscriptionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("SubscriptionInputObject has null value for SubscriptionInputObject.SubscriptionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, SubscriptionInputObject) ); + } + await this.Client.RulesDelete(SubscriptionInputObject.SubscriptionId ?? null, SubscriptionInputObject.ResourceGroupName ?? null, SubscriptionInputObject.NamespaceName ?? null, SubscriptionInputObject.TopicName ?? null, SubscriptionInputObject.SubscriptionName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzServiceBusRule_DeleteViaIdentitySubscription() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_DeleteViaIdentityTopic.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_DeleteViaIdentityTopic.cs new file mode 100644 index 000000000000..3c9ea11c0360 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusRule_DeleteViaIdentityTopic.cs @@ -0,0 +1,543 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Deletes an existing rule. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusRule_DeleteViaIdentityTopic", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes an existing rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", ApiVersion = "2022-10-01-preview")] + public partial class RemoveAzServiceBusRule_DeleteViaIdentityTopic : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The rule name.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionName; + + /// The subscription name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The subscription name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The subscription name.", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionName { get => this._subscriptionName; set => this._subscriptionName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _topicInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity TopicInputObject { get => this._topicInputObject; set => this._topicInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RulesDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (TopicInputObject?.Id != null) + { + this.TopicInputObject.Id += $"/subscriptions/{(global::System.Uri.EscapeDataString(this.SubscriptionName.ToString()))}/rules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.RulesDeleteViaIdentity(TopicInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == TopicInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + await this.Client.RulesDelete(TopicInputObject.SubscriptionId ?? null, TopicInputObject.ResourceGroupName ?? null, TopicInputObject.NamespaceName ?? null, TopicInputObject.TopicName ?? null, SubscriptionName, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionName=SubscriptionName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzServiceBusRule_DeleteViaIdentityTopic() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusSubscription_Delete.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusSubscription_Delete.cs index a03fb062d8a1..a8dcbe09cc94 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusSubscription_Delete.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusSubscription_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes a subscription from the specified topic. @@ -15,10 +17,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusSubscription_Delete", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a subscription from the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639381.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusSubscription_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class RemoveAzServiceBusSubscription_Delete : global::System.Mana /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +71,9 @@ public partial class RemoveAzServiceBusSubscription_Delete : global::System.Mana [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -114,7 +136,7 @@ public partial class RemoveAzServiceBusSubscription_Delete : global::System.Mana /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -163,7 +185,8 @@ public partial class RemoveAzServiceBusSubscription_Delete : global::System.Mana [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -186,12 +209,12 @@ public partial class RemoveAzServiceBusSubscription_Delete : global::System.Mana /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -234,6 +257,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -298,8 +326,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -355,7 +408,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -368,12 +421,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SubscriptionsDelete(ResourceGroupName, NamespaceName, TopicName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.SubscriptionsDelete(SubscriptionId, ResourceGroupName, NamespaceName, TopicName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -386,7 +439,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusSubscription_Delete() { @@ -419,12 +472,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -441,15 +494,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusSubscription_DeleteViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusSubscription_DeleteViaIdentity.cs index 833af51b9c49..d37fb0e87000 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusSubscription_DeleteViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusSubscription_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes a subscription from the specified topic. @@ -15,10 +17,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusSubscription_DeleteViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a subscription from the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639381.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusSubscription_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class RemoveAzServiceBusSubscription_DeleteViaIdentity : global:: /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +71,9 @@ public partial class RemoveAzServiceBusSubscription_DeleteViaIdentity : global:: [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -93,7 +115,7 @@ public partial class RemoveAzServiceBusSubscription_DeleteViaIdentity : global:: /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -116,12 +138,12 @@ public partial class RemoveAzServiceBusSubscription_DeleteViaIdentity : global:: /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -164,6 +186,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -228,8 +255,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -285,7 +337,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -305,6 +357,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -321,17 +377,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.SubscriptionsDelete(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.SubscriptionName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.SubscriptionsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.SubscriptionName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -344,7 +396,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusSubscription_DeleteViaIdentity() { @@ -377,12 +429,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -399,7 +451,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusSubscription_DeleteViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusSubscription_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..9e4ee4109d68 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusSubscription_DeleteViaIdentityNamespace.cs @@ -0,0 +1,540 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Deletes a subscription from the specified topic. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusSubscription_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a subscription from the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639381.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}", ApiVersion = "2022-10-01-preview")] + public partial class RemoveAzServiceBusSubscription_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The subscription name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The subscription name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The subscription name.", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SubscriptionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _topicName; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SubscriptionsDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.TopicName.ToString()))}/subscriptions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.SubscriptionsDeleteViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.SubscriptionsDelete(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, TopicName, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { TopicName=TopicName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzServiceBusSubscription_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusSubscription_DeleteViaIdentityTopic.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusSubscription_DeleteViaIdentityTopic.cs new file mode 100644 index 000000000000..45f8737959ba --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusSubscription_DeleteViaIdentityTopic.cs @@ -0,0 +1,530 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Deletes a subscription from the specified topic. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusSubscription_DeleteViaIdentityTopic", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a subscription from the specified topic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639381.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}", ApiVersion = "2022-10-01-preview")] + public partial class RemoveAzServiceBusSubscription_DeleteViaIdentityTopic : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The subscription name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The subscription name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The subscription name.", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SubscriptionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _topicInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity TopicInputObject { get => this._topicInputObject; set => this._topicInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SubscriptionsDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (TopicInputObject?.Id != null) + { + this.TopicInputObject.Id += $"/subscriptions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.SubscriptionsDeleteViaIdentity(TopicInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == TopicInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + await this.Client.SubscriptionsDelete(TopicInputObject.SubscriptionId ?? null, TopicInputObject.ResourceGroupName ?? null, TopicInputObject.NamespaceName ?? null, TopicInputObject.TopicName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzServiceBusSubscription_DeleteViaIdentityTopic() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopicAuthorizationRule_Delete.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopicAuthorizationRule_Delete.cs index d55e31d6769e..2e1c48148fd7 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopicAuthorizationRule_Delete.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopicAuthorizationRule_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes a topic authorization rule. @@ -16,10 +18,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusTopicAuthorizationRule_Delete", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a topic authorization rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720681.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusTopicAuthorizationRule_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class RemoveAzServiceBusTopicAuthorizationRule_Delete : global::S /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class RemoveAzServiceBusTopicAuthorizationRule_Delete : global::S [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -114,7 +136,7 @@ public partial class RemoveAzServiceBusTopicAuthorizationRule_Delete : global::S /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -163,7 +185,8 @@ public partial class RemoveAzServiceBusTopicAuthorizationRule_Delete : global::S [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -186,12 +209,12 @@ public partial class RemoveAzServiceBusTopicAuthorizationRule_Delete : global::S /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -234,6 +257,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -298,8 +326,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -355,7 +408,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -368,12 +421,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.TopicsDeleteAuthorizationRule(ResourceGroupName, NamespaceName, TopicName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.TopicsDeleteAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, TopicName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,TopicName=TopicName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -386,7 +439,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusTopicAuthorizationRule_Delete() { @@ -419,12 +472,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -441,15 +494,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, TopicName=TopicName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentity.cs index 07556f47eaeb..548a1342251d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes a topic authorization rule. @@ -16,10 +18,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusTopicAuthorizationRule_DeleteViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a topic authorization rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720681.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentity /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentity [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -94,7 +116,7 @@ public partial class RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentity /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -117,12 +139,12 @@ public partial class RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentity /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -165,6 +187,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -229,8 +256,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -286,7 +338,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -306,6 +358,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -322,17 +378,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.TopicsDeleteAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.TopicsDeleteAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.AuthorizationRuleName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -345,7 +397,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentity() { @@ -378,12 +430,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -400,7 +452,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..34e24c515c4c --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentityNamespace.cs @@ -0,0 +1,541 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Deletes a topic authorization rule. + /// + /// [OpenAPI] DeleteAuthorizationRule=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusTopicAuthorizationRule_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a topic authorization rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720681.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _topicName; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TopicsDeleteAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.TopicName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TopicsDeleteAuthorizationRuleViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.TopicsDeleteAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, TopicName, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { TopicName=TopicName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentityTopic.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentityTopic.cs new file mode 100644 index 000000000000..50b117f6fa26 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentityTopic.cs @@ -0,0 +1,531 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Deletes a topic authorization rule. + /// + /// [OpenAPI] DeleteAuthorizationRule=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusTopicAuthorizationRule_DeleteViaIdentityTopic", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a topic authorization rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt720681.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2022-10-01-preview")] + public partial class RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentityTopic : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _topicInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity TopicInputObject { get => this._topicInputObject; set => this._topicInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TopicsDeleteAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (TopicInputObject?.Id != null) + { + this.TopicInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TopicsDeleteAuthorizationRuleViaIdentity(TopicInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == TopicInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + if (null == TopicInputObject.TopicName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("TopicInputObject has null value for TopicInputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, TopicInputObject) ); + } + await this.Client.TopicsDeleteAuthorizationRule(TopicInputObject.SubscriptionId ?? null, TopicInputObject.ResourceGroupName ?? null, TopicInputObject.NamespaceName ?? null, TopicInputObject.TopicName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public RemoveAzServiceBusTopicAuthorizationRule_DeleteViaIdentityTopic() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopic_Delete.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopic_Delete.cs index 70f12a114979..98ee1f611546 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopic_Delete.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopic_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes a topic from the specified namespace and resource group. @@ -15,10 +17,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusTopic_Delete", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a topic from the specified namespace and resource group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639404.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusTopic_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class RemoveAzServiceBusTopic_Delete : global::System.Management. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +71,9 @@ public partial class RemoveAzServiceBusTopic_Delete : global::System.Management. [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -114,7 +136,7 @@ public partial class RemoveAzServiceBusTopic_Delete : global::System.Management. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -163,7 +185,8 @@ public partial class RemoveAzServiceBusTopic_Delete : global::System.Management. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -172,12 +195,12 @@ public partial class RemoveAzServiceBusTopic_Delete : global::System.Management. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -220,6 +243,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -284,8 +312,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -341,7 +394,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -354,12 +407,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.TopicsDelete(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.TopicsDelete(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -372,7 +425,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusTopic_Delete() { @@ -405,12 +458,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,15 +480,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopic_DeleteViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopic_DeleteViaIdentity.cs index 20ef02a6125c..1b1731cc994d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopic_DeleteViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopic_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Deletes a topic from the specified namespace and resource group. @@ -15,10 +17,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusTopic_DeleteViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a topic from the specified namespace and resource group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639404.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzServiceBusTopic_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class RemoveAzServiceBusTopic_DeleteViaIdentity : global::System. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +71,9 @@ public partial class RemoveAzServiceBusTopic_DeleteViaIdentity : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -93,7 +115,7 @@ public partial class RemoveAzServiceBusTopic_DeleteViaIdentity : global::System. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -116,12 +138,12 @@ public partial class RemoveAzServiceBusTopic_DeleteViaIdentity : global::System. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -164,6 +186,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -228,8 +255,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -285,7 +337,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -305,6 +357,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -317,17 +373,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.TopicName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.TopicsDelete(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.TopicsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.TopicName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -340,7 +392,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzServiceBusTopic_DeleteViaIdentity() { @@ -373,12 +425,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -395,7 +447,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopic_DeleteViaIdentityNamespace.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopic_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..80ecb8a80da8 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/RemoveAzServiceBusTopic_DeleteViaIdentityNamespace.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Deletes a topic from the specified namespace and resource group. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzServiceBusTopic_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Deletes a topic from the specified namespace and resource group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639404.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}", ApiVersion = "2022-10-01-preview")] + public partial class RemoveAzServiceBusTopic_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The topic name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The topic name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The topic name.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TopicName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TopicsDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/topics/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TopicsDeleteViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.TopicsDelete(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzServiceBusTopic_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/StartAzServiceBusMigration_CreateExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/StartAzServiceBusMigration_CreateExpanded.cs index 870e73915b9b..24329721e5fd 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/StartAzServiceBusMigration_CreateExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/StartAzServiceBusMigration_CreateExpanded.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// - /// Creates Migration configuration and starts migration of entities from Standard to Premium namespace + /// Create Migration configuration and starts migration of entities from Standard to Premium namespace /// /// /// [OpenAPI] CreateAndStartMigration=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzServiceBusMigration_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates Migration configuration and starts migration of entities from Standard to Premium namespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create Migration configuration and starts migration of entities from Standard to Premium namespace")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}", ApiVersion = "2022-10-01-preview")] public partial class StartAzServiceBusMigration_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,8 +39,20 @@ public partial class StartAzServiceBusMigration_CreateExpanded : global::System. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Single item in List or Get Migration Config operation - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.MigrationConfigProperties(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.MigrationConfigProperties(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -49,6 +64,9 @@ public partial class StartAzServiceBusMigration_CreateExpanded : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -62,6 +80,9 @@ public partial class StartAzServiceBusMigration_CreateExpanded : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -110,7 +131,7 @@ public partial class StartAzServiceBusMigration_CreateExpanded : global::System. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// Name to access Standard Namespace after migration [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name to access Standard Namespace after migration")] @@ -170,7 +191,8 @@ public partial class StartAzServiceBusMigration_CreateExpanded : global::System. [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -192,24 +214,24 @@ public partial class StartAzServiceBusMigration_CreateExpanded : global::System. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -247,15 +269,20 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets.StartAzServiceBusMi clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; clone._parametersBody = this._parametersBody; + clone.SubscriptionId = this.SubscriptionId; clone.ResourceGroupName = this.ResourceGroupName; clone.NamespaceName = this.NamespaceName; - clone.SubscriptionId = this.SubscriptionId; return clone; } /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -320,11 +347,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -336,10 +388,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -407,7 +475,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -420,12 +488,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.MigrationConfigsCreateAndStartMigration(ResourceGroupName, NamespaceName, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.MigrationConfigsCreateAndStartMigration(SubscriptionId, ResourceGroupName, NamespaceName, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -438,7 +506,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public StartAzServiceBusMigration_CreateExpanded() { @@ -471,12 +539,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -493,15 +561,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -511,12 +579,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -528,8 +596,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/StartAzServiceBusMigration_CreateViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/StartAzServiceBusMigration_CreateViaIdentity.cs index 7339dbf590a0..8b97c527e8f0 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/StartAzServiceBusMigration_CreateViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/StartAzServiceBusMigration_CreateViaIdentity.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// - /// Creates Migration configuration and starts migration of entities from Standard to Premium namespace + /// Create Migration configuration and starts migration of entities from Standard to Premium namespace /// /// /// [OpenAPI] CreateAndStartMigration=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzServiceBusMigration_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Creates Migration configuration and starts migration of entities from Standard to Premium namespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Create Migration configuration and starts migration of entities from Standard to Premium namespace")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}", ApiVersion = "2022-10-01-preview")] public partial class StartAzServiceBusMigration_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,6 +40,18 @@ public partial class StartAzServiceBusMigration_CreateViaIdentity : global::Syst /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] @@ -47,6 +62,9 @@ public partial class StartAzServiceBusMigration_CreateViaIdentity : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -60,6 +78,9 @@ public partial class StartAzServiceBusMigration_CreateViaIdentity : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -100,7 +121,7 @@ public partial class StartAzServiceBusMigration_CreateViaIdentity : global::Syst public global::System.Management.Automation.SwitchParameter NoWait { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties _parameter; /// Single item in List or Get Migration Config operation [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in List or Get Migration Config operation", ValueFromPipeline = true)] @@ -109,13 +130,14 @@ public partial class StartAzServiceBusMigration_CreateViaIdentity : global::Syst ReadOnly = false, Description = @"Single item in List or Get Migration Config operation", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -138,24 +160,24 @@ public partial class StartAzServiceBusMigration_CreateViaIdentity : global::Syst /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -199,6 +221,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets.StartAzServiceBusMi /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -263,11 +290,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -279,10 +331,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -350,7 +418,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -365,11 +433,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.MigrationConfigsCreateAndStartMigrationViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.MigrationConfigsCreateAndStartMigrationViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -378,17 +450,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.MigrationConfigsCreateAndStartMigration(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.MigrationConfigsCreateAndStartMigration(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -401,7 +469,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public StartAzServiceBusMigration_CreateViaIdentity() { @@ -434,12 +502,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -456,15 +524,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -474,12 +542,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -491,8 +559,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/StopAzServiceBusMigration_Revert.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/StopAzServiceBusMigration_Revert.cs index d0880f52ba47..8c01241a1ad2 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/StopAzServiceBusMigration_Revert.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/StopAzServiceBusMigration_Revert.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// This operation reverts Migration @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}/revert", ApiVersion = "2022-10-01-preview")] public partial class StopAzServiceBusMigration_Revert : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class StopAzServiceBusMigration_Revert : global::System.Managemen /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class StopAzServiceBusMigration_Revert : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -99,7 +120,7 @@ public partial class StopAzServiceBusMigration_Revert : global::System.Managemen /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -148,7 +169,8 @@ public partial class StopAzServiceBusMigration_Revert : global::System.Managemen [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -157,12 +179,12 @@ public partial class StopAzServiceBusMigration_Revert : global::System.Managemen /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -195,6 +217,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -259,8 +286,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -316,7 +368,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -329,12 +381,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.MigrationConfigsRevert(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.MigrationConfigsRevert(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -347,7 +399,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public StopAzServiceBusMigration_Revert() { @@ -380,12 +432,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -402,15 +454,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/StopAzServiceBusMigration_RevertViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/StopAzServiceBusMigration_RevertViaIdentity.cs index 1e2f1825d5b5..ca41e432e878 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/StopAzServiceBusMigration_RevertViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/StopAzServiceBusMigration_RevertViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// This operation reverts Migration @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}/revert", ApiVersion = "2022-10-01-preview")] public partial class StopAzServiceBusMigration_RevertViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class StopAzServiceBusMigration_RevertViaIdentity : global::Syste /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class StopAzServiceBusMigration_RevertViaIdentity : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -93,7 +114,7 @@ public partial class StopAzServiceBusMigration_RevertViaIdentity : global::Syste /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -116,12 +137,12 @@ public partial class StopAzServiceBusMigration_RevertViaIdentity : global::Syste /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -154,6 +175,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -218,8 +244,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -295,6 +346,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -303,17 +358,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.MigrationConfigsRevert(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.MigrationConfigsRevert(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -326,7 +377,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public StopAzServiceBusMigration_RevertViaIdentity() { @@ -359,12 +410,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -381,7 +432,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_Check.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_Check.cs index 2e1baa6cc70b..6b47515377b1 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_Check.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_Check.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Check the give namespace name availability. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzServiceBusDisasterRecoveryConfigNameAvailability_Check", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Check the give namespace name availability.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/CheckNameAvailability", ApiVersion = "2022-10-01-preview")] public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Check : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -91,7 +112,7 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability _parameter; /// Description of a Check Name availability request properties. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of a Check Name availability request properties.", ValueFromPipeline = true)] @@ -100,13 +121,14 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec ReadOnly = false, Description = @"Description of a Check Name availability request properties.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -155,7 +177,8 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -164,24 +187,24 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -204,6 +227,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -268,8 +296,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -325,7 +378,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -338,12 +391,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsCheckNameAvailability(ResourceGroupName, NamespaceName, SubscriptionId, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsCheckNameAvailability(SubscriptionId, ResourceGroupName, NamespaceName, Parameter, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId,body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -363,7 +416,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzServiceBusDisasterRecoveryConfigNameAvailability_Check() { @@ -389,12 +442,12 @@ public TestAzServiceBusDisasterRecoveryConfigNameAvailability_Check() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -411,15 +464,15 @@ public TestAzServiceBusDisasterRecoveryConfigNameAvailability_Check() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -429,12 +482,12 @@ public TestAzServiceBusDisasterRecoveryConfigNameAvailability_Check() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -446,8 +499,26 @@ public TestAzServiceBusDisasterRecoveryConfigNameAvailability_Check() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckExpanded.cs index 2034946e2819..4a5129dda951 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Check the give namespace name availability. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzServiceBusDisasterRecoveryConfigNameAvailability_CheckExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Check the give namespace name availability.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/CheckNameAvailability", ApiVersion = "2022-10-01-preview")] public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,14 +38,29 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Description of a Check Name availability request properties. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CheckNameAvailability(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CheckNameAvailability(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -110,7 +131,7 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -159,7 +180,8 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -168,24 +190,24 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -208,6 +230,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -272,8 +299,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -329,7 +381,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -342,12 +394,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsCheckNameAvailability(ResourceGroupName, NamespaceName, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsCheckNameAvailability(SubscriptionId, ResourceGroupName, NamespaceName, _parametersBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -367,8 +419,8 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet - /// class. + /// Initializes a new instance of the + /// cmdlet class. /// public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckExpanded() { @@ -394,12 +446,12 @@ public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckExpanded() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -416,15 +468,15 @@ public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -434,12 +486,12 @@ public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -451,8 +503,26 @@ public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentity.cs index 114721703454..7751f9ef8d79 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Check the give namespace name availability. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Check the give namespace name availability.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/CheckNameAvailability", ApiVersion = "2022-10-01-preview")] public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +106,7 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability _parameter; /// Description of a Check Name availability request properties. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of a Check Name availability request properties.", ValueFromPipeline = true)] @@ -94,13 +115,14 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec ReadOnly = false, Description = @"Description of a Check Name availability request properties.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,24 +145,24 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -284,7 +336,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -304,6 +356,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -312,17 +368,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DisasterRecoveryConfigsCheckNameAvailability(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsCheckNameAvailability(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, Parameter, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -342,8 +394,8 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the - /// cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentity() { @@ -369,12 +421,12 @@ public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentity() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -391,15 +443,15 @@ public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentity() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -409,12 +461,12 @@ public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentity() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,8 +478,26 @@ public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentity() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded.cs index 2470311b0aed..a78a8ab44490 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Check the give namespace name availability. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Check the give namespace name availability.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/CheckNameAvailability", ApiVersion = "2022-10-01-preview")] public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,14 +38,29 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Description of a Check Name availability request properties. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CheckNameAvailability(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CheckNameAvailability(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -104,7 +125,7 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -127,24 +148,24 @@ public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_Chec /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -167,6 +188,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -231,8 +257,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -288,7 +339,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -308,6 +359,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -316,17 +371,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DisasterRecoveryConfigsCheckNameAvailability(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsCheckNameAvailability(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, _parametersBody, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -346,7 +397,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. /// public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded() @@ -373,12 +424,12 @@ public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentityEx /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -395,15 +446,15 @@ public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentityEx if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -413,12 +464,12 @@ public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentityEx /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -430,8 +481,26 @@ public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentityEx return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath.cs new file mode 100644 index 000000000000..3fa2c2f64b86 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath.cs @@ -0,0 +1,528 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Check the give namespace name availability. + /// + /// [OpenAPI] CheckNameAvailability=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/CheckNameAvailability" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Check the give namespace name availability.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/CheckNameAvailability", ApiVersion = "2022-10-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.NotSuggestDefaultParameterSet] + public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Check operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Check operation")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Check operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _namespaceName; + + /// The namespace name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The namespace name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The namespace name", + SerializedName = @"namespaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsCheckNameAvailability' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DisasterRecoveryConfigsCheckNameAvailabilityViaJsonString(SubscriptionId, ResourceGroupName, NamespaceName, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaJsonString.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaJsonString.cs new file mode 100644 index 000000000000..7fde47ebdfd5 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaJsonString.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; + using System; + + /// Check the give namespace name availability. + /// + /// [OpenAPI] CheckNameAvailability=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/CheckNameAvailability" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Check the give namespace name availability.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/CheckNameAvailability", ApiVersion = "2022-10-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.NotSuggestDefaultParameterSet] + public partial class TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Check operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Check operation")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Check operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _namespaceName; + + /// The namespace name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The namespace name")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The namespace name", + SerializedName = @"namespaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsCheckNameAvailability' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DisasterRecoveryConfigsCheckNameAvailabilityViaJsonString(SubscriptionId, ResourceGroupName, NamespaceName, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public TestAzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_Check.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_Check.cs index 5fe40c97e673..b51b4979c66f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_Check.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_Check.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Check the give namespace name availability. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzServiceBusNamespaceNameAvailability_Check", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Check the give namespace name availability.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/CheckNameAvailability", ApiVersion = "2022-10-01-preview")] public partial class TestAzServiceBusNamespaceNameAvailability_Check : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class TestAzServiceBusNamespaceNameAvailability_Check : global::S /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class TestAzServiceBusNamespaceNameAvailability_Check : global::S [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -77,7 +98,7 @@ public partial class TestAzServiceBusNamespaceNameAvailability_Check : global::S global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability _parameter; /// Description of a Check Name availability request properties. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of a Check Name availability request properties.", ValueFromPipeline = true)] @@ -86,13 +107,14 @@ public partial class TestAzServiceBusNamespaceNameAvailability_Check : global::S ReadOnly = false, Description = @"Description of a Check Name availability request properties.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -127,7 +149,8 @@ public partial class TestAzServiceBusNamespaceNameAvailability_Check : global::S [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -136,24 +159,24 @@ public partial class TestAzServiceBusNamespaceNameAvailability_Check : global::S /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -176,6 +199,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -240,8 +268,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -297,7 +350,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -315,7 +368,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -335,7 +388,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzServiceBusNamespaceNameAvailability_Check() { @@ -361,12 +414,12 @@ public TestAzServiceBusNamespaceNameAvailability_Check() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -383,15 +436,15 @@ public TestAzServiceBusNamespaceNameAvailability_Check() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -401,12 +454,12 @@ public TestAzServiceBusNamespaceNameAvailability_Check() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,8 +471,26 @@ public TestAzServiceBusNamespaceNameAvailability_Check() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_CheckExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_CheckExpanded.cs index ff787582c970..c9338c1291e1 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_CheckExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_CheckExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Check the give namespace name availability. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzServiceBusNamespaceNameAvailability_CheckExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Check the give namespace name availability.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/CheckNameAvailability", ApiVersion = "2022-10-01-preview")] public partial class TestAzServiceBusNamespaceNameAvailability_CheckExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,14 +38,29 @@ public partial class TestAzServiceBusNamespaceNameAvailability_CheckExpanded : g /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Description of a Check Name availability request properties. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CheckNameAvailability(); + private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.CheckNameAvailability(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class TestAzServiceBusNamespaceNameAvailability_CheckExpanded : g [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -96,7 +117,7 @@ public partial class TestAzServiceBusNamespaceNameAvailability_CheckExpanded : g /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -131,7 +152,8 @@ public partial class TestAzServiceBusNamespaceNameAvailability_CheckExpanded : g [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -140,24 +162,24 @@ public partial class TestAzServiceBusNamespaceNameAvailability_CheckExpanded : g /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -180,6 +202,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -244,8 +271,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -301,7 +353,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -319,7 +371,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -339,7 +391,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzServiceBusNamespaceNameAvailability_CheckExpanded() { @@ -365,12 +417,12 @@ public TestAzServiceBusNamespaceNameAvailability_CheckExpanded() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -387,15 +439,15 @@ public TestAzServiceBusNamespaceNameAvailability_CheckExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -405,12 +457,12 @@ public TestAzServiceBusNamespaceNameAvailability_CheckExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -422,8 +474,26 @@ public TestAzServiceBusNamespaceNameAvailability_CheckExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_CheckViaIdentity.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_CheckViaJsonFilePath.cs similarity index 76% rename from src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_CheckViaIdentity.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_CheckViaJsonFilePath.cs index 9f382f163683..affc67565bd5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_CheckViaIdentity.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_CheckViaJsonFilePath.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Check the give namespace name availability. @@ -13,13 +15,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] CheckNameAvailability=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/CheckNameAvailability" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzServiceBusNamespaceNameAvailability_CheckViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult))] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzServiceBusNamespaceNameAvailability_CheckViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Check the give namespace name availability.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/CheckNameAvailability", ApiVersion = "2022-10-01-preview")] - public partial class TestAzServiceBusNamespaceNameAvailability_CheckViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.NotSuggestDefaultParameterSet] + public partial class TestAzServiceBusNamespaceNameAvailability_CheckViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,28 @@ public partial class TestAzServiceBusNamespaceNameAvailability_CheckViaIdentity /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -53,6 +74,9 @@ public partial class TestAzServiceBusNamespaceNameAvailability_CheckViaIdentity [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -65,17 +89,22 @@ public partial class TestAzServiceBusNamespaceNameAvailability_CheckViaIdentity [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Check operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Check operation")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Check operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + /// /// cancellation delegate. Stops the cmdlet when called. /// @@ -84,23 +113,10 @@ public partial class TestAzServiceBusNamespaceNameAvailability_CheckViaIdentity /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability _parameter; - - /// Description of a Check Name availability request properties. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of a Check Name availability request properties.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Description of a Check Name availability request properties.", - SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability) })] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability Parameter { get => this._parameter; set => this._parameter = value; } - /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -118,29 +134,51 @@ public partial class TestAzServiceBusNamespaceNameAvailability_CheckViaIdentity [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +201,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +270,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -284,7 +352,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -297,24 +365,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.NamespacesCheckNameAvailabilityViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesCheckNameAvailability(InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); - } + await this.Client.NamespacesCheckNameAvailabilityViaJsonString(SubscriptionId, _jsonString, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -334,9 +390,10 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet + /// class. /// - public TestAzServiceBusNamespaceNameAvailability_CheckViaIdentity() + public TestAzServiceBusNamespaceNameAvailability_CheckViaJsonFilePath() { } @@ -360,12 +417,12 @@ public TestAzServiceBusNamespaceNameAvailability_CheckViaIdentity() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -382,15 +439,15 @@ public TestAzServiceBusNamespaceNameAvailability_CheckViaIdentity() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -400,12 +457,12 @@ public TestAzServiceBusNamespaceNameAvailability_CheckViaIdentity() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -417,8 +474,26 @@ public TestAzServiceBusNamespaceNameAvailability_CheckViaIdentity() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_CheckViaIdentityExpanded.cs b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_CheckViaJsonString.cs similarity index 77% rename from src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_CheckViaIdentityExpanded.cs rename to src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_CheckViaJsonString.cs index 7a118df422f5..d463d892e2b0 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_CheckViaIdentityExpanded.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/cmdlets/TestAzServiceBusNamespaceNameAvailability_CheckViaJsonString.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets; using System; /// Check the give namespace name availability. @@ -13,13 +15,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Cmdlets /// [OpenAPI] CheckNameAvailability=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/CheckNameAvailability" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.InternalExport] - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzServiceBusNamespaceNameAvailability_CheckViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult))] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzServiceBusNamespaceNameAvailability_CheckViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Description(@"Check the give namespace name availability.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/CheckNameAvailability", ApiVersion = "2022-10-01-preview")] - public partial class TestAzServiceBusNamespaceNameAvailability_CheckViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.NotSuggestDefaultParameterSet] + public partial class TestAzServiceBusNamespaceNameAvailability_CheckViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,14 +39,26 @@ public partial class TestAzServiceBusNamespaceNameAvailability_CheckViaIdentityE /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - /// Description of a Check Name availability request properties. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.CheckNameAvailability(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.ClientAPI; @@ -56,6 +72,9 @@ public partial class TestAzServiceBusNamespaceNameAvailability_CheckViaIdentityE [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -68,17 +87,22 @@ public partial class TestAzServiceBusNamespaceNameAvailability_CheckViaIdentityE [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Check operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Check operation")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Check operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + /// /// cancellation delegate. Stops the cmdlet when called. /// @@ -87,24 +111,10 @@ public partial class TestAzServiceBusNamespaceNameAvailability_CheckViaIdentityE /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - /// - /// The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. - /// The namespace must start with a letter, and it must end with a letter or number. - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - public string Name { get => _parametersBody.Name ?? null; set => _parametersBody.Name = value; } - /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -122,29 +132,51 @@ public partial class TestAzServiceBusNamespaceNameAvailability_CheckViaIdentityE [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -167,6 +199,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -231,8 +268,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -288,7 +350,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -301,24 +363,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.NamespacesCheckNameAvailabilityViaIdentity(InputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesCheckNameAvailability(InputObject.SubscriptionId ?? null, _parametersBody, onOk, onDefault, this, Pipeline); - } + await this.Client.NamespacesCheckNameAvailabilityViaJsonString(SubscriptionId, _jsonString, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -338,10 +388,9 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet - /// class. + /// Initializes a new instance of the cmdlet class. /// - public TestAzServiceBusNamespaceNameAvailability_CheckViaIdentityExpanded() + public TestAzServiceBusNamespaceNameAvailability_CheckViaJsonString() { } @@ -365,12 +414,12 @@ public TestAzServiceBusNamespaceNameAvailability_CheckViaIdentityExpanded() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -387,15 +436,15 @@ public TestAzServiceBusNamespaceNameAvailability_CheckViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -405,12 +454,12 @@ public TestAzServiceBusNamespaceNameAvailability_CheckViaIdentityExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -422,8 +471,26 @@ public TestAzServiceBusNamespaceNameAvailability_CheckViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs new file mode 100644 index 000000000000..5ac77a36b068 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus +{ + using System; + using System.Collections.Generic; + using System.Text; + + [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)] + public class ExternalDocsAttribute : Attribute + { + + public string Description { get; } + + public string Url { get; } + + public ExternalDocsAttribute(string url) + { + Url = url; + } + + public ExternalDocsAttribute(string url, string description) + { + Url = url; + Description = description; + } + } +} diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs new file mode 100644 index 000000000000..d0b6ab23b086 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus +{ + public class PSArgumentCompleterAttribute : ArgumentCompleterAttribute + { + internal string[] ResourceTypes; + + public PSArgumentCompleterAttribute(params string[] argumentList) : base(CreateScriptBlock(argumentList)) + { + ResourceTypes = argumentList; + } + + public static ScriptBlock CreateScriptBlock(string[] resourceTypes) + { + List outputResourceTypes = new List(); + foreach (string resourceType in resourceTypes) + { + if (resourceType.Contains(" ")) + { + outputResourceTypes.Add("\'\'" + resourceType + "\'\'"); + } + else + { + outputResourceTypes.Add(resourceType); + } + } + string scriptResourceTypeList = "'" + String.Join("' , '", outputResourceTypes) + "'"; + string script = "param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)\n" + + String.Format("$values = {0}\n", scriptResourceTypeList) + + "$values | Where-Object { $_ -Like \"$wordToComplete*\" -or $_ -Like \"'$wordToComplete*\" } | Sort-Object | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }"; + ScriptBlock scriptBlock = ScriptBlock.Create(script); + return scriptBlock; + } + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs index 4dc61e8e438c..f84dfcbe6f40 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs @@ -20,11 +20,13 @@ public class ExportFormatPs1xml : PSCmdlet public string FilePath { get; set; } private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models"; - private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; private const string PropertiesExcludedForTableview = @"Id,Type"; private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + private static string SelectedBySuffix = @"#Multiple"; + protected override void ProcessRecord() { try @@ -76,7 +78,7 @@ private static View CreateViewModel(ViewParameters viewParameters) Name = viewParameters.Type.FullName, ViewSelectedBy = new ViewSelectedBy { - TypeName = viewParameters.Type.FullName + TypeName = string.Concat(viewParameters.Type.FullName, SelectedBySuffix) }, TableControl = new TableControl { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs index a8a0ac4001a9..af93f2ad7773 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs @@ -24,7 +24,7 @@ public class ExportModelSurface : PSCmdlet public bool UseExpandedFormat { get; set; } private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models"; - private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; protected override void ProcessRecord() { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index 3860ec8e0acf..26a496269738 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -70,9 +70,8 @@ protected override void ProcessRecord() var variantGroups = profileGroups.SelectMany(pg => pg.Variants .GroupBy(v => new { v.CmdletName, v.IsInternal }) .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), - Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) + Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) .ToArray(); - var license = new StringBuilder(); license.Append(@" # ---------------------------------------------------------------------------------- @@ -114,6 +113,7 @@ protected override void ProcessRecord() sb.Append("param("); sb.Append($"{(parameterGroups.Any() ? Environment.NewLine : String.Empty)}"); + foreach (var parameterGroup in parameterGroups) { var parameters = parameterGroup.HasAllVariants ? parameterGroup.Parameters.Take(1) : parameterGroup.Parameters; diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index 2a354e46f362..b92ec732db81 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -137,7 +137,7 @@ protected override void ProcessRecord() } else { - var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().Append("*").ToPsList(); + var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().ToPsList(); sb.AppendLine($@"{Indent}FunctionsToExport = {cmdletsList}"); } @@ -148,8 +148,10 @@ protected override void ProcessRecord() } else { - var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().Append("*").ToPsList(); - sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().ToPsList(); + if (!String.IsNullOrEmpty(aliasesList)) { + sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + } } // CmdletsToExport diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs index d6412b9a5156..8482957e4b9c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs @@ -12,50 +12,96 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell { - [Cmdlet(VerbsData.Export, "TestStub")] - [DoNotExport] - public class ExportTestStub : PSCmdlet - { - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string ModuleName { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string ExportsFolder { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string OutputFolder { get; set; } - - [Parameter] - public SwitchParameter IncludeGenerated { get; set; } - - protected override void ProcessRecord() + [Cmdlet(VerbsData.Export, "TestStub")] + [DoNotExport] + public class ExportTestStub : PSCmdlet { - try - { - if (!Directory.Exists(ExportsFolder)) - { - throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); - } + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } - var exportDirectories = Directory.GetDirectories(ExportsFolder); - if (!exportDirectories.Any()) - { - exportDirectories = new[] { ExportsFolder }; - } - var utilFile = Path.Combine(OutputFolder, "utils.ps1"); - if (!File.Exists(utilFile)) + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeGenerated { get; set; } + + protected override void ProcessRecord() { - var sc = new StringBuilder(); - sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + /*var loadEnvFile = Path.Combine(OutputFolder, "loadEnv.ps1"); + if (!File.Exists(loadEnvFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@" +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json +}"); + File.WriteAllText(loadEnvFile, sc.ToString()); + }*/ + var utilFile = Path.Combine(OutputFolder, "utils.ps1"); + if (!File.Exists(utilFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { if ($allChars) { return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) } else { return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) } } +function Start-TestSleep { + [CmdletBinding(DefaultParameterSetName = 'SleepBySeconds')] + param( + [parameter(Mandatory = $true, Position = 0, ParameterSetName = 'SleepBySeconds')] + [ValidateRange(0.0, 2147483.0)] + [double] $Seconds, + + [parameter(Mandatory = $true, ParameterSetName = 'SleepByMilliseconds')] + [ValidateRange('NonNegative')] + [Alias('ms')] + [int] $Milliseconds + ) + + if ($TestMode -ne 'playback') { + switch ($PSCmdlet.ParameterSetName) { + 'SleepBySeconds' { + Start-Sleep -Seconds $Seconds + } + 'SleepByMilliseconds' { + Start-Sleep -Milliseconds $Milliseconds + } + } + } +} + $env = @{} if ($UsePreviousConfigForRecord) { $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json @@ -80,37 +126,40 @@ function cleanupEnv() { # Clean resources you create for testing } "); - File.WriteAllText(utilFile, sc.ToString()); - } - foreach (var exportDirectory in exportDirectories) - { - var outputFolder = OutputFolder; - if (exportDirectory != ExportsFolder) - { - outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); - Directory.CreateDirectory(outputFolder); - } - - var variantGroups = GetScriptCmdlets(exportDirectory) - .SelectMany(fi => fi.ToVariants()) - .Where(v => !v.IsDoNotExport) - .GroupBy(v => v.CmdletName) - .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) - .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); - - foreach (var variantGroup in variantGroups) - { - var sb = new StringBuilder(); - sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); - sb.AppendLine(@"{ + File.WriteAllText(utilFile, sc.ToString()); + } + + + + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var variantGroups = GetScriptCmdlets(exportDirectory) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .GroupBy(v => v.CmdletName) + .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) + .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); + + foreach (var variantGroup in variantGroups) + { + var sb = new StringBuilder(); + sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); + sb.AppendLine(@"{ $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath)" -); - sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); - sb.AppendLine(@" $currentPath = $PSScriptRoot + ); + sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); + sb.AppendLine(@" $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File $currentPath = Split-Path -Path $currentPath -Parent @@ -120,29 +169,29 @@ function cleanupEnv() { "); - sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); - var variants = variantGroup.Variants - .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) - .ToList(); + sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); + var variants = variantGroup.Variants + .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) + .ToList(); - foreach (var variant in variants) + foreach (var variant in variants) + { + sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); + sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); + var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; + sb.AppendLine($"{Indent}}}{variantSeparator}"); + } + sb.AppendLine("}"); + + File.WriteAllText(variantGroup.FilePath, sb.ToString()); + } + } + } + catch (Exception ee) { - sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); - sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); - var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; - sb.AppendLine($"{Indent}}}{variantSeparator}"); + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; } - sb.AppendLine("}"); - - File.WriteAllText(variantGroup.FilePath, sb.ToString()); - } } - } - catch (Exception ee) - { - Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); - throw ee; - } } - } } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs index 2b14b5238023..fc700ffeb45b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -94,7 +94,7 @@ public static void WriteMarkdowns(IEnumerable variantGroups, PsMod sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); foreach (var relatedLink in markdownInfo.RelatedLinks) { - sb.Append($"{relatedLink}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"[{relatedLink}]({relatedLink}){Environment.NewLine}{Environment.NewLine}"); } File.WriteAllText(Path.Combine(docsFolder, $"{markdownInfo.CmdletName}.md"), sb.ToString()); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs index 864ee88d0b6e..25d5e193f482 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs @@ -31,7 +31,7 @@ internal class MarkdownHelpInfo public string[] Inputs { get; } public string[] Outputs { get; } public ComplexInterfaceInfo[] ComplexInterfaceInfos { get; } - public string[] RelatedLinks { get; } + public MarkdownRelatedLinkInfo[] RelatedLinks { get; } public bool SupportsShouldProcess { get; } public bool SupportsPaging { get; } @@ -67,7 +67,11 @@ public MarkdownHelpInfo(VariantGroup variantGroup, string examplesFolder, string ComplexInterfaceInfos = variantGroup.ComplexInterfaceInfos; OnlineVersion = commentInfo.OnlineVersion; - RelatedLinks = commentInfo.RelatedLinks; + + var relatedLinkLists = new List(); + relatedLinkLists.AddRange(commentInfo.RelatedLinks?.Select(link => new MarkdownRelatedLinkInfo(link))); + relatedLinkLists.AddRange(variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Distinct()?.Select(link => new MarkdownRelatedLinkInfo(link.Url, link.Description))); + RelatedLinks = relatedLinkLists?.ToArray(); SupportsShouldProcess = variantGroup.SupportsShouldProcess; SupportsPaging = variantGroup.SupportsPaging; @@ -218,14 +222,45 @@ public MarkdownParameterHelpInfo(PsParameterHelpInfo[] parameterHelpInfos, Param } } + internal class MarkdownRelatedLinkInfo + { + public string Url { get; } + public string Description { get; } + + public MarkdownRelatedLinkInfo(string url) + { + Url = url; + } + + public MarkdownRelatedLinkInfo(string url, string description) + { + Url = url; + Description = description; + } + + public override string ToString() + { + if (string.IsNullOrEmpty(Description)) + { + return Url; + } + else + { + return $@"[{Description}]({Url})"; + + } + + } + } + internal static class MarkdownTypesExtensions { public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Output, exampleInfo.Remarks); public static MarkdownExampleHelpInfo[] DefaultExampleHelpInfos = { - new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), - new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), }; public static MarkdownParameterHelpInfo[] SupportsShouldProcessParameters = diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index b04391fb4696..17b079722d42 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -121,6 +121,21 @@ public override string ToString() => CompleterInfo != null : String.Empty; } + internal class PSArgumentCompleterOutput : ArgumentCompleterOutput + { + public PSArgumentCompleterInfo PSArgumentCompleterInfo { get; } + + public PSArgumentCompleterOutput(PSArgumentCompleterInfo completerInfo) : base(completerInfo) + { + PSArgumentCompleterInfo = completerInfo; + } + + + public override string ToString() => PSArgumentCompleterInfo != null + ? $"{Indent}[{typeof(PSArgumentCompleterAttribute)}({(PSArgumentCompleterInfo.IsTypeCompleter ? $"[{PSArgumentCompleterInfo.Type.Unwrap().ToPsType()}]" : $"{PSArgumentCompleterInfo.ResourceTypes?.Select(r => $"\"{r}\"")?.JoinIgnoreEmpty(", ")}")})]{Environment.NewLine}" + : String.Empty; + } + internal class DefaultInfoOutput { public bool HasDefaultInfo { get; } @@ -173,6 +188,7 @@ internal class BaseOutput public VariantGroup VariantGroup { get; } protected static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public BaseOutput(VariantGroup variantGroup) { VariantGroup = variantGroup; @@ -269,11 +285,16 @@ private string GetDefaultValuesStatements() var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); var parameterName = defaultInfo.ParameterGroup.ParameterName; sb.AppendLine(); + var setCondition = " "; + if (!String.IsNullOrEmpty(defaultInfo.SetCondition)) + { + setCondition = $" -and {defaultInfo.SetCondition}"; + } //Yabo: this is bad to hard code the subscription id, but autorest load input README.md reversely (entry readme -> required readme), there are no other way to //override default value set in required readme if ("SubscriptionId".Equals(parameterName)) { - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }}"); sb.AppendLine($"{Indent}{Indent}{Indent}if ($testPlayback) {{"); @@ -285,13 +306,15 @@ private string GetDefaultValuesStatements() } else { - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); sb.Append($"{Indent}{Indent}}}"); } + } return sb.ToString(); } + } internal class ProcessOutput : BaseOutput @@ -381,6 +404,8 @@ public override string ToString() var notesText = !String.IsNullOrEmpty(notes) ? $"{Environment.NewLine}.Notes{Environment.NewLine}{ComplexParameterHeader}{notes}" : String.Empty; var relatedLinks = String.Join(Environment.NewLine, CommentInfo.RelatedLinks.Select(l => $".Link{Environment.NewLine}{l}")); var relatedLinksText = !String.IsNullOrEmpty(relatedLinks) ? $"{Environment.NewLine}{relatedLinks}" : String.Empty; + var externalUrls = String.Join(Environment.NewLine, CommentInfo.ExternalUrls.Select(l => $".Link{Environment.NewLine}{l}")); + var externalUrlsText = !String.IsNullOrEmpty(externalUrls) ? $"{Environment.NewLine}{externalUrls}" : String.Empty; var examples = ""; foreach (var example in VariantGroup.HelpInfo.Examples) { @@ -393,7 +418,7 @@ public override string ToString() {CommentInfo.Description.ToDescriptionFormat(false)} {examples}{inputsText}{outputsText}{notesText} .Link -{CommentInfo.OnlineVersion}{relatedLinksText} +{CommentInfo.OnlineVersion}{relatedLinksText}{externalUrlsText} #> "; } @@ -587,7 +612,9 @@ public static string ToSyntaxTypeName(this Type type) public static AllowEmptyArrayOutput ToAllowEmptyArray(this bool hasAllowEmptyArray) => new AllowEmptyArrayOutput(hasAllowEmptyArray); - public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => new ArgumentCompleterOutput(completerInfo); + public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => (completerInfo is PSArgumentCompleterInfo psArgumentCompleterInfo) ? psArgumentCompleterInfo.ToArgumentCompleterOutput() : new ArgumentCompleterOutput(completerInfo); + + public static PSArgumentCompleterOutput ToArgumentCompleterOutput(this PSArgumentCompleterInfo completerInfo) => new PSArgumentCompleterOutput(completerInfo); public static DefaultInfoOutput ToDefaultInfoOutput(this ParameterGroup parameterGroup) => new DefaultInfoOutput(parameterGroup); diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs index c3bcb8c19059..82d991d4c87e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -31,7 +31,7 @@ internal class VariantGroup { public string ModuleName { get; } - public string RootModuleName {get => @"";} + public string RootModuleName { get => @""; } public string CmdletName { get; } public string CmdletVerb { get; } public string CmdletNoun { get; } @@ -49,7 +49,6 @@ internal class VariantGroup public PsHelpInfo HelpInfo { get; } public bool IsGenerated { get; } public bool IsInternal { get; } - public string OutputFolder { get; } public string FileName { get; } public string FilePath { get; } @@ -84,7 +83,6 @@ public VariantGroup(string moduleName, string cmdletName, Variant[] variants, st HelpInfo = Variants.Select(v => v.HelpInfo).FirstOrDefault() ?? new PsHelpInfo(); IsGenerated = Variants.All(v => v.Attributes.OfType().Any()); IsInternal = isInternal; - OutputFolder = outputFolder; FileName = $"{CmdletName}{(isTest ? ".Tests" : String.Empty)}.ps1"; FilePath = Path.Combine(OutputFolder, FileName); @@ -101,12 +99,23 @@ private string DetermineDefaultParameterSetName() if (String.IsNullOrEmpty(defaultParameterSet)) { var variantParamCountGroups = Variants + .Where(v => !v.IsNotSuggestDefaultParameterSet) .Select(v => ( variant: v.VariantName, paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) .GroupBy(vpc => vpc.isSimple) .ToArray(); + if (variantParamCountGroups.Length == 0) + { + variantParamCountGroups = Variants + .Select(v => ( + variant: v.VariantName, + paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), + isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) + .GroupBy(vpc => vpc.isSimple) + .ToArray(); + } var variantParameterCounts = (variantParamCountGroups.Any(g => g.Key) ? variantParamCountGroups.Where(g => g.Key) : variantParamCountGroups).SelectMany(g => g).ToArray(); var smallestParameterCount = variantParameterCounts.Min(vpc => vpc.paramCount); defaultParameterSet = variantParameterCounts.First(vpc => vpc.paramCount == smallestParameterCount).variant; @@ -135,6 +144,7 @@ internal class Variant public Parameter[] CmdletOnlyParameters { get; } public bool IsInternal { get; } public bool IsDoNotExport { get; } + public bool IsNotSuggestDefaultParameterSet { get; } public string[] Profiles { get; } public Variant(string cmdletName, string variantName, CommandInfo info, CommandMetadata metadata, bool hasParameterSets = false, PsHelpInfo helpInfo = null) @@ -155,6 +165,7 @@ public Variant(string cmdletName, string variantName, CommandInfo info, CommandM Parameters = this.ToParameters().OrderBy(p => p.OrderCategory).ThenByDescending(p => p.IsMandatory).ToArray(); IsInternal = Attributes.OfType().Any(); IsDoNotExport = Attributes.OfType().Any(); + IsNotSuggestDefaultParameterSet = Attributes.OfType().Any(); CmdletOnlyParameters = Parameters.Where(p => !p.Categories.Any(c => c == ParameterCategory.Azure || c == ParameterCategory.Runtime)).ToArray(); Profiles = Attributes.OfType().SelectMany(pa => pa.Profiles).ToArray(); } @@ -210,6 +221,7 @@ public ParameterGroup(string parameterName, Parameter[] parameters, string[] all HasValidateNotNull = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); HasAllowEmptyArray = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); CompleterInfo = Parameters.Select(p => p.CompleterInfoAttribute).FirstOrDefault()?.ToCompleterInfo() + ?? Parameters.Select(p => p.PSArgumentCompleterAttribute).FirstOrDefault()?.ToPSArgumentCompleterInfo() ?? Parameters.Select(p => p.ArgumentCompleterAttribute).FirstOrDefault()?.ToCompleterInfo(); DefaultInfo = Parameters.Select(p => p.DefaultInfoAttribute).FirstOrDefault()?.ToDefaultInfo(this) ?? Parameters.Select(p => p.DefaultValueAttribute).FirstOrDefault(dv => dv != null)?.ToDefaultInfo(this); @@ -244,7 +256,6 @@ internal class Parameter public ParameterMetadata Metadata { get; } public PsParameterHelpInfo HelpInfo { get; } public Type ParameterType { get; } - public Attribute[] Attributes { get; } public ParameterCategory[] Categories { get; } public ParameterCategory OrderCategory { get; } @@ -254,6 +265,7 @@ internal class Parameter public bool SupportsWildcards { get; } public CompleterInfoAttribute CompleterInfoAttribute { get; } public ArgumentCompleterAttribute ArgumentCompleterAttribute { get; } + public PSArgumentCompleterAttribute PSArgumentCompleterAttribute { get; } public bool ValueFromPipeline { get; } public bool ValueFromPipelineByPropertyName { get; } @@ -286,7 +298,8 @@ public Parameter(string variantName, string parameterName, ParameterMetadata met } SupportsWildcards = Attributes.OfType().Any(); CompleterInfoAttribute = Attributes.OfType().FirstOrDefault(); - ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + PSArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(attr => !attr.GetType().Equals(typeof(PSArgumentCompleterAttribute))); ValueFromPipeline = ParameterAttribute.ValueFromPipeline; ValueFromPipelineByPropertyName = ParameterAttribute.ValueFromPipelineByPropertyName; @@ -295,10 +308,10 @@ public Parameter(string variantName, string parameterName, ParameterMetadata met IsMandatory = ParameterAttribute.Mandatory; var complexParameterName = ParameterName.ToUpperInvariant(); - var complexMessage = $"{Environment.NewLine}To construct, see NOTES section for {complexParameterName} properties and create a hash table."; + var complexMessage = $"{Environment.NewLine}"; var description = ParameterAttribute.HelpMessage.NullIfEmpty() ?? HelpInfo.Description.NullIfEmpty() ?? InfoAttribute?.Description.NullIfEmpty() ?? String.Empty; // Remove the complex type message as it will be reinserted if this is a complex type - description = description.NormalizeNewLines().Replace(complexMessage, String.Empty).Replace(complexMessage.ToPsSingleLine(), String.Empty); + description = description.NormalizeNewLines(); // Make an InfoAttribute for processing only if one isn't provided InfoAttribute = Attributes.OfType().FirstOrDefault() ?? new InfoAttribute { PossibleTypes = new[] { ParameterType.Unwrap() }, Required = IsMandatory }; // Set the description if the InfoAttribute does not have one since they are exported without a description @@ -318,7 +331,7 @@ internal class ComplexInterfaceInfo public bool Required { get; } public bool ReadOnly { get; } public string Description { get; } - + public ComplexInterfaceInfo[] NestedInfos { get; } public bool IsComplexInterface { get; } @@ -335,7 +348,7 @@ public ComplexInterfaceInfo(string name, Type type, InfoAttribute infoAttribute, var unwrappedType = Type.Unwrap(); var hasBeenSeen = seenTypes?.Contains(unwrappedType) ?? false; (seenTypes ?? (seenTypes = new List())).Add(unwrappedType); - NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[]{} : + NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[] { } : unwrappedType.GetInterfaces() .Concat(InfoAttribute.PossibleTypes) .SelectMany(pt => pt.GetProperties() @@ -366,6 +379,7 @@ internal class CommentInfo public string OnlineVersion { get; } public string[] RelatedLinks { get; } + public string[] ExternalUrls { get; } private const string HelpLinkPrefix = @"https://learn.microsoft.com/powershell/module/"; @@ -391,6 +405,9 @@ public CommentInfo(VariantGroup variantGroup) var moduleName = variantGroup.RootModuleName == "" ? variantGroup.ModuleName.ToLowerInvariant() : variantGroup.RootModuleName.ToLowerInvariant(); OnlineVersion = helpInfo.OnlineVersion?.Uri.NullIfEmpty() ?? $@"{HelpLinkPrefix}{moduleName}/{variantGroup.CmdletName.ToLowerInvariant()}"; RelatedLinks = helpInfo.RelatedLinks.Select(rl => rl.Text).ToArray(); + + // Get external urls from attribute + ExternalUrls = variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Select(e => e.Url)?.Distinct()?.ToArray(); } } @@ -420,11 +437,22 @@ public CompleterInfo(ArgumentCompleterAttribute completerAttribute) } } + internal class PSArgumentCompleterInfo : CompleterInfo + { + public string[] ResourceTypes { get; } + + public PSArgumentCompleterInfo(PSArgumentCompleterAttribute completerAttribute) : base(completerAttribute) + { + ResourceTypes = completerAttribute.ResourceTypes; + } + } + internal class DefaultInfo { public string Name { get; } public string Description { get; } public string Script { get; } + public string SetCondition { get; } public ParameterGroup ParameterGroup { get; } public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) @@ -432,6 +460,7 @@ public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterG Name = infoAttribute.Name; Description = infoAttribute.Description; Script = infoAttribute.Script; + SetCondition = infoAttribute.SetCondition; ParameterGroup = parameterGroup; } @@ -479,7 +508,8 @@ public static Parameter[] ToParameters(this Variant variant) parameterHelp = parameterHelp.Where(ph => (!ph.ParameterSetNames.Any() || ph.ParameterSetNames.Any(psn => psn == variant.VariantName || psn == AllParameterSets)) && ph.Name != "IncludeTotalCount"); } var result = parameters.Select(p => new Parameter(variant.VariantName, p.Key, p.Value, parameterHelp.FirstOrDefault(ph => ph.Name == p.Key))); - if (variant.SupportsPaging) { + if (variant.SupportsPaging) + { // If supportsPaging is set, we will need to add First and Skip parameters since they are treated as common parameters which as not contained on Metadata>parameters variant.Info.Parameters["First"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Gets only the first 'n' objects."; variant.Info.Parameters["Skip"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Ignores the first 'n' objects and then gets the remaining objects."; @@ -507,7 +537,7 @@ public static ComplexInterfaceInfo ToComplexInterfaceInfo(this InfoAttribute inf public static CompleterInfo ToCompleterInfo(this CompleterInfoAttribute infoAttribute) => new CompleterInfo(infoAttribute); public static CompleterInfo ToCompleterInfo(this ArgumentCompleterAttribute completerAttribute) => new CompleterInfo(completerAttribute); - + public static PSArgumentCompleterInfo ToPSArgumentCompleterInfo(this PSArgumentCompleterAttribute completerAttribute) => new PSArgumentCompleterInfo(completerAttribute); public static DefaultInfo ToDefaultInfo(this DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) => new DefaultInfo(infoAttribute, parameterGroup); public static DefaultInfo ToDefaultInfo(this PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) => new DefaultInfo(defaultValueAttribute, parameterGroup); } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/PsAttributes.cs index d7d912e2c067..6166461979df 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/PsAttributes.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/PsAttributes.cs @@ -55,6 +55,11 @@ public class HttpPathAttribute : Attribute public string ApiVersion { get; set; } } + [AttributeUsage(AttributeTargets.Class)] + public class NotSuggestDefaultParameterSetAttribute : Attribute + { + } + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] public class CategoryAttribute : Attribute { @@ -109,6 +114,11 @@ public enum PropertyOrigin Inlined } + [AttributeUsage(AttributeTargets.Property)] + public class ConstantAttribute : Attribute + { + } + [AttributeUsage(AttributeTargets.Property)] public class FormatTableAttribute : Attribute { diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/PsExtensions.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/PsExtensions.cs index 5cef039a38f5..100f6f3f1705 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/PsExtensions.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/PsExtensions.cs @@ -13,6 +13,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PowerShell { internal static class PsExtensions { + public static PSObject AddMultipleTypeNameIntoPSObject(this object obj, string multipleTag = "#Multiple") + { + var psObj = new PSObject(obj); + psObj.TypeNames.Insert(0, $"{psObj.TypeNames[0]}{multipleTag}"); + return psObj; + } + // https://stackoverflow.com/a/863944/294804 // https://stackoverflow.com/a/4452598/294804 // https://stackoverflow.com/a/28701974/294804 diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/PsHelpers.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/PsHelpers.cs index d47558f11fae..a4152618bbea 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/PsHelpers.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/BuildTime/PsHelpers.cs @@ -67,7 +67,7 @@ public static IEnumerable GetScriptHelpInfo(params string[] modulePath public static IEnumerable GetModuleCmdletsAndHelpInfo(PSCmdlet cmdlet, params string[] modulePaths) { - var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => + var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => $@"(Get-Command -Module (Import-Module '{mp}' -PassThru) | Where-Object {{ $_.CommandType -ne 'Alias' }} | ForEach-Object {{ @{{ CommandInfo = $_; HelpInfo = ( invoke-command {{ try {{ Get-Help -Name $_.Name -Full }} catch{{ '' }} }} ) }} }})" )); return (cmdlet?.RunScript(getCmdletAndHelp) ?? RunScript(getCmdletAndHelp)) @@ -88,7 +88,7 @@ public static Guid ReadGuidFromPsd1(string psd1Path) if (File.Exists(psd1Path)) { var currentGuid = File.ReadAllLines(psd1Path) - .FirstOrDefault(l => l.StartsWith(GuidStart))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) + .FirstOrDefault(l => l.TrimStart().StartsWith(GuidStart.TrimStart()))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) .LastOrDefault()?.Replace("'", String.Empty); guid = currentGuid != null ? Guid.Parse(currentGuid) : guid; } diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Context.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Context.cs new file mode 100644 index 000000000000..06bb8c533452 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Context.cs @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime +{ + + using System; + using System.Linq; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData = System.Func; + using static Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Extensions; + + /// + /// The IContext Interface defines the communication mechanism for input customization. + /// + /// + /// In the context, we will have client, pipeline, PSBoundParamters, default EventListener, Cancellation. + /// + public interface IContext + { + System.Management.Automation.InvocationInfo InvocationInformation { get; set; } + System.Threading.CancellationTokenSource CancellationTokenSource { get; set; } + System.Collections.Generic.IDictionary ExtensibleParameters { get; } + HttpPipeline Pipeline { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.ServiceBus Client { get; } + } +} diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Events.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Events.cs index 68cf44b08dac..4dd5e245fb72 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Events.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Events.cs @@ -22,6 +22,6 @@ public static partial class Events public const string FollowingNextLink = nameof(FollowingNextLink); public const string DelayBeforePolling = nameof(DelayBeforePolling); public const string Polling = nameof(Polling); - + public const string Progress = nameof(Progress); } -} \ No newline at end of file +} diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/ISendAsync.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/ISendAsync.cs index a8e889329d96..e983973c7968 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/ISendAsync.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/ISendAsync.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime using System.Threading.Tasks; using System.Collections; using System.Linq; + using System; + /// /// The interface for sending an HTTP request across the wire. @@ -70,6 +72,7 @@ public interface ISendAsyncTerminalFactory public partial class HttpPipeline : ISendAsync { + private const int DefaultMaxRetry = 3; private ISendAsync pipeline; private ISendAsyncTerminalFactory terminal; private List steps = new List(); @@ -92,6 +95,111 @@ public HttpPipeline(ISendAsyncTerminalFactory terminalStep) /// public HttpPipeline Clone() => new HttpPipeline(terminal) { steps = this.steps.ToList(), pipeline = this.pipeline }; + private bool shouldRetry429(HttpResponseMessage response) + { + if (response.StatusCode == (System.Net.HttpStatusCode)429) + { + var retryAfter = response.Headers.RetryAfter; + if (retryAfter != null && retryAfter.Delta.HasValue) + { + return true; + } + } + return false; + } + /// + /// The step to handle 429 response with retry-after header. + /// + public async Task Retry429(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = int.MaxValue; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES_FOR_429")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES_FOR_429")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetry429(response) && count++ < retryCount) + { + request = await cloneRequest.CloneWithContent(); + var retryAfter = response.Headers.RetryAfter; + await Task.Delay(retryAfter.Delta.Value, callback.Token); + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code 429 after waiting {retryAfter.Delta.Value.TotalSeconds} seconds."); + response = await next.SendAsync(request, callback); + } + return response; + } + + private bool shouldRetryError(HttpResponseMessage response) + { + if (response.StatusCode >= System.Net.HttpStatusCode.InternalServerError) + { + if (response.StatusCode != System.Net.HttpStatusCode.NotImplemented && + response.StatusCode != System.Net.HttpStatusCode.HttpVersionNotSupported) + { + return true; + } + } + else if (response.StatusCode == System.Net.HttpStatusCode.RequestTimeout) + { + return true; + } + else if (response.StatusCode == (System.Net.HttpStatusCode)429 && response.Headers.RetryAfter == null) + { + return true; + } + return false; + } + + /// + /// Returns true if status code in HttpRequestExceptionWithStatus exception is greater + /// than or equal to 500 and not NotImplemented (501) or HttpVersionNotSupported (505). + /// Or it's 429 (TOO MANY REQUESTS) without Retry-After header. + /// + public async Task RetryError(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = DefaultMaxRetry; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetryError(response) && count++ < retryCount) + { + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code {response.StatusCode}"); + request = await cloneRequest.CloneWithContent(); + response = await next.SendAsync(request, callback); + } + return response; + } + public ISendAsyncTerminalFactory TerminalFactory { get => terminal; @@ -117,6 +225,11 @@ public ISendAsync Pipeline // create the pipeline from scratch. var next = terminal.Create(); + if (Convert.ToBoolean(@"true")) + { + next = (new SendAsyncFactory(Retry429)).Create(next) ?? next; + next = (new SendAsyncFactory(RetryError)).Create(next) ?? next; + } foreach (var factory in steps) { // skip factories that return null. diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/InfoAttribute.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/InfoAttribute.cs index a96700f8fd1e..7b9dd12bfa61 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/InfoAttribute.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/InfoAttribute.cs @@ -11,6 +11,9 @@ public class InfoAttribute : Attribute { public bool Required { get; set; } = false; public bool ReadOnly { get; set; } = false; + public bool Read { get; set; } = true; + public bool Create { get; set; } = true; + public bool Update { get; set; } = true; public Type[] PossibleTypes { get; set; } = new Type[0]; public string Description { get; set; } = ""; public string SerializedName { get; set; } = ""; @@ -30,5 +33,6 @@ public class DefaultInfoAttribute : Attribute public string Script { get; set; } = ""; public string Name { get; set; } = ""; public string Description { get; set; } = ""; + public string SetCondition { get; set; } = ""; } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/InputHandler.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/InputHandler.cs new file mode 100644 index 000000000000..84fed961dd74 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/InputHandler.cs @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Cmdlets +{ + public abstract class InputHandler + { + protected InputHandler NextHandler = null; + + public void SetNextHandler(InputHandler nextHandler) + { + this.NextHandler = nextHandler; + } + + public abstract void Process(Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.IContext context); + } +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs index 00165a0a7b2c..e85260769aff 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs @@ -21,6 +21,11 @@ internal XNodeArray(params JsonNode[] values) items = new List(values); } + internal XNodeArray(System.Collections.Generic.List values) + { + items = new List(values); + } + public override JsonNode this[int index] => items[index]; internal override JsonType? ElementType => null; diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/SerializationMode.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/SerializationMode.cs index 5efc413e2eb0..5f93d9d077f5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/SerializationMode.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/SerializationMode.cs @@ -9,8 +9,10 @@ public enum SerializationMode { None = 0, IncludeHeaders = 1 << 0, - IncludeReadOnly = 1 << 1, - - IncludeAll = IncludeHeaders | IncludeReadOnly + IncludeRead = 1 << 1, + IncludeCreate = 1 << 2, + IncludeUpdate = 1 << 3, + IncludeAll = IncludeHeaders | IncludeRead | IncludeCreate | IncludeUpdate, + IncludeCreateOrUpdate = IncludeCreate | IncludeUpdate } } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/TypeConverterExtensions.cs b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/TypeConverterExtensions.cs index a54911c72330..071a3d7b0455 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generated/runtime/TypeConverterExtensions.cs +++ b/src/ServiceBus/ServiceBus.Autorest/generated/runtime/TypeConverterExtensions.cs @@ -62,6 +62,56 @@ internal static T[] SelectToArray(object source, System.Func return result.ToArray(); } + internal static System.Collections.Generic.List SelectToList(object source, System.Func converter) + { + // null begets null + if (source == null) + { + return null; + } + + // single values and strings are just encapsulated in the array. + if (source is string || !(source is System.Collections.IEnumerable)) + { + try + { + return new T[] { (T)converter(source) }.ToList(); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + return new T[0].ToList(); // empty result if couldn't convert. + } + + var result = new System.Collections.Generic.List(); + foreach (var each in (System.Collections.IEnumerable)source) + { + try + { + result.Add((T)converter(each)); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + } + return result; + } internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Collections.Generic.IDictionary dictionary) { if (null != dictionary) diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Approve-AzServiceBusPrivateEndpointConnection.md b/src/ServiceBus/ServiceBus.Autorest/help/Approve-AzServiceBusPrivateEndpointConnection.md index 34b078f13387..6dd9d2374278 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Approve-AzServiceBusPrivateEndpointConnection.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Approve-AzServiceBusPrivateEndpointConnection.md @@ -216,7 +216,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Az.ServiceBus.md b/src/ServiceBus/ServiceBus.Autorest/help/Az.ServiceBus.md index 55c1c5a89c3e..3a96dbfb908b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Az.ServiceBus.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Az.ServiceBus.md @@ -61,7 +61,7 @@ Returns a description for the specified topic. Creates a ServiceBus Namespace, Queue, Topic Authorization Rule ### [New-AzServiceBusGeoDRConfiguration](New-AzServiceBusGeoDRConfiguration.md) -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) ### [New-AzServiceBusIPRuleConfig](New-AzServiceBusIPRuleConfig.md) Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzServiceBusNetworkRuleSet @@ -76,17 +76,17 @@ Create an in-memory object for KeyVaultProperties. Creates a new ServiceBus namespace. ### [New-AzServiceBusQueue](New-AzServiceBusQueue.md) -Creates or updates a Service Bus queue. +Create a Service Bus queue. This operation is idempotent. ### [New-AzServiceBusRule](New-AzServiceBusRule.md) -Creates a new rule and updates an existing rule +Create a new rule and updates an existing rule ### [New-AzServiceBusSubscription](New-AzServiceBusSubscription.md) -Creates a topic subscription. +Create a topic subscription. ### [New-AzServiceBusTopic](New-AzServiceBusTopic.md) -Creates a topic in the specified namespace. +Create a topic in the specified namespace. ### [New-AzServiceBusVirtualNetworkRuleConfig](New-AzServiceBusVirtualNetworkRuleConfig.md) Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzServiceBusNetworkRuleSet @@ -147,7 +147,7 @@ Updates a ServiceBus Subscription Updates a ServiceBus Topic ### [Start-AzServiceBusMigration](Start-AzServiceBusMigration.md) -Creates Migration configuration and starts migration of entities from Standard to Premium namespace +Create Migration configuration and starts migration of entities from Standard to Premium namespace ### [Stop-AzServiceBusMigration](Stop-AzServiceBusMigration.md) This operation reverts Migration diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Complete-AzServiceBusMigration.md b/src/ServiceBus/ServiceBus.Autorest/help/Complete-AzServiceBusMigration.md index 34147f05a3f1..55af6a4900f2 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Complete-AzServiceBusMigration.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Complete-AzServiceBusMigration.md @@ -59,7 +59,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Deny-AzServiceBusPrivateEndpointConnection.md b/src/ServiceBus/ServiceBus.Autorest/help/Deny-AzServiceBusPrivateEndpointConnection.md index d077f663e3c3..4301dc92acfa 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Deny-AzServiceBusPrivateEndpointConnection.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Deny-AzServiceBusPrivateEndpointConnection.md @@ -216,7 +216,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusAuthorizationRule.md b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusAuthorizationRule.md index 2a7a2687797c..e1f5bf0e8738 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusAuthorizationRule.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusAuthorizationRule.md @@ -234,7 +234,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusGeoDRConfiguration.md b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusGeoDRConfiguration.md index c7ee2f91b733..64415cdd2228 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusGeoDRConfiguration.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusGeoDRConfiguration.md @@ -30,6 +30,12 @@ Get-AzServiceBusGeoDRConfiguration -InputObject [-DefaultP [] ``` +### GetViaIdentityNamespace +``` +Get-AzServiceBusGeoDRConfiguration -Name -NamespaceInputObject + [-DefaultProfile ] [] +``` + ## DESCRIPTION Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace @@ -74,7 +80,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -93,7 +98,7 @@ The Disaster Recovery configuration name ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, GetViaIdentityNamespace Aliases: Required: True @@ -103,6 +108,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -158,7 +178,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusKey.md b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusKey.md index 0a956d528f50..004dd4a94b9b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusKey.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusKey.md @@ -252,7 +252,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusMigration.md b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusMigration.md index a2a0609c9193..0d710731e581 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusMigration.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusMigration.md @@ -81,7 +81,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -150,7 +149,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusNamespace.md b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusNamespace.md index a7368834cde3..d56edfcfcb70 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusNamespace.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusNamespace.md @@ -136,7 +136,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -205,7 +204,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace ## NOTES @@ -215,3 +214,7 @@ Get-AzServiceBusNamespaceV2 ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx) + +[https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx) + diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusNetworkRuleSet.md b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusNetworkRuleSet.md index 7e0408b5d065..5ff2fb83615b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusNetworkRuleSet.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusNetworkRuleSet.md @@ -73,7 +73,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -142,7 +141,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusPrivateEndpointConnection.md b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusPrivateEndpointConnection.md index d29ee6ca999c..d6e9af1374a8 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusPrivateEndpointConnection.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusPrivateEndpointConnection.md @@ -30,6 +30,12 @@ Get-AzServiceBusPrivateEndpointConnection -InputObject [-D [] ``` +### GetViaIdentityNamespace +``` +Get-AzServiceBusPrivateEndpointConnection -Name -NamespaceInputObject + [-DefaultProfile ] [] +``` + ## DESCRIPTION Gets a description for the specified Private Endpoint Connection. @@ -81,7 +87,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -100,7 +105,7 @@ The PrivateEndpointConnection name ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, GetViaIdentityNamespace Aliases: PrivateEndpointConnectionName Required: True @@ -110,6 +115,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -165,9 +185,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection ## NOTES ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx) + +[https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx) + diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusPrivateLink.md b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusPrivateLink.md index 662f85d322cf..27b30ec7edf0 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusPrivateLink.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusPrivateLink.md @@ -109,9 +109,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult ## NOTES ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx) + diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusQueue.md b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusQueue.md index afa27b0f8f11..fa31a1ca06c5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusQueue.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusQueue.md @@ -29,6 +29,12 @@ Get-AzServiceBusQueue -Name -NamespaceName -ResourceGroupName Get-AzServiceBusQueue -InputObject [-DefaultProfile ] [] ``` +### GetViaIdentityNamespace +``` +Get-AzServiceBusQueue -Name -NamespaceInputObject [-DefaultProfile ] + [] +``` + ## DESCRIPTION Returns a description for the specified queue. @@ -100,7 +106,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -119,7 +124,7 @@ The queue name. ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, GetViaIdentityNamespace Aliases: QueueName Required: True @@ -129,6 +134,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -215,9 +235,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue ## NOTES ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639380.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639380.aspx) + +[https://msdn.microsoft.com/en-us/library/azure/mt639415.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639415.aspx) + diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusRule.md b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusRule.md index d1592bae1af0..caa96ed6da02 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusRule.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusRule.md @@ -31,6 +31,24 @@ Get-AzServiceBusRule -Name -NamespaceName -ResourceGroupName < Get-AzServiceBusRule -InputObject [-DefaultProfile ] [] ``` +### GetViaIdentityNamespace +``` +Get-AzServiceBusRule -Name -NamespaceInputObject -SubscriptionName + -TopicName [-DefaultProfile ] [] +``` + +### GetViaIdentitySubscription +``` +Get-AzServiceBusRule -Name -SubscriptionInputObject + [-DefaultProfile ] [] +``` + +### GetViaIdentityTopic +``` +Get-AzServiceBusRule -Name -SubscriptionName -TopicInputObject + [-DefaultProfile ] [] +``` + ## DESCRIPTION Retrieves the description for the specified rule. @@ -93,7 +111,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -112,7 +129,7 @@ The rule name. ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, GetViaIdentityNamespace, GetViaIdentitySubscription, GetViaIdentityTopic Aliases: RuleName Required: True @@ -122,6 +139,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -184,12 +216,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -SubscriptionInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentitySubscription +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -SubscriptionName The subscription name. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: Get, GetViaIdentityNamespace, GetViaIdentityTopic, List Aliases: Required: True @@ -214,12 +261,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -TopicInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentityTopic +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -TopicName The topic name. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: Get, GetViaIdentityNamespace, List Aliases: Required: True @@ -238,7 +300,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusSubscription.md b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusSubscription.md index 434a94046815..34f25b378554 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusSubscription.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusSubscription.md @@ -30,6 +30,18 @@ Get-AzServiceBusSubscription -InputObject [-DefaultProfile [] ``` +### GetViaIdentityNamespace +``` +Get-AzServiceBusSubscription -Name -NamespaceInputObject -TopicName + [-DefaultProfile ] [] +``` + +### GetViaIdentityTopic +``` +Get-AzServiceBusSubscription -Name -TopicInputObject + [-DefaultProfile ] [] +``` + ## DESCRIPTION Returns a subscription description for the specified topic. @@ -101,7 +113,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -120,7 +131,7 @@ The subscription name. ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, GetViaIdentityNamespace, GetViaIdentityTopic Aliases: SubscriptionName Required: True @@ -130,6 +141,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -207,12 +233,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -TopicInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentityTopic +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -TopicName The topic name. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: Get, GetViaIdentityNamespace, List Aliases: Required: True @@ -231,9 +272,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription ## NOTES ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639402.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639402.aspx) + +[https://msdn.microsoft.com/en-us/library/azure/mt639400.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639400.aspx) + diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusTopic.md b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusTopic.md index eb10cb3092c7..01ff7c84ac16 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusTopic.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Get-AzServiceBusTopic.md @@ -29,6 +29,12 @@ Get-AzServiceBusTopic -Name -NamespaceName -ResourceGroupName Get-AzServiceBusTopic -InputObject [-DefaultProfile ] [] ``` +### GetViaIdentityNamespace +``` +Get-AzServiceBusTopic -Name -NamespaceInputObject [-DefaultProfile ] + [] +``` + ## DESCRIPTION Returns a description for the specified topic. @@ -90,7 +96,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -109,7 +114,7 @@ The topic name. ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, GetViaIdentityNamespace Aliases: TopicName Required: True @@ -119,6 +124,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -205,9 +225,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic ## NOTES ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639399.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639399.aspx) + +[https://msdn.microsoft.com/en-us/library/azure/mt639388.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639388.aspx) + diff --git a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusAuthorizationRule.md b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusAuthorizationRule.md index 638d948c192a..a7808b0551b6 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusAuthorizationRule.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusAuthorizationRule.md @@ -15,21 +15,21 @@ Creates a ServiceBus Namespace, Queue, Topic Authorization Rule ### NewExpandedNamespace (Default) ``` New-AzServiceBusAuthorizationRule -Name -NamespaceName -ResourceGroupName - -Rights [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] + -Rights [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] ``` ### NewExpandedQueue ``` New-AzServiceBusAuthorizationRule -Name -NamespaceName -QueueName - -ResourceGroupName -Rights [-SubscriptionId ] [-DefaultProfile ] + -ResourceGroupName -Rights [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ### NewExpandedTopic ``` New-AzServiceBusAuthorizationRule -Name -NamespaceName -ResourceGroupName - -TopicName -Rights [-SubscriptionId ] [-DefaultProfile ] [-AsJob] + -TopicName -Rights [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -180,7 +180,7 @@ Accept wildcard characters: False The rights associated with the rule. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[] +Type: System.String[] Parameter Sets: (All) Aliases: @@ -259,7 +259,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusGeoDRConfiguration.md b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusGeoDRConfiguration.md index 5c70f69ac9a2..0a034b7a1ebe 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusGeoDRConfiguration.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusGeoDRConfiguration.md @@ -8,18 +8,33 @@ schema: 2.0.0 # New-AzServiceBusGeoDRConfiguration ## SYNOPSIS -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) ## SYNTAX +### CreateExpanded (Default) ``` New-AzServiceBusGeoDRConfiguration -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-AlternateName ] [-PartnerNamespace ] [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] ``` +### CreateViaIdentityNamespace +``` +New-AzServiceBusGeoDRConfiguration -Name -NamespaceInputObject + -Parameter [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzServiceBusGeoDRConfiguration -Name -NamespaceInputObject + [-AlternateName ] [-PartnerNamespace ] [-DefaultProfile ] [-PassThru] [-Confirm] + [-WhatIf] [] +``` + ## DESCRIPTION -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) ## EXAMPLES @@ -50,7 +65,7 @@ Primary/Secondary eventhub namespace name, which is part of GEO DR pairing ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -91,12 +106,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: CreateViaIdentityNamespace, CreateViaIdentityNamespaceExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -106,12 +136,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +Single item in List or Get Alias(Disaster Recovery configuration) operation + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery +Parameter Sets: CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -PartnerNamespace ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -141,7 +186,7 @@ Name of the Resource group within the Azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -157,7 +202,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -203,9 +248,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery + +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusIPRuleConfig.md b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusIPRuleConfig.md index 9028cce523c0..9ee921daa73f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusIPRuleConfig.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusIPRuleConfig.md @@ -13,7 +13,7 @@ Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzService ## SYNTAX ``` -New-AzServiceBusIPRuleConfig -IPMask [-Action ] [] +New-AzServiceBusIPRuleConfig -IPMask [-Action ] [] ``` ## DESCRIPTION @@ -40,7 +40,7 @@ Please refer examples for Set-AzServiceBusNetworkRuleSet to know more. The IP Filter Action ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction +Type: System.String Parameter Sets: (All) Aliases: @@ -73,7 +73,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusKey.md b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusKey.md index bef882aa71bf..f03cb6bd0d6e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusKey.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusKey.md @@ -14,7 +14,7 @@ Regenerates the SASKey of a ServiceBus namespace, queue or topic. ### NewExpandedNamespace (Default) ``` -New-AzServiceBusKey -Name -NamespaceName -ResourceGroupName -KeyType +New-AzServiceBusKey -Name -NamespaceName -ResourceGroupName -KeyType [-SubscriptionId ] [-KeyValue ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -22,14 +22,14 @@ New-AzServiceBusKey -Name -NamespaceName -ResourceGroupName -NamespaceName -QueueName -ResourceGroupName - -KeyType [-SubscriptionId ] [-KeyValue ] [-DefaultProfile ] [-AsJob] + -KeyType [-SubscriptionId ] [-KeyValue ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ### NewExpandedTopic ``` New-AzServiceBusKey -Name -NamespaceName -ResourceGroupName -TopicName - -KeyType [-SubscriptionId ] [-KeyValue ] [-DefaultProfile ] [-AsJob] + -KeyType [-SubscriptionId ] [-KeyValue ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -119,7 +119,7 @@ Accept wildcard characters: False The access key to regenerate. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType +Type: System.String Parameter Sets: (All) Aliases: RegenerateKey @@ -289,7 +289,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusKeyVaultPropertiesObject.md b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusKeyVaultPropertiesObject.md index 233943f091a1..c328ae32a10f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusKeyVaultPropertiesObject.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusKeyVaultPropertiesObject.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.ServiceBus -online version: https://learn.microsoft.com/powershell/module/Az.ServiceBus/new-AzServiceBusKeyVaultPropertiesObject +online version: https://learn.microsoft.com/powershell/module/Az.ServiceBus/new-azservicebuskeyvaultpropertiesobject schema: 2.0.0 --- @@ -120,7 +120,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultProperties +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultProperties ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusNamespace.md b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusNamespace.md index cb0dd8a1fe99..14a5d8a5ff6f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusNamespace.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusNamespace.md @@ -14,12 +14,11 @@ Creates a new ServiceBus namespace. ``` New-AzServiceBusNamespace -Name -ResourceGroupName -Location - [-SubscriptionId ] [-AlternateName ] [-DisableLocalAuth] - [-IdentityType ] [-KeyVaultProperty ] - [-MinimumTlsVersion ] [-PremiumMessagingPartition ] - [-PublicNetworkAccess ] [-RequireInfrastructureEncryption] [-SkuCapacity ] - [-SkuName ] [-Tag ] [-UserAssignedIdentityId ] [-ZoneRedundant] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-SubscriptionId ] [-AlternateName ] [-DisableLocalAuth] [-IdentityType ] + [-KeyVaultProperty ] [-MinimumTlsVersion ] + [-PremiumMessagingPartition ] [-PublicNetworkAccess ] [-RequireInfrastructureEncryption] + [-SkuCapacity ] [-SkuName ] [-Tag ] [-UserAssignedIdentityId ] + [-ZoneRedundant] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -263,7 +262,7 @@ Accept wildcard characters: False Type of managed service identity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType +Type: System.String Parameter Sets: (All) Aliases: @@ -276,10 +275,9 @@ Accept wildcard characters: False ### -KeyVaultProperty Properties of KeyVault -To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties[] Parameter Sets: (All) Aliases: @@ -373,7 +371,7 @@ This determines if traffic is allowed over public network. By default it is enabled. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess +Type: System.String Parameter Sets: (All) Aliases: @@ -434,7 +432,7 @@ Accept wildcard characters: False Name of this SKU. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName +Type: System.String Parameter Sets: (All) Aliases: @@ -543,7 +541,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusQueue.md b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusQueue.md index 12c4e0edd35e..98e59739b1d9 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusQueue.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusQueue.md @@ -8,11 +8,12 @@ schema: 2.0.0 # New-AzServiceBusQueue ## SYNOPSIS -Creates or updates a Service Bus queue. +Create a Service Bus queue. This operation is idempotent. ## SYNTAX +### CreateExpanded (Default) ``` New-AzServiceBusQueue -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-AutoDeleteOnIdle ] [-DeadLetteringOnMessageExpiration] @@ -20,12 +21,28 @@ New-AzServiceBusQueue -Name -NamespaceName -ResourceGroupName [-EnableBatchedOperations] [-EnableExpress] [-EnablePartitioning] [-ForwardDeadLetteredMessagesTo ] [-ForwardTo ] [-LockDuration ] [-MaxDeliveryCount ] [-MaxMessageSizeInKilobytes ] [-MaxSizeInMegabytes ] [-RequiresDuplicateDetection] - [-RequiresSession] [-Status ] [-DefaultProfile ] [-Confirm] [-WhatIf] - [] + [-RequiresSession] [-Status ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityNamespace +``` +New-AzServiceBusQueue -Name -NamespaceInputObject -Parameter + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzServiceBusQueue -Name -NamespaceInputObject + [-AutoDeleteOnIdle ] [-DeadLetteringOnMessageExpiration] [-DefaultMessageTimeToLive ] + [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] [-EnableExpress] + [-EnablePartitioning] [-ForwardDeadLetteredMessagesTo ] [-ForwardTo ] + [-LockDuration ] [-MaxDeliveryCount ] [-MaxMessageSizeInKilobytes ] + [-MaxSizeInMegabytes ] [-RequiresDuplicateDetection] [-RequiresSession] [-Status ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION -Creates or updates a Service Bus queue. +Create a Service Bus queue. This operation is idempotent. ## EXAMPLES @@ -77,7 +94,7 @@ The minimum duration is 5 minutes. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -92,7 +109,7 @@ A value that indicates whether this queue has dead letter support when a message ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -108,7 +125,7 @@ This is the default value used when TimeToLive is not set on a message itself. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -140,7 +157,7 @@ The default value is 10 minutes. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -155,7 +172,7 @@ Value that indicates whether server-side batched operations are enabled. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -171,7 +188,7 @@ An express queue holds a message in memory temporarily before writing it to pers ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -186,7 +203,7 @@ A value that indicates whether the queue is to be partitioned across multiple me ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -201,7 +218,7 @@ Queue/Topic name to forward the Dead Letter message ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -216,7 +233,7 @@ Queue/Topic name to forward the messages ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -232,7 +249,7 @@ The maximum value for LockDuration is 5 minutes; the default value is 1 minute. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -249,7 +266,7 @@ default value is 10. ```yaml Type: System.Int32 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -265,7 +282,7 @@ This property is only used in Premium today and default is 1024. ```yaml Type: System.Int64 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -281,7 +298,7 @@ Default is 1024. ```yaml Type: System.Int32 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -306,12 +323,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: CreateViaIdentityNamespace, CreateViaIdentityNamespaceExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -321,12 +353,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +Description of queue Resource. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue +Parameter Sets: CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -RequiresDuplicateDetection A value indicating if this queue requires duplicate detection. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -341,7 +388,7 @@ A value that indicates whether the queue supports the concept of sessions. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -356,7 +403,7 @@ Name of the Resource group within the Azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -370,8 +417,8 @@ Accept wildcard characters: False Enumerates the possible values for the status of a messaging entity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -387,7 +434,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -433,11 +480,17 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue + +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue ## NOTES ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639395.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639395.aspx) + diff --git a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusRule.md b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusRule.md index 1c5e996af54c..dea4f6f0ea4b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusRule.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusRule.md @@ -8,22 +8,74 @@ schema: 2.0.0 # New-AzServiceBusRule ## SYNOPSIS -Creates a new rule and updates an existing rule +Create a new rule and updates an existing rule ## SYNTAX +### CreateExpanded (Default) ``` New-AzServiceBusRule -Name -NamespaceName -ResourceGroupName -SubscriptionName -TopicName [-SubscriptionId ] [-ActionRequiresPreprocessing] [-ActionSqlExpression ] [-ContentType ] [-CorrelationFilterProperty ] - [-CorrelationFilterRequiresPreprocessing] [-CorrelationId ] [-FilterType ] - [-Label ] [-MessageId ] [-ReplyTo ] [-ReplyToSessionId ] - [-SessionId ] [-SqlExpression ] [-SqlFilterRequiresPreprocessing] [-To ] + [-CorrelationFilterRequiresPreprocessing] [-CorrelationId ] [-FilterType ] [-Label ] + [-MessageId ] [-ReplyTo ] [-ReplyToSessionId ] [-SessionId ] + [-SqlExpression ] [-SqlFilterRequiresPreprocessing] [-To ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityNamespace +``` +New-AzServiceBusRule -Name -NamespaceInputObject -SubscriptionName + -TopicName -Parameter [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzServiceBusRule -Name -NamespaceInputObject -SubscriptionName + -TopicName [-ActionRequiresPreprocessing] [-ActionSqlExpression ] [-ContentType ] + [-CorrelationFilterProperty ] [-CorrelationFilterRequiresPreprocessing] [-CorrelationId ] + [-FilterType ] [-Label ] [-MessageId ] [-ReplyTo ] + [-ReplyToSessionId ] [-SessionId ] [-SqlExpression ] + [-SqlFilterRequiresPreprocessing] [-To ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### CreateViaIdentitySubscription +``` +New-AzServiceBusRule -Name -SubscriptionInputObject -Parameter [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` +### CreateViaIdentitySubscriptionExpanded +``` +New-AzServiceBusRule -Name -SubscriptionInputObject + [-ActionRequiresPreprocessing] [-ActionSqlExpression ] [-ContentType ] + [-CorrelationFilterProperty ] [-CorrelationFilterRequiresPreprocessing] [-CorrelationId ] + [-FilterType ] [-Label ] [-MessageId ] [-ReplyTo ] + [-ReplyToSessionId ] [-SessionId ] [-SqlExpression ] + [-SqlFilterRequiresPreprocessing] [-To ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### CreateViaIdentityTopic +``` +New-AzServiceBusRule -Name -SubscriptionName -TopicInputObject + -Parameter [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityTopicExpanded +``` +New-AzServiceBusRule -Name -SubscriptionName -TopicInputObject + [-ActionRequiresPreprocessing] [-ActionSqlExpression ] [-ContentType ] + [-CorrelationFilterProperty ] [-CorrelationFilterRequiresPreprocessing] [-CorrelationId ] + [-FilterType ] [-Label ] [-MessageId ] [-ReplyTo ] + [-ReplyToSessionId ] [-SessionId ] [-SqlExpression ] + [-SqlFilterRequiresPreprocessing] [-To ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + ## DESCRIPTION -Creates a new rule and updates an existing rule +Create a new rule and updates an existing rule ## EXAMPLES @@ -97,7 +149,7 @@ Value that indicates whether the rule action requires preprocessing. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -114,7 +166,7 @@ MyProperty='ABC' ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -129,7 +181,7 @@ Content type of the message. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -144,7 +196,7 @@ dictionary object for custom filters ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -159,7 +211,7 @@ Value that indicates whether the rule action requires preprocessing. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -174,7 +226,7 @@ Identifier of the correlation. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -204,8 +256,8 @@ Accept wildcard characters: False Filter type that is evaluated against a BrokeredMessage. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -220,7 +272,7 @@ Application specific label. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -235,7 +287,7 @@ Identifier of the message. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -260,12 +312,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: CreateViaIdentityNamespace, CreateViaIdentityNamespaceExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -275,12 +342,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +Description of Rule Resource. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule +Parameter Sets: CreateViaIdentityNamespace, CreateViaIdentitySubscription, CreateViaIdentityTopic +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -ReplyTo Address of the queue to reply to. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -295,7 +377,7 @@ Session identifier to reply to. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -310,7 +392,7 @@ Name of the Resource group within the Azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -325,7 +407,7 @@ Session identifier. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -342,7 +424,7 @@ MyProperty='ABC' ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -357,7 +439,7 @@ Value that indicates whether the rule action requires preprocessing. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -373,7 +455,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -383,12 +465,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -SubscriptionInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: CreateViaIdentitySubscription, CreateViaIdentitySubscriptionExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -SubscriptionName The subscription name. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespace, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopic, CreateViaIdentityTopicExpanded Aliases: Required: True @@ -403,7 +500,7 @@ Address to send to. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -413,12 +510,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -TopicInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: CreateViaIdentityTopic, CreateViaIdentityTopicExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -TopicName The topic name. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespace, CreateViaIdentityNamespaceExpanded Aliases: Required: True @@ -464,9 +576,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusSubscription.md b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusSubscription.md index 5d3cb3fdcd32..4ee8c81ee42a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusSubscription.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusSubscription.md @@ -8,10 +8,11 @@ schema: 2.0.0 # New-AzServiceBusSubscription ## SYNOPSIS -Creates a topic subscription. +Create a topic subscription. ## SYNTAX +### CreateExpanded (Default) ``` New-AzServiceBusSubscription -Name -NamespaceName -ResourceGroupName -TopicName [-SubscriptionId ] [-AutoDeleteOnIdle ] [-ClientId ] @@ -19,11 +20,45 @@ New-AzServiceBusSubscription -Name -NamespaceName -ResourceGro [-DefaultMessageTimeToLive ] [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] [-ForwardDeadLetteredMessagesTo ] [-ForwardTo ] [-IsClientAffine] [-IsDurable] [-IsShared] [-LockDuration ] [-MaxDeliveryCount ] [-RequiresSession] - [-Status ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-Status ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityNamespace +``` +New-AzServiceBusSubscription -Name -NamespaceInputObject -TopicName + -Parameter [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzServiceBusSubscription -Name -NamespaceInputObject -TopicName + [-AutoDeleteOnIdle ] [-ClientId ] [-DeadLetteringOnFilterEvaluationException] + [-DeadLetteringOnMessageExpiration] [-DefaultMessageTimeToLive ] + [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] + [-ForwardDeadLetteredMessagesTo ] [-ForwardTo ] [-IsClientAffine] [-IsDurable] [-IsShared] + [-LockDuration ] [-MaxDeliveryCount ] [-RequiresSession] [-Status ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityTopic +``` +New-AzServiceBusSubscription -Name -TopicInputObject + -Parameter [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityTopicExpanded +``` +New-AzServiceBusSubscription -Name -TopicInputObject + [-AutoDeleteOnIdle ] [-ClientId ] [-DeadLetteringOnFilterEvaluationException] + [-DeadLetteringOnMessageExpiration] [-DefaultMessageTimeToLive ] + [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] + [-ForwardDeadLetteredMessagesTo ] [-ForwardTo ] [-IsClientAffine] [-IsDurable] [-IsShared] + [-LockDuration ] [-MaxDeliveryCount ] [-RequiresSession] [-Status ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION -Creates a topic subscription. +Create a topic subscription. ## EXAMPLES @@ -74,7 +109,7 @@ The minimum duration is 5 minutes. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -89,7 +124,7 @@ Indicates the Client ID of the application that created the client-affine subscr ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -104,7 +139,7 @@ Value that indicates whether a subscription has dead letter support on filter ev ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -119,7 +154,7 @@ Value that indicates whether a subscription has dead letter support when a messa ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -135,7 +170,7 @@ This is the default value used when TimeToLive is not set on a message itself. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -167,7 +202,7 @@ The default value is 10 minutes. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -182,7 +217,7 @@ Value that indicates whether server-side batched operations are enabled. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -197,7 +232,7 @@ Queue/Topic name to forward the Dead Letter message ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -212,7 +247,7 @@ Queue/Topic name to forward the messages ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -227,7 +262,7 @@ Value that indicates whether the subscription has an affinity to the client id. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -242,7 +277,7 @@ For client-affine subscriptions, this value indicates whether the subscription i ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -257,7 +292,7 @@ For client-affine subscriptions, this value indicates whether the subscription i ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -273,7 +308,7 @@ The maximum value for LockDuration is 5 minutes; the default value is 1 minute. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -288,7 +323,7 @@ Number of maximum deliveries. ```yaml Type: System.Int32 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -313,12 +348,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: CreateViaIdentityNamespace, CreateViaIdentityNamespaceExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -328,12 +378,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +Description of subscription resource. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription +Parameter Sets: CreateViaIdentityNamespace, CreateViaIdentityTopic +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -RequiresSession Value indicating if a subscription supports the concept of sessions. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -348,7 +413,7 @@ Name of the Resource group within the Azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -362,8 +427,8 @@ Accept wildcard characters: False Enumerates the possible values for the status of a messaging entity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -379,7 +444,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -389,12 +454,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -TopicInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: CreateViaIdentityTopic, CreateViaIdentityTopicExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -TopicName The topic name. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespace, CreateViaIdentityNamespaceExpanded Aliases: Required: True @@ -440,11 +520,17 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription ## NOTES ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx) + diff --git a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusTopic.md b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusTopic.md index 74649b4b14f1..4ebb74b880e5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusTopic.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusTopic.md @@ -8,21 +8,38 @@ schema: 2.0.0 # New-AzServiceBusTopic ## SYNOPSIS -Creates a topic in the specified namespace. +Create a topic in the specified namespace. ## SYNTAX +### CreateExpanded (Default) ``` New-AzServiceBusTopic -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-AutoDeleteOnIdle ] [-DefaultMessageTimeToLive ] [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] [-EnableExpress] [-EnablePartitioning] [-MaxMessageSizeInKilobytes ] [-MaxSizeInMegabytes ] - [-RequiresDuplicateDetection] [-Status ] [-SupportOrdering] [-DefaultProfile ] - [-Confirm] [-WhatIf] [] + [-RequiresDuplicateDetection] [-Status ] [-SupportOrdering] [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +### CreateViaIdentityNamespace +``` +New-AzServiceBusTopic -Name -NamespaceInputObject -Parameter + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzServiceBusTopic -Name -NamespaceInputObject + [-AutoDeleteOnIdle ] [-DefaultMessageTimeToLive ] + [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] [-EnableExpress] + [-EnablePartitioning] [-MaxMessageSizeInKilobytes ] [-MaxSizeInMegabytes ] + [-RequiresDuplicateDetection] [-Status ] [-SupportOrdering] [-DefaultProfile ] [-Confirm] + [-WhatIf] [] ``` ## DESCRIPTION -Creates a topic in the specified namespace. +Create a topic in the specified namespace. ## EXAMPLES @@ -68,7 +85,7 @@ The minimum duration is 5 minutes. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -84,7 +101,7 @@ This is the default value used when TimeToLive is not set on a message itself. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -116,7 +133,7 @@ The default value is 10 minutes. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -131,7 +148,7 @@ Value that indicates whether server-side batched operations are enabled. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -147,7 +164,7 @@ An express topic holds a message in memory temporarily before writing it to pers ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -162,7 +179,7 @@ Value that indicates whether the topic to be partitioned across multiple message ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -178,7 +195,7 @@ This property is only used in Premium today and default is 1024. ```yaml Type: System.Int64 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -194,7 +211,7 @@ Default is 1024. ```yaml Type: System.Int32 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -219,12 +236,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: CreateViaIdentityNamespace, CreateViaIdentityNamespaceExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -234,12 +266,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +Description of topic resource. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic +Parameter Sets: CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -RequiresDuplicateDetection Value indicating if this topic requires duplicate detection. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -254,7 +301,7 @@ Name of the Resource group within the Azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -268,8 +315,8 @@ Accept wildcard characters: False Enumerates the possible values for the status of a messaging entity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -285,7 +332,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -300,7 +347,7 @@ Value that indicates whether the topic supports ordering. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -346,11 +393,17 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic + +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic ## NOTES ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx) + diff --git a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusVirtualNetworkRuleConfig.md b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusVirtualNetworkRuleConfig.md index da36d558c834..9a85e81bb2eb 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusVirtualNetworkRuleConfig.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/New-AzServiceBusVirtualNetworkRuleConfig.md @@ -75,7 +75,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusAuthorizationRule.md b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusAuthorizationRule.md index d2f50d1eaf5b..4efa0c8de71e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusAuthorizationRule.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusAuthorizationRule.md @@ -252,7 +252,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusGeoDRConfiguration.md b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusGeoDRConfiguration.md index aea620e972a9..08d1fea77da7 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusGeoDRConfiguration.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusGeoDRConfiguration.md @@ -24,6 +24,12 @@ Remove-AzServiceBusGeoDRConfiguration -InputObject [-Defau [-PassThru] [-Confirm] [-WhatIf] [] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzServiceBusGeoDRConfiguration -Name -NamespaceInputObject + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Deletes an Alias(Disaster Recovery configuration) @@ -56,7 +62,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -75,7 +80,7 @@ The Disaster Recovery configuration name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: Required: True @@ -85,6 +90,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusMigration.md b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusMigration.md index 25ed6a7c4f69..b508287b5302 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusMigration.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusMigration.md @@ -56,7 +56,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusNamespace.md b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusNamespace.md index f128c803ac45..cb2f2a07385c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusNamespace.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusNamespace.md @@ -81,7 +81,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -221,3 +220,5 @@ Remove-AzServiceBusNamespaceV2 ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx) + diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusPrivateEndpointConnection.md b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusPrivateEndpointConnection.md index fabf82c0545a..10551bf13a62 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusPrivateEndpointConnection.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusPrivateEndpointConnection.md @@ -25,6 +25,12 @@ Remove-AzServiceBusPrivateEndpointConnection -InputObject [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzServiceBusPrivateEndpointConnection -Name -NamespaceInputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Deletes an existing Private Endpoint Connection. @@ -72,7 +78,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -91,7 +96,7 @@ The PrivateEndpointConnection name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: PrivateEndpointConnectionName Required: True @@ -101,6 +106,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -223,3 +243,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx) + diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusQueue.md b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusQueue.md index 7922a78e4677..276580778c27 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusQueue.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusQueue.md @@ -24,6 +24,12 @@ Remove-AzServiceBusQueue -InputObject [-DefaultProfile ] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzServiceBusQueue -Name -NamespaceInputObject + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Deletes a queue from the specified namespace in a resource group. @@ -56,7 +62,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -75,7 +80,7 @@ The queue name. ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: QueueName Required: True @@ -85,6 +90,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -192,3 +212,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639411.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639411.aspx) + diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusRule.md b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusRule.md index 46367308890c..129e71488678 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusRule.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusRule.md @@ -25,6 +25,24 @@ Remove-AzServiceBusRule -InputObject [-DefaultProfile ] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzServiceBusRule -Name -NamespaceInputObject -SubscriptionName + -TopicName [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentitySubscription +``` +Remove-AzServiceBusRule -Name -SubscriptionInputObject + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentityTopic +``` +Remove-AzServiceBusRule -Name -SubscriptionName -TopicInputObject + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Deletes an existing rule. @@ -57,7 +75,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -76,7 +93,7 @@ The rule name. ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace, DeleteViaIdentitySubscription, DeleteViaIdentityTopic Aliases: RuleName Required: True @@ -86,6 +103,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -147,12 +179,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -SubscriptionInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentitySubscription +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -SubscriptionName The subscription name. ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace, DeleteViaIdentityTopic Aliases: Required: True @@ -162,12 +209,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -TopicInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentityTopic +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -TopicName The topic name. ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: Required: True diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusSubscription.md b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusSubscription.md index 3b8e3f1bbd4a..f3c35176aa36 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusSubscription.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusSubscription.md @@ -25,6 +25,18 @@ Remove-AzServiceBusSubscription -InputObject [-DefaultProf [-Confirm] [-WhatIf] [] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzServiceBusSubscription -Name -NamespaceInputObject -TopicName + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentityTopic +``` +Remove-AzServiceBusSubscription -Name -TopicInputObject + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Deletes a subscription from the specified topic. @@ -57,7 +69,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -76,7 +87,7 @@ The subscription name. ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace, DeleteViaIdentityTopic Aliases: SubscriptionName Required: True @@ -86,6 +97,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -147,12 +173,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -TopicInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentityTopic +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -TopicName The topic name. ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: Required: True @@ -208,3 +249,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639381.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639381.aspx) + diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusTopic.md b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusTopic.md index 1311fd86e539..de758b121c79 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusTopic.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Remove-AzServiceBusTopic.md @@ -24,6 +24,12 @@ Remove-AzServiceBusTopic -InputObject [-DefaultProfile ] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzServiceBusTopic -Name -NamespaceInputObject + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Deletes a topic from the specified namespace and resource group. @@ -56,7 +62,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -75,7 +80,7 @@ The topic name. ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: TopicName Required: True @@ -85,6 +90,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -192,3 +212,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639404.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639404.aspx) + diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusAuthorizationRule.md b/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusAuthorizationRule.md index 5f0a9743e18b..6907b02c1b19 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusAuthorizationRule.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusAuthorizationRule.md @@ -15,27 +15,27 @@ Updates the authorization rule of a ServiceBus namespace, queue or topic. ### SetExpandedNamespace (Default) ``` Set-AzServiceBusAuthorizationRule -Name -NamespaceName -ResourceGroupName - -Rights [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] + -Rights [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] ``` ### SetExpandedQueue ``` Set-AzServiceBusAuthorizationRule -Name -NamespaceName -QueueName - -ResourceGroupName -Rights [-SubscriptionId ] [-DefaultProfile ] + -ResourceGroupName -Rights [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ### SetExpandedTopic ``` Set-AzServiceBusAuthorizationRule -Name -NamespaceName -ResourceGroupName - -TopicName -Rights [-SubscriptionId ] [-DefaultProfile ] [-AsJob] + -TopicName -Rights [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ### SetViaIdentityExpanded ``` -Set-AzServiceBusAuthorizationRule -InputObject -Rights +Set-AzServiceBusAuthorizationRule -InputObject -Rights [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -204,7 +204,7 @@ Accept wildcard characters: False The rights associated with the rule. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[] +Type: System.String[] Parameter Sets: (All) Aliases: @@ -285,7 +285,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusNamespace.md b/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusNamespace.md index 7e22715c6d94..9859c61481d5 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusNamespace.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusNamespace.md @@ -15,20 +15,20 @@ Updates a ServiceBus namespace ### SetExpanded (Default) ``` Set-AzServiceBusNamespace -Name -ResourceGroupName [-SubscriptionId ] - [-AlternateName ] [-DisableLocalAuth] [-IdentityType ] - [-KeyVaultProperty ] [-MinimumTlsVersion ] - [-PublicNetworkAccess ] [-RequireInfrastructureEncryption] [-SkuCapacity ] - [-SkuName ] [-Tag ] [-UserAssignedIdentityId ] [-DefaultProfile ] - [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-AlternateName ] [-DisableLocalAuth] [-IdentityType ] + [-KeyVaultProperty ] [-MinimumTlsVersion ] [-PublicNetworkAccess ] + [-RequireInfrastructureEncryption] [-SkuCapacity ] [-SkuName ] [-Tag ] + [-UserAssignedIdentityId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] ``` ### SetViaIdentityExpanded ``` Set-AzServiceBusNamespace [-InputObject ] [-AlternateName ] [-DisableLocalAuth] - [-IdentityType ] [-KeyVaultProperty ] - [-MinimumTlsVersion ] [-PublicNetworkAccess ] [-RequireInfrastructureEncryption] - [-SkuCapacity ] [-SkuName ] [-Tag ] [-UserAssignedIdentityId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-IdentityType ] [-KeyVaultProperty ] [-MinimumTlsVersion ] + [-PublicNetworkAccess ] [-RequireInfrastructureEncryption] [-SkuCapacity ] [-SkuName ] + [-Tag ] [-UserAssignedIdentityId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -350,7 +350,7 @@ Accept wildcard characters: False Type of managed service identity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType +Type: System.String Parameter Sets: (All) Aliases: @@ -379,10 +379,9 @@ Accept wildcard characters: False ### -KeyVaultProperty Properties of KeyVault -To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties[] Parameter Sets: (All) Aliases: @@ -444,7 +443,7 @@ This determines if traffic is allowed over public network. By default it is enabled. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess +Type: System.String Parameter Sets: (All) Aliases: @@ -505,7 +504,7 @@ Accept wildcard characters: False Name of this SKU. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName +Type: System.String Parameter Sets: (All) Aliases: @@ -599,7 +598,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusNetworkRuleSet.md b/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusNetworkRuleSet.md index fa44dcf9b6e7..42de83d1f672 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusNetworkRuleSet.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusNetworkRuleSet.md @@ -15,15 +15,15 @@ Updates the NetworkRuleSet of a ServiceBus namespace ### SetExpanded (Default) ``` Set-AzServiceBusNetworkRuleSet -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-DefaultAction ] [-IPRule ] [-PublicNetworkAccess ] + [-DefaultAction ] [-IPRule ] [-PublicNetworkAccess ] [-TrustedServiceAccessEnabled] [-VirtualNetworkRule ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ### SetViaIdentityExpanded ``` -Set-AzServiceBusNetworkRuleSet -InputObject [-DefaultAction ] - [-IPRule ] [-PublicNetworkAccess ] [-TrustedServiceAccessEnabled] +Set-AzServiceBusNetworkRuleSet -InputObject [-DefaultAction ] + [-IPRule ] [-PublicNetworkAccess ] [-TrustedServiceAccessEnabled] [-VirtualNetworkRule ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -141,7 +141,7 @@ Accept wildcard characters: False Default Action for Network Rule Set ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction +Type: System.String Parameter Sets: (All) Aliases: @@ -185,10 +185,9 @@ Accept wildcard characters: False ### -IPRule List of IpRules -To construct, see NOTES section for IPRULE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[] +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules[] Parameter Sets: (All) Aliases: @@ -235,7 +234,7 @@ 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. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess +Type: System.String Parameter Sets: (All) Aliases: @@ -294,10 +293,9 @@ Accept wildcard characters: False ### -VirtualNetworkRule List of VirtualNetwork Rules -To construct, see NOTES section for VIRTUALNETWORKRULE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[] +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules[] Parameter Sets: (All) Aliases: @@ -348,7 +346,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusQueue.md b/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusQueue.md index c1671a1f5488..29e25bc3ef30 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusQueue.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusQueue.md @@ -19,8 +19,8 @@ Set-AzServiceBusQueue -Name -NamespaceName -ResourceGroupName [-DefaultMessageTimeToLive ] [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] [-EnableExpress] [-ForwardDeadLetteredMessagesTo ] [-ForwardTo ] [-LockDuration ] [-MaxDeliveryCount ] [-MaxMessageSizeInKilobytes ] - [-MaxSizeInMegabytes ] [-Status ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] + [-MaxSizeInMegabytes ] [-Status ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] ``` ### SetViaIdentityExpanded @@ -30,8 +30,7 @@ Set-AzServiceBusQueue -InputObject [-AutoDeleteOnIdle ] [-EnableBatchedOperations] [-EnableExpress] [-ForwardDeadLetteredMessagesTo ] [-ForwardTo ] [-LockDuration ] [-MaxDeliveryCount ] [-MaxMessageSizeInKilobytes ] [-MaxSizeInMegabytes ] - [-Status ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] + [-Status ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -420,11 +419,10 @@ Accept wildcard characters: False ``` ### -Status -Maximum size (in KB) of the message payload that can be accepted by the queue. -This property is only used in Premium today and default is 1024. +Enumerates the possible values for the status of a messaging entity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus +Type: System.String Parameter Sets: (All) Aliases: @@ -490,7 +488,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusRule.md b/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusRule.md index 760bd3c8ed7f..17577792fcaa 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusRule.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusRule.md @@ -17,20 +17,20 @@ Updates a ServiceBus Rule Set-AzServiceBusRule -Name -NamespaceName -ResourceGroupName -SubscriptionName -TopicName [-SubscriptionId ] [-ActionRequiresPreprocessing] [-ActionSqlExpression ] [-ContentType ] [-CorrelationFilterProperty ] - [-CorrelationFilterRequiresPreprocessing] [-CorrelationId ] [-FilterType ] - [-Label ] [-MessageId ] [-ReplyTo ] [-ReplyToSessionId ] - [-SessionId ] [-SqlExpression ] [-SqlFilterRequiresPreprocessing] [-To ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-CorrelationFilterRequiresPreprocessing] [-CorrelationId ] [-FilterType ] [-Label ] + [-MessageId ] [-ReplyTo ] [-ReplyToSessionId ] [-SessionId ] + [-SqlExpression ] [-SqlFilterRequiresPreprocessing] [-To ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ### SetViaIdentityExpanded ``` Set-AzServiceBusRule -InputObject [-ActionRequiresPreprocessing] [-ActionSqlExpression ] [-ContentType ] [-CorrelationFilterProperty ] - [-CorrelationFilterRequiresPreprocessing] [-CorrelationId ] [-FilterType ] - [-Label ] [-MessageId ] [-ReplyTo ] [-ReplyToSessionId ] - [-SessionId ] [-SqlExpression ] [-SqlFilterRequiresPreprocessing] [-To ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-CorrelationFilterRequiresPreprocessing] [-CorrelationId ] [-FilterType ] [-Label ] + [-MessageId ] [-ReplyTo ] [-ReplyToSessionId ] [-SessionId ] + [-SqlExpression ] [-SqlFilterRequiresPreprocessing] [-To ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -230,7 +230,7 @@ Accept wildcard characters: False Filter type that is evaluated against a BrokeredMessage. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType +Type: System.String Parameter Sets: (All) Aliases: @@ -525,7 +525,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusSubscription.md b/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusSubscription.md index c18510dfcbc4..e100574dd06a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusSubscription.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusSubscription.md @@ -19,7 +19,7 @@ Set-AzServiceBusSubscription -Name -NamespaceName -ResourceGro [-DeadLetteringOnFilterEvaluationException] [-DeadLetteringOnMessageExpiration] [-DefaultMessageTimeToLive ] [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] [-ForwardDeadLetteredMessagesTo ] [-ForwardTo ] - [-LockDuration ] [-MaxDeliveryCount ] [-Status ] [-DefaultProfile ] + [-LockDuration ] [-MaxDeliveryCount ] [-Status ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -29,7 +29,7 @@ Set-AzServiceBusSubscription -InputObject [-AutoDeleteOnId [-DeadLetteringOnFilterEvaluationException] [-DeadLetteringOnMessageExpiration] [-DefaultMessageTimeToLive ] [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] [-ForwardDeadLetteredMessagesTo ] [-ForwardTo ] - [-LockDuration ] [-MaxDeliveryCount ] [-Status ] [-DefaultProfile ] + [-LockDuration ] [-MaxDeliveryCount ] [-Status ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -385,7 +385,7 @@ Accept wildcard characters: False Enumerates the possible values for the status of a messaging entity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus +Type: System.String Parameter Sets: (All) Aliases: @@ -466,7 +466,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusTopic.md b/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusTopic.md index 4cf5c81549e1..ca1f978e07a7 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusTopic.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Set-AzServiceBusTopic.md @@ -17,8 +17,8 @@ Updates a ServiceBus Topic Set-AzServiceBusTopic -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-AutoDeleteOnIdle ] [-DefaultMessageTimeToLive ] [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] [-EnableExpress] - [-MaxMessageSizeInKilobytes ] [-MaxSizeInMegabytes ] [-Status ] - [-SupportOrdering] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-MaxMessageSizeInKilobytes ] [-MaxSizeInMegabytes ] [-Status ] [-SupportOrdering] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ### SetViaIdentityExpanded @@ -26,8 +26,8 @@ Set-AzServiceBusTopic -Name -NamespaceName -ResourceGroupName Set-AzServiceBusTopic -InputObject [-AutoDeleteOnIdle ] [-DefaultMessageTimeToLive ] [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] [-EnableExpress] [-MaxMessageSizeInKilobytes ] - [-MaxSizeInMegabytes ] [-Status ] [-SupportOrdering] [-DefaultProfile ] - [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-MaxSizeInMegabytes ] [-Status ] [-SupportOrdering] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -327,11 +327,10 @@ Accept wildcard characters: False ``` ### -Status -Maximum size (in KB) of the message payload that can be accepted by the topic. -This property is only used in Premium today and default is 1024. +Enumerates the possible values for the status of a messaging entity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus +Type: System.String Parameter Sets: (All) Aliases: @@ -412,7 +411,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Start-AzServiceBusMigration.md b/src/ServiceBus/ServiceBus.Autorest/help/Start-AzServiceBusMigration.md index 8c58ca31bbde..0abec6809320 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Start-AzServiceBusMigration.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Start-AzServiceBusMigration.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Start-AzServiceBusMigration ## SYNOPSIS -Creates Migration configuration and starts migration of entities from Standard to Premium namespace +Create Migration configuration and starts migration of entities from Standard to Premium namespace ## SYNTAX @@ -19,7 +19,7 @@ Start-AzServiceBusMigration -NamespaceName -ResourceGroupName ``` ## DESCRIPTION -Creates Migration configuration and starts migration of entities from Standard to Premium namespace +Create Migration configuration and starts migration of entities from Standard to Premium namespace ## EXAMPLES @@ -212,7 +212,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Stop-AzServiceBusMigration.md b/src/ServiceBus/ServiceBus.Autorest/help/Stop-AzServiceBusMigration.md index 78f2f459c0cf..7f7fe595782c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Stop-AzServiceBusMigration.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Stop-AzServiceBusMigration.md @@ -56,7 +56,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity diff --git a/src/ServiceBus/ServiceBus.Autorest/help/Test-AzServiceBusName.md b/src/ServiceBus/ServiceBus.Autorest/help/Test-AzServiceBusName.md index d5ac3b658390..48baaa375f0f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/help/Test-AzServiceBusName.md +++ b/src/ServiceBus/ServiceBus.Autorest/help/Test-AzServiceBusName.md @@ -169,7 +169,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult ## NOTES diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule.ps1 index d08bcc5733cd..8f7595cd01d6 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule.ps1 @@ -27,16 +27,44 @@ Gets an authorization rule for a namespace by rule name. .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +DISASTERRECOVERYCONFIGINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -48,12 +76,17 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusdisasterrecoveryconfigauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639392.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639376.aspx #> function Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -61,6 +94,8 @@ param( ${Alias}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityDisasterRecoveryConfig', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -93,9 +128,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityDisasterRecoveryConfig', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${DisasterRecoveryConfigInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -156,9 +202,11 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentity'; + GetViaIdentityDisasterRecoveryConfig = 'Az.ServiceBus.private\Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace'; List = 'Az.ServiceBus.private\Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusDisasterRecoveryConfigKey.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusDisasterRecoveryConfigKey.ps1 index e82783fa3778..69d6c2f98d48 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusDisasterRecoveryConfigKey.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusDisasterRecoveryConfigKey.ps1 @@ -25,12 +25,14 @@ Gets the primary and secondary connection strings for the namespace. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusdisasterrecoveryconfigkey +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639398.aspx #> function Get-AzServiceBusDisasterRecoveryConfigKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -125,7 +127,7 @@ begin { $mapping = @{ List = 'Az.ServiceBus.private\Get-AzServiceBusDisasterRecoveryConfigKey_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusNamespaceAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusNamespaceAuthorizationRule.ps1 index 288e0d7c627f..edd56b9d02a4 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusNamespaceAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusNamespaceAuthorizationRule.ps1 @@ -27,7 +27,7 @@ Gets an authorization rule for a namespace by rule name. .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES @@ -36,7 +36,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -48,12 +62,17 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusnamespaceauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639392.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639376.aspx #> function Get-AzServiceBusNamespaceAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -86,9 +105,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -149,9 +173,10 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusNamespaceAuthorizationRule_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusNamespaceAuthorizationRule_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusNamespaceAuthorizationRule_GetViaIdentityNamespace'; List = 'Az.ServiceBus.private\Get-AzServiceBusNamespaceAuthorizationRule_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusNamespaceKey.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusNamespaceKey.ps1 index 7f7e2ec84d8d..1e4e5961452e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusNamespaceKey.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusNamespaceKey.ps1 @@ -25,12 +25,14 @@ Gets the primary and secondary connection strings for the namespace. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusnamespacekey +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639398.aspx #> function Get-AzServiceBusNamespaceKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -119,7 +121,7 @@ begin { $mapping = @{ List = 'Az.ServiceBus.private\Get-AzServiceBusNamespaceKey_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusOperation.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusOperation.ps1 index 300aebdc3d9d..ffdbb820f759 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusOperation.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusOperation.ps1 @@ -25,12 +25,12 @@ Lists all of the available ServiceBus REST API operations. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperation .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusoperation #> function Get-AzServiceBusOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusQueueAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusQueueAuthorizationRule.ps1 index ea7774c4a6f9..187e4c815fc1 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusQueueAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusQueueAuthorizationRule.ps1 @@ -27,7 +27,7 @@ Gets an authorization rule for a queue by rule name. .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES @@ -36,7 +36,35 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +QUEUEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -48,12 +76,18 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusqueueauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt705611.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt705607.aspx #> function Get-AzServiceBusQueueAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityQueue', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -67,6 +101,7 @@ param( ${NamespaceName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -93,9 +128,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityQueue', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${QueueInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -156,9 +202,11 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusQueueAuthorizationRule_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusQueueAuthorizationRule_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusQueueAuthorizationRule_GetViaIdentityNamespace'; + GetViaIdentityQueue = 'Az.ServiceBus.private\Get-AzServiceBusQueueAuthorizationRule_GetViaIdentityQueue'; List = 'Az.ServiceBus.private\Get-AzServiceBusQueueAuthorizationRule_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusQueueKey.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusQueueKey.ps1 index d070f16ed6ff..f197a8da077d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusQueueKey.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusQueueKey.ps1 @@ -25,12 +25,14 @@ Primary and secondary connection strings to the queue. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusqueuekey +.Link +https://msdn.microsoft.com/en-us/library/azure/mt705608.aspx #> function Get-AzServiceBusQueueKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -125,7 +127,7 @@ begin { $mapping = @{ List = 'Az.ServiceBus.private\Get-AzServiceBusQueueKey_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusTopicAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusTopicAuthorizationRule.ps1 index e9aa7f83a1f6..cc37eadd414b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusTopicAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusTopicAuthorizationRule.ps1 @@ -27,7 +27,7 @@ Returns the specified authorization rule. .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES @@ -36,7 +36,35 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -48,12 +76,18 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebustopicauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt720676.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt720681.aspx #> function Get-AzServiceBusTopicAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityTopic', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -83,6 +117,7 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -93,9 +128,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -156,9 +202,11 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusTopicAuthorizationRule_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusTopicAuthorizationRule_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusTopicAuthorizationRule_GetViaIdentityNamespace'; + GetViaIdentityTopic = 'Az.ServiceBus.private\Get-AzServiceBusTopicAuthorizationRule_GetViaIdentityTopic'; List = 'Az.ServiceBus.private\Get-AzServiceBusTopicAuthorizationRule_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusTopicKey.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusTopicKey.ps1 index 9718331234d9..fff31ddd3a34 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusTopicKey.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Get-AzServiceBusTopicKey.ps1 @@ -25,12 +25,14 @@ Gets the primary and secondary connection strings for the topic. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebustopickey +.Link +https://msdn.microsoft.com/en-us/library/azure/mt720677.aspx #> function Get-AzServiceBusTopicKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -125,7 +127,7 @@ begin { $mapping = @{ List = 'Az.ServiceBus.private\Get-AzServiceBusTopicKey_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing.ps1 index 4814cfed7b0d..f5466f172d0d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing.ps1 @@ -36,7 +36,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -54,6 +68,7 @@ function Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing { [CmdletBinding(DefaultParameterSetName='Break', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Break', Mandatory)] + [Parameter(ParameterSetName='BreakViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The Disaster Recovery configuration name @@ -83,9 +98,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='BreakViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -152,8 +172,9 @@ begin { $mapping = @{ Break = 'Az.ServiceBus.private\Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing_Break'; BreakViaIdentity = 'Az.ServiceBus.private\Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentity'; + BreakViaIdentityNamespace = 'Az.ServiceBus.private\Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace'; } - if (('Break') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Break') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Invoke-AzServiceBusFailDisasterRecoveryConfigOver.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Invoke-AzServiceBusFailDisasterRecoveryConfigOver.ps1 index e66a11128103..98a78abbc599 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Invoke-AzServiceBusFailDisasterRecoveryConfigOver.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Invoke-AzServiceBusFailDisasterRecoveryConfigOver.ps1 @@ -25,7 +25,7 @@ Invokes GEO DR failover and reconfigure the alias to point to the secondary name {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs @@ -38,7 +38,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -60,6 +74,10 @@ function Invoke-AzServiceBusFailDisasterRecoveryConfigOver { param( [Parameter(ParameterSetName='Fail', Mandatory)] [Parameter(ParameterSetName='FailExpanded', Mandatory)] + [Parameter(ParameterSetName='FailViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='FailViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='FailViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='FailViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The Disaster Recovery configuration name @@ -67,6 +85,8 @@ param( [Parameter(ParameterSetName='Fail', Mandatory)] [Parameter(ParameterSetName='FailExpanded', Mandatory)] + [Parameter(ParameterSetName='FailViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='FailViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name @@ -74,6 +94,8 @@ param( [Parameter(ParameterSetName='Fail', Mandatory)] [Parameter(ParameterSetName='FailExpanded', Mandatory)] + [Parameter(ParameterSetName='FailViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='FailViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. @@ -81,6 +103,8 @@ param( [Parameter(ParameterSetName='Fail')] [Parameter(ParameterSetName='FailExpanded')] + [Parameter(ParameterSetName='FailViaJsonFilePath')] + [Parameter(ParameterSetName='FailViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -93,24 +117,43 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='FailViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='FailViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='Fail', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='FailViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='FailViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties] # Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='FailExpanded')] [Parameter(ParameterSetName='FailViaIdentityExpanded')] + [Parameter(ParameterSetName='FailViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. ${IsSafeFailover}, + [Parameter(ParameterSetName='FailViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Path of Json file supplied to the Fail operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='FailViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Json string supplied to the Fail operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -179,8 +222,12 @@ begin { FailExpanded = 'Az.ServiceBus.private\Invoke-AzServiceBusFailDisasterRecoveryConfigOver_FailExpanded'; FailViaIdentity = 'Az.ServiceBus.private\Invoke-AzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentity'; FailViaIdentityExpanded = 'Az.ServiceBus.private\Invoke-AzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityExpanded'; + FailViaIdentityNamespace = 'Az.ServiceBus.private\Invoke-AzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityNamespace'; + FailViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\Invoke-AzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityNamespaceExpanded'; + FailViaJsonFilePath = 'Az.ServiceBus.private\Invoke-AzServiceBusFailDisasterRecoveryConfigOver_FailViaJsonFilePath'; + FailViaJsonString = 'Az.ServiceBus.private\Invoke-AzServiceBusFailDisasterRecoveryConfigOver_FailViaJsonString'; } - if (('Fail', 'FailExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Fail', 'FailExpanded', 'FailViaJsonFilePath', 'FailViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusGeoDRConfiguration.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusGeoDRConfiguration.ps1 index 92ab07c88288..f85466edbd33 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusGeoDRConfiguration.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusGeoDRConfiguration.ps1 @@ -16,18 +16,18 @@ <# .Synopsis -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) .Description -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) .Example New-AzServiceBusGeoDRConfiguration -Name myAlias -ResourceGroupName myResourceGroup -NamespaceName myPrimaryNamespace -PartnerNamespace "/subscriptions/0000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/mySecondaryNamespace" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery .Notes COMPLEX PARAMETER PROPERTIES @@ -36,7 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -50,31 +50,23 @@ INPUTOBJECT : Identity Parameter PARAMETER : Single item in List or Get Alias(Disaster Recovery configuration) operation [AlternateName ]: Primary/Secondary eventhub namespace name, which is part of GEO DR pairing [PartnerNamespace ]: ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusgeodrconfiguration #> function New-AzServiceBusGeoDRConfiguration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery] # Single item in List or Get Alias(Disaster Recovery configuration) operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusNamespace.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusNamespace.ps1 index d7d7fa6ef83a..92d796cca2d2 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusNamespace.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusNamespace.ps1 @@ -16,11 +16,11 @@ <# .Synopsis -Creates or updates a service namespace. +Create a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. .Description -Creates or updates a service namespace. +Create a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. .Example @@ -35,11 +35,11 @@ New-AzServiceBusNamespace -ResourceGroupName myResourceGroup -Name myNamespace - New-AzServiceBusNamespace -ResourceGroupName myResourceGroup -Name myNamespace -SkuName Standard -Location southcentralus -Tag @{k1='v1'; k2='v2'} -DisableLocalAuth .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace .Notes COMPLEX PARAMETER PROPERTIES @@ -48,7 +48,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -71,57 +71,41 @@ PARAMETER : Description of a namespace resource. [(Any) ]: This indicates any property can be added to this object. [AlternateName ]: Alternate name for namespace [DisableLocalAuth ]: This property disables SAS authentication for the Service Bus namespace. - [IdentityType ]: Type of managed service identity. - [KeySource ]: Enumerates the possible value of keySource for Encryption - [KeyVaultProperty ]: Properties of KeyVault + [IdentityType ]: Type of managed service identity. + [KeySource ]: Enumerates the possible value of keySource for Encryption + [KeyVaultProperty >]: Properties of KeyVault [KeyName ]: Name of the Key from KeyVault [KeyVaultUri ]: Uri of KeyVault [KeyVersion ]: Version of KeyVault [UserAssignedIdentity ]: ARM ID of user Identity selected for encryption - [MinimumTlsVersion ]: The minimum TLS version for the cluster to support, e.g. '1.2' + [MinimumTlsVersion ]: The minimum TLS version for the cluster to support, e.g. '1.2' [PremiumMessagingPartition ]: The number of partitions of a Service Bus namespace. This property is only applicable to Premium SKU namespaces. The default value is 1 and possible values are 1, 2 and 4 - [PrivateEndpointConnection ]: List of private endpoint connections. - [ConnectionState ]: Status of the connection. + [PrivateEndpointConnection >]: List of private endpoint connections. + [ConnectionState ]: Status of the connection. [Description ]: Description of the connection state. [PrivateEndpointId ]: The ARM identifier for Private Endpoint. - [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. - [PublicNetworkAccess ]: This determines if traffic is allowed over public network. By default it is enabled. + [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. + [PublicNetworkAccess ]: This determines if traffic is allowed over public network. By default it is enabled. [RequireInfrastructureEncryption ]: Enable Infrastructure Encryption (Double Encryption) [SkuCapacity ]: Messaging units for your service bus premium namespace. Valid capacities are {1, 2, 4, 8, 16} multiples of your properties.premiumMessagingPartitions setting. For example, If properties.premiumMessagingPartitions is 1 then possible capacity values are 1, 2, 4, 8, and 16. If properties.premiumMessagingPartitions is 4 then possible capacity values are 4, 8, 16, 32 and 64 - [SkuName ]: Name of this SKU. - [SkuTier ]: The billing tier of this particular SKU. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [SkuName ]: Name of this SKU. + [SkuTier ]: The billing tier of this particular SKU. [UserAssignedIdentity ]: Properties for User Assigned Identities [(Any) ]: This indicates any property can be added to this object. [ZoneRedundant ]: Enabling this property creates a Premium Service Bus Namespace in regions supported availability zones. PRIVATEENDPOINTCONNECTION : List of private endpoint connections. - [ConnectionState ]: Status of the connection. + [ConnectionState ]: Status of the connection. [Description ]: Description of the connection state. [PrivateEndpointId ]: The ARM identifier for Private Endpoint. - [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusnamespace +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx #> function New-AzServiceBusNamespace { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -149,7 +133,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -171,31 +154,30 @@ param( ${DisableLocalAuth}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity. ${IdentityType}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Microsoft.KeyVault")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource] + [System.String] # Enumerates the possible value of keySource for Encryption ${KeySource}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties[]] # Properties of KeyVault - # To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ${KeyVaultProperty}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("1.0", "1.1", "1.2")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion] + [System.String] # The minimum TLS version for the cluster to support, e.g. # '1.2' ${MinimumTlsVersion}, @@ -211,15 +193,14 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection[]] # List of private endpoint connections. - # To construct, see NOTES section for PRIVATEENDPOINTCONNECTION properties and create a hash table. ${PrivateEndpointConnection}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. ${PublicNetworkAccess}, @@ -240,29 +221,29 @@ param( ${SkuCapacity}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName] + [System.String] # Name of this SKU. ${SkuName}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier] + [System.String] # The billing tier of this particular SKU. ${SkuTier}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities]))] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities]))] [System.Collections.Hashtable] # Properties for User Assigned Identities ${UserAssignedIdentity}, @@ -275,9 +256,8 @@ param( [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace] # Description of a namespace resource. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -353,7 +333,7 @@ begin { CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusNamespace_CreateExpanded'; CreateViaIdentity = 'Az.ServiceBus.private\New-AzServiceBusNamespace_CreateViaIdentity'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusNamespaceAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusNamespaceAuthorizationRule.ps1 index a3dd24992f5e..54d084febe7a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusNamespaceAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusNamespaceAuthorizationRule.ps1 @@ -16,20 +16,20 @@ <# .Synopsis -Creates or updates an authorization rule for a namespace. +Create an authorization rule for a namespace. .Description -Creates or updates an authorization rule for a namespace. +Create an authorization rule for a namespace. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES @@ -38,7 +38,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -50,21 +64,19 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. PARAMETER : Description of a namespace authorization rule. - [Rights ]: The rights associated with the rule. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [Rights >]: The rights associated with the rule. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusnamespaceauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639410.aspx #> function New-AzServiceBusNamespaceAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -94,22 +106,29 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [AllowEmptyCollection()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule] # Description of a namespace authorization rule. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -172,8 +191,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusNamespaceAuthorizationRule_CreateExpanded'; CreateViaIdentity = 'Az.ServiceBus.private\New-AzServiceBusNamespaceAuthorizationRule_CreateViaIdentity'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusNamespaceAuthorizationRule_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusNamespaceKey.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusNamespaceKey.ps1 index 6e19c3741691..1d36fa52a0ad 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusNamespaceKey.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusNamespaceKey.ps1 @@ -25,23 +25,41 @@ Regenerates the primary or secondary connection strings for the namespace. {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + PARAMETER : Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - KeyType : The access key to regenerate. + KeyType : The access key to regenerate. [Key ]: Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusnamespacekey +.Link +https://msdn.microsoft.com/en-us/library/azure/mt718977.aspx #> function New-AzServiceBusNamespaceKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] -[CmdletBinding(DefaultParameterSetName='Regenerate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] +[CmdletBinding(DefaultParameterSetName='RegenerateViaIdentityNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] @@ -49,19 +67,25 @@ param( # The authorization rule name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='Regenerate')] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath')] + [Parameter(ParameterSetName='RegenerateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -69,13 +93,45 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter(Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='Regenerate', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters] # Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # The access key to regenerate. + ${KeyType}, + + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType + ${Key}, + + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Path of Json file supplied to the Regenerate operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Json string supplied to the Regenerate operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -135,8 +191,12 @@ begin { $mapping = @{ Regenerate = 'Az.ServiceBus.private\New-AzServiceBusNamespaceKey_Regenerate'; + RegenerateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusNamespaceKey_RegenerateViaIdentityNamespace'; + RegenerateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusNamespaceKey_RegenerateViaIdentityNamespaceExpanded'; + RegenerateViaJsonFilePath = 'Az.ServiceBus.private\New-AzServiceBusNamespaceKey_RegenerateViaJsonFilePath'; + RegenerateViaJsonString = 'Az.ServiceBus.private\New-AzServiceBusNamespaceKey_RegenerateViaJsonString'; } - if (('Regenerate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Regenerate', 'RegenerateViaJsonFilePath', 'RegenerateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusNetworkRuleSet.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusNetworkRuleSet.ps1 index 896babf51b3e..dc23cb2db9d0 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusNetworkRuleSet.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusNetworkRuleSet.ps1 @@ -16,20 +16,20 @@ <# .Synopsis -Create or update NetworkRuleSet for a Namespace. +Create NetworkRuleSet for a Namespace. .Description -Create or update NetworkRuleSet for a Namespace. +Create NetworkRuleSet for a Namespace. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet .Notes COMPLEX PARAMETER PROPERTIES @@ -38,7 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -50,23 +50,17 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. IPRULE : List of IpRules - [Action ]: The IP Filter Action + [Action ]: The IP Filter Action [IPMask ]: IP Mask PARAMETER : Description of NetworkRuleSet resource. - [DefaultAction ]: Default Action for Network Rule Set - [IPRule ]: List of IpRules - [Action ]: The IP Filter Action + [DefaultAction ]: Default Action for Network Rule Set + [IPRule >]: List of IpRules + [Action ]: The IP Filter Action [IPMask ]: IP Mask - [PublicNetworkAccess ]: This determines if traffic is allowed over public network. By default it is enabled. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [PublicNetworkAccess ]: This determines if traffic is allowed over public network. By default it is enabled. [TrustedServiceAccessEnabled ]: Value that indicates whether Trusted Service Access is Enabled or not. - [VirtualNetworkRule ]: List VirtualNetwork Rules + [VirtualNetworkRule >]: List VirtualNetwork Rules [IgnoreMissingVnetServiceEndpoint ]: Value that indicates whether to ignore missing VNet Service Endpoint [SubnetId ]: Resource ID of Virtual Network Subnet @@ -77,7 +71,7 @@ VIRTUALNETWORKRULE : List VirtualNetwork Rules https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusnetworkruleset #> function New-AzServiceBusNetworkRuleSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -104,28 +98,26 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Allow", "Deny")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction] + [System.String] # Default Action for Network Rule Set ${DefaultAction}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules[]] # List of IpRules - # To construct, see NOTES section for IPRULE properties and create a hash table. ${IPRule}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. ${PublicNetworkAccess}, @@ -139,16 +131,14 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules[]] # List VirtualNetwork Rules - # To construct, see NOTES section for VIRTUALNETWORKRULE properties and create a hash table. ${VirtualNetworkRule}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet] # Description of NetworkRuleSet resource. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -212,7 +202,7 @@ begin { CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusNetworkRuleSet_CreateExpanded'; CreateViaIdentity = 'Az.ServiceBus.private\New-AzServiceBusNetworkRuleSet_CreateViaIdentity'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusPrivateEndpointConnection.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusPrivateEndpointConnection.ps1 index 96a76e08a913..e94a14801386 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusPrivateEndpointConnection.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusPrivateEndpointConnection.ps1 @@ -16,20 +16,20 @@ <# .Synopsis -Creates or updates PrivateEndpointConnections of service namespace. +Create PrivateEndpointConnections of service namespace. .Description -Creates or updates PrivateEndpointConnections of service namespace. +Create PrivateEndpointConnections of service namespace. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -38,7 +38,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -50,24 +64,22 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. PARAMETER : Properties of the PrivateEndpointConnection. - [ConnectionState ]: Status of the connection. + [ConnectionState ]: Status of the connection. [Description ]: Description of the connection state. [PrivateEndpointId ]: The ARM identifier for Private Endpoint. - [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusprivateendpointconnection +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx #> function New-AzServiceBusPrivateEndpointConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Alias('PrivateEndpointConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -98,40 +110,50 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # The ARM identifier for Private Endpoint. ${PrivateEndpointId}, [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Description of the connection state. ${PrivateLinkServiceConnectionStateDescription}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus])] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus] + [System.String] # Status of the connection. ${PrivateLinkServiceConnectionStateStatus}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState])] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState] + [System.String] # Provisioning state of the Private Endpoint Connection. ${ProvisioningState}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection] # Properties of the PrivateEndpointConnection. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -194,8 +216,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusPrivateEndpointConnection_CreateExpanded'; CreateViaIdentity = 'Az.ServiceBus.private\New-AzServiceBusPrivateEndpointConnection_CreateViaIdentity'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusPrivateEndpointConnection_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusQueue.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusQueue.ps1 index 5eeaccc17971..45d88d7dd75f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusQueue.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusQueue.ps1 @@ -16,20 +16,20 @@ <# .Synopsis -Creates or updates a Service Bus queue. +Create a Service Bus queue. This operation is idempotent. .Description -Creates or updates a Service Bus queue. +Create a Service Bus queue. This operation is idempotent. .Example New-AzServiceBusQueue -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name myQueue -AutoDeleteOnIdle (New-TimeSpan -Days 1 -Minutes 3 -Seconds 4) -DefaultMessageTimeToLive (New-TimeSpan -Days 5) -EnablePartitioning .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue .Notes COMPLEX PARAMETER PROPERTIES @@ -38,7 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -65,32 +65,26 @@ PARAMETER : Description of queue Resource. [MaxSizeInMegabytes ]: The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024. [RequiresDuplicateDetection ]: A value indicating if this queue requires duplicate detection. [RequiresSession ]: A value that indicates whether the queue supports the concept of sessions. - [Status ]: Enumerates the possible values for the status of a messaging entity. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [Status ]: Enumerates the possible values for the status of a messaging entity. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusqueue +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639395.aspx #> function New-AzServiceBusQueue { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue] # Description of queue Resource. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusQueueAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusQueueAuthorizationRule.ps1 index 4fb431acd473..124705799acb 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusQueueAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusQueueAuthorizationRule.ps1 @@ -16,20 +16,20 @@ <# .Synopsis -Creates an authorization rule for a queue. +Create an authorization rule for a queue. .Description -Creates an authorization rule for a queue. +Create an authorization rule for a queue. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES @@ -38,7 +38,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -50,21 +64,33 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. PARAMETER : Description of a namespace authorization rule. - [Rights ]: The rights associated with the rule. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [Rights >]: The rights associated with the rule. + +QUEUEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusqueueauthorizationrule #> function New-AzServiceBusQueueAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityQueue', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityQueueExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -77,6 +103,8 @@ param( ${NamespaceName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The queue name. @@ -100,22 +128,38 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateViaIdentityQueue', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityQueueExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${QueueInputObject}, + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityQueueExpanded')] [AllowEmptyCollection()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityQueue', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule] # Description of a namespace authorization rule. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -178,8 +222,12 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusQueueAuthorizationRule_CreateExpanded'; CreateViaIdentity = 'Az.ServiceBus.private\New-AzServiceBusQueueAuthorizationRule_CreateViaIdentity'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusQueueAuthorizationRule_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusQueueAuthorizationRule_CreateViaIdentityNamespaceExpanded'; + CreateViaIdentityQueue = 'Az.ServiceBus.private\New-AzServiceBusQueueAuthorizationRule_CreateViaIdentityQueue'; + CreateViaIdentityQueueExpanded = 'Az.ServiceBus.private\New-AzServiceBusQueueAuthorizationRule_CreateViaIdentityQueueExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusQueueKey.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusQueueKey.ps1 index df248cf1e462..f351f1fb9594 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusQueueKey.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusQueueKey.ps1 @@ -25,23 +25,55 @@ Regenerates the primary or secondary connection strings to the queue. {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + PARAMETER : Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - KeyType : The access key to regenerate. + KeyType : The access key to regenerate. [Key ]: Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType + +QUEUEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusqueuekey +.Link +https://msdn.microsoft.com/en-us/library/azure/mt705606.aspx #> function New-AzServiceBusQueueKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] -[CmdletBinding(DefaultParameterSetName='Regenerate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] +[CmdletBinding(DefaultParameterSetName='RegenerateViaIdentityQueue', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] @@ -49,25 +81,35 @@ param( # The authorization rule name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The queue name. ${QueueName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='Regenerate')] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath')] + [Parameter(ParameterSetName='RegenerateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -75,13 +117,55 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter(Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='RegenerateViaIdentityQueue', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityQueueExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${QueueInputObject}, + + [Parameter(ParameterSetName='Regenerate', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityQueue', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters] # Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityQueueExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # The access key to regenerate. + ${KeyType}, + + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='RegenerateViaIdentityQueueExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType + ${Key}, + + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Path of Json file supplied to the Regenerate operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Json string supplied to the Regenerate operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -141,8 +225,14 @@ begin { $mapping = @{ Regenerate = 'Az.ServiceBus.private\New-AzServiceBusQueueKey_Regenerate'; + RegenerateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusQueueKey_RegenerateViaIdentityNamespace'; + RegenerateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusQueueKey_RegenerateViaIdentityNamespaceExpanded'; + RegenerateViaIdentityQueue = 'Az.ServiceBus.private\New-AzServiceBusQueueKey_RegenerateViaIdentityQueue'; + RegenerateViaIdentityQueueExpanded = 'Az.ServiceBus.private\New-AzServiceBusQueueKey_RegenerateViaIdentityQueueExpanded'; + RegenerateViaJsonFilePath = 'Az.ServiceBus.private\New-AzServiceBusQueueKey_RegenerateViaJsonFilePath'; + RegenerateViaJsonString = 'Az.ServiceBus.private\New-AzServiceBusQueueKey_RegenerateViaJsonString'; } - if (('Regenerate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Regenerate', 'RegenerateViaJsonFilePath', 'RegenerateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusRule.ps1 index bc398d36a494..2577417e4416 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusRule.ps1 @@ -16,20 +16,20 @@ <# .Synopsis -Creates a new rule and updates an existing rule +Create a new rule and updates an existing rule .Description -Creates a new rule and updates an existing rule +Create a new rule and updates an existing rule .Example New-AzServiceBusRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -SubscriptionName mySubscription -Name myCorrelationRule -FilterType CorrelationFilter -ContentType contenttype -CorrelationFilterProperty @{a='b';c='d'} -SessionId sessionid -CorrelationId correlationid -MessageId messageid -Label label -ReplyTo replyto -ReplyToSessionId replytosessionid .Example New-AzServiceBusRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -SubscriptionName mySubscription -Name mySqlRule -FilterType SqlFilter -SqlExpression 3=2 -ActionSqlExpression "SET a=b" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule .Notes COMPLEX PARAMETER PROPERTIES @@ -38,7 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -58,7 +58,7 @@ PARAMETER : Description of Rule Resource. [(Any) ]: This indicates any property can be added to this object. [CorrelationFilterRequiresPreprocessing ]: Value that indicates whether the rule action requires preprocessing. [CorrelationId ]: Identifier of the correlation. - [FilterType ]: Filter type that is evaluated against a BrokeredMessage. + [FilterType ]: Filter type that is evaluated against a BrokeredMessage. [Label ]: Application specific label. [MessageId ]: Identifier of the message. [ReplyTo ]: Address of the queue to reply to. @@ -67,32 +67,24 @@ PARAMETER : Description of Rule Resource. [SqlExpression ]: The SQL expression. e.g. MyProperty='ABC' [SqlFilterCompatibilityLevel ]: This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. [SqlFilterRequiresPreprocessing ]: Value that indicates whether the rule action requires preprocessing. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. [To ]: Address to send to. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusrule #> function New-AzServiceBusRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule] # Description of Rule Resource. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusSubscription.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusSubscription.ps1 index acc9a9afd90d..5fa712127ac6 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusSubscription.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusSubscription.ps1 @@ -16,18 +16,18 @@ <# .Synopsis -Creates a topic subscription. +Create a topic subscription. .Description -Creates a topic subscription. +Create a topic subscription. .Example New-AzServiceBusSubscription -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -Name mySubscription -DefaultMessageTimeToLive (New-TimeSpan -Days 6) -EnableBatchedOperations .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription .Notes COMPLEX PARAMETER PROPERTIES @@ -36,7 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -63,32 +63,26 @@ PARAMETER : Description of subscription resource. [LockDuration ]: ISO 8061 lock duration timespan for the subscription. The default value is 1 minute. [MaxDeliveryCount ]: Number of maximum deliveries. [RequiresSession ]: Value indicating if a subscription supports the concept of sessions. - [Status ]: Enumerates the possible values for the status of a messaging entity. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [Status ]: Enumerates the possible values for the status of a messaging entity. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebussubscription +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx #> function New-AzServiceBusSubscription { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription] # Description of subscription resource. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusTopic.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusTopic.ps1 index 6c5ccc4b1ef4..79723d140ba7 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusTopic.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusTopic.ps1 @@ -16,18 +16,18 @@ <# .Synopsis -Creates a topic in the specified namespace. +Create a topic in the specified namespace. .Description -Creates a topic in the specified namespace. +Create a topic in the specified namespace. .Example New-AzServiceBusTopic -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name myTopic -DefaultMessageTimeToLive (New-TimeSpan -Days 18) -EnableBatchedOperations .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic .Notes COMPLEX PARAMETER PROPERTIES @@ -36,7 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -57,33 +57,27 @@ PARAMETER : Description of topic resource. [MaxMessageSizeInKilobytes ]: Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024. [MaxSizeInMegabytes ]: Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024. [RequiresDuplicateDetection ]: Value indicating if this topic requires duplicate detection. - [Status ]: Enumerates the possible values for the status of a messaging entity. + [Status ]: Enumerates the possible values for the status of a messaging entity. [SupportOrdering ]: Value that indicates whether the topic supports ordering. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebustopic +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx #> function New-AzServiceBusTopic { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic] # Description of topic resource. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusTopicAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusTopicAuthorizationRule.ps1 index 070b970adbdd..7ef8f39fd183 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusTopicAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusTopicAuthorizationRule.ps1 @@ -16,20 +16,20 @@ <# .Synopsis -Creates an authorization rule for the specified topic. +Create an authorization rule for the specified topic. .Description -Creates an authorization rule for the specified topic. +Create an authorization rule for the specified topic. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES @@ -38,7 +38,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -50,21 +64,35 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. PARAMETER : Description of a namespace authorization rule. - [Rights ]: The rights associated with the rule. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [Rights >]: The rights associated with the rule. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebustopicauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt720678.aspx #> function New-AzServiceBusTopicAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityTopic', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -91,6 +119,8 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The topic name. @@ -100,22 +130,38 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [AllowEmptyCollection()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityTopic', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule] # Description of a namespace authorization rule. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -178,8 +224,12 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusTopicAuthorizationRule_CreateExpanded'; CreateViaIdentity = 'Az.ServiceBus.private\New-AzServiceBusTopicAuthorizationRule_CreateViaIdentity'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusTopicAuthorizationRule_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusTopicAuthorizationRule_CreateViaIdentityNamespaceExpanded'; + CreateViaIdentityTopic = 'Az.ServiceBus.private\New-AzServiceBusTopicAuthorizationRule_CreateViaIdentityTopic'; + CreateViaIdentityTopicExpanded = 'Az.ServiceBus.private\New-AzServiceBusTopicAuthorizationRule_CreateViaIdentityTopicExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusTopicKey.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusTopicKey.ps1 index 16db587993ab..b0d3088d05c8 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusTopicKey.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/New-AzServiceBusTopicKey.ps1 @@ -25,23 +25,55 @@ Regenerates primary or secondary connection strings for the topic. {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + PARAMETER : Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - KeyType : The access key to regenerate. + KeyType : The access key to regenerate. [Key ]: Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebustopickey +.Link +https://msdn.microsoft.com/en-us/library/azure/mt720679.aspx #> function New-AzServiceBusTopicKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] -[CmdletBinding(DefaultParameterSetName='Regenerate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] +[CmdletBinding(DefaultParameterSetName='RegenerateViaIdentityTopic', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] @@ -49,25 +81,25 @@ param( # The authorization rule name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. ${ResourceGroupName}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] - [System.String] - # The topic name. - ${TopicName}, - - [Parameter()] + [Parameter(ParameterSetName='Regenerate')] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath')] + [Parameter(ParameterSetName='RegenerateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -75,13 +107,65 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter(Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [System.String] + # The topic name. + ${TopicName}, + + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='RegenerateViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityTopicExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + + [Parameter(ParameterSetName='Regenerate', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityTopic', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters] # Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityTopicExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # The access key to regenerate. + ${KeyType}, + + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='RegenerateViaIdentityTopicExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType + ${Key}, + + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Path of Json file supplied to the Regenerate operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Json string supplied to the Regenerate operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -141,8 +225,14 @@ begin { $mapping = @{ Regenerate = 'Az.ServiceBus.private\New-AzServiceBusTopicKey_Regenerate'; + RegenerateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusTopicKey_RegenerateViaIdentityNamespace'; + RegenerateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusTopicKey_RegenerateViaIdentityNamespaceExpanded'; + RegenerateViaIdentityTopic = 'Az.ServiceBus.private\New-AzServiceBusTopicKey_RegenerateViaIdentityTopic'; + RegenerateViaIdentityTopicExpanded = 'Az.ServiceBus.private\New-AzServiceBusTopicKey_RegenerateViaIdentityTopicExpanded'; + RegenerateViaJsonFilePath = 'Az.ServiceBus.private\New-AzServiceBusTopicKey_RegenerateViaJsonFilePath'; + RegenerateViaJsonString = 'Az.ServiceBus.private\New-AzServiceBusTopicKey_RegenerateViaJsonString'; } - if (('Regenerate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Regenerate', 'RegenerateViaJsonFilePath', 'RegenerateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/ProxyCmdletDefinitions.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/ProxyCmdletDefinitions.ps1 index 49364ffbd2d7..336f5f9cec14 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -27,16 +27,44 @@ Gets an authorization rule for a namespace by rule name. .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +DISASTERRECOVERYCONFIGINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -48,12 +76,17 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusdisasterrecoveryconfigauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639392.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639376.aspx #> function Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -61,6 +94,8 @@ param( ${Alias}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityDisasterRecoveryConfig', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -93,9 +128,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityDisasterRecoveryConfig', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${DisasterRecoveryConfigInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -156,9 +202,11 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentity'; + GetViaIdentityDisasterRecoveryConfig = 'Az.ServiceBus.private\Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace'; List = 'Az.ServiceBus.private\Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -209,12 +257,14 @@ Gets the primary and secondary connection strings for the namespace. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusdisasterrecoveryconfigkey +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639398.aspx #> function Get-AzServiceBusDisasterRecoveryConfigKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -309,7 +359,7 @@ begin { $mapping = @{ List = 'Az.ServiceBus.private\Get-AzServiceBusDisasterRecoveryConfigKey_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -362,7 +412,7 @@ Gets an authorization rule for a namespace by rule name. .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES @@ -371,7 +421,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -383,12 +447,17 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusnamespaceauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639392.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639376.aspx #> function Get-AzServiceBusNamespaceAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -421,9 +490,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -484,9 +558,10 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusNamespaceAuthorizationRule_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusNamespaceAuthorizationRule_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusNamespaceAuthorizationRule_GetViaIdentityNamespace'; List = 'Az.ServiceBus.private\Get-AzServiceBusNamespaceAuthorizationRule_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -537,12 +612,14 @@ Gets the primary and secondary connection strings for the namespace. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusnamespacekey +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639398.aspx #> function Get-AzServiceBusNamespaceKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -631,7 +708,7 @@ begin { $mapping = @{ List = 'Az.ServiceBus.private\Get-AzServiceBusNamespaceKey_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -682,12 +759,12 @@ Lists all of the available ServiceBus REST API operations. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperation .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusoperation #> function Get-AzServiceBusOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -794,7 +871,7 @@ Gets an authorization rule for a queue by rule name. .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES @@ -803,7 +880,35 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +QUEUEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -815,12 +920,18 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusqueueauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt705611.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt705607.aspx #> function Get-AzServiceBusQueueAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityQueue', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -834,6 +945,7 @@ param( ${NamespaceName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -860,9 +972,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityQueue', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${QueueInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -923,9 +1046,11 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusQueueAuthorizationRule_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusQueueAuthorizationRule_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusQueueAuthorizationRule_GetViaIdentityNamespace'; + GetViaIdentityQueue = 'Az.ServiceBus.private\Get-AzServiceBusQueueAuthorizationRule_GetViaIdentityQueue'; List = 'Az.ServiceBus.private\Get-AzServiceBusQueueAuthorizationRule_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -976,12 +1101,14 @@ Primary and secondary connection strings to the queue. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebusqueuekey +.Link +https://msdn.microsoft.com/en-us/library/azure/mt705608.aspx #> function Get-AzServiceBusQueueKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1076,7 +1203,7 @@ begin { $mapping = @{ List = 'Az.ServiceBus.private\Get-AzServiceBusQueueKey_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1129,7 +1256,7 @@ Returns the specified authorization rule. .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES @@ -1138,7 +1265,35 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -1150,12 +1305,18 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebustopicauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt720676.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt720681.aspx #> function Get-AzServiceBusTopicAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityTopic', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -1185,6 +1346,7 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -1195,9 +1357,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1258,9 +1431,11 @@ begin { $mapping = @{ Get = 'Az.ServiceBus.private\Get-AzServiceBusTopicAuthorizationRule_Get'; GetViaIdentity = 'Az.ServiceBus.private\Get-AzServiceBusTopicAuthorizationRule_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.ServiceBus.private\Get-AzServiceBusTopicAuthorizationRule_GetViaIdentityNamespace'; + GetViaIdentityTopic = 'Az.ServiceBus.private\Get-AzServiceBusTopicAuthorizationRule_GetViaIdentityTopic'; List = 'Az.ServiceBus.private\Get-AzServiceBusTopicAuthorizationRule_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1311,12 +1486,14 @@ Gets the primary and secondary connection strings for the topic. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.servicebus/get-azservicebustopickey +.Link +https://msdn.microsoft.com/en-us/library/azure/mt720677.aspx #> function Get-AzServiceBusTopicKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1411,7 +1588,7 @@ begin { $mapping = @{ List = 'Az.ServiceBus.private\Get-AzServiceBusTopicKey_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1473,7 +1650,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -1491,6 +1682,7 @@ function Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing { [CmdletBinding(DefaultParameterSetName='Break', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Break', Mandatory)] + [Parameter(ParameterSetName='BreakViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The Disaster Recovery configuration name @@ -1520,9 +1712,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='BreakViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1589,8 +1786,9 @@ begin { $mapping = @{ Break = 'Az.ServiceBus.private\Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing_Break'; BreakViaIdentity = 'Az.ServiceBus.private\Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentity'; + BreakViaIdentityNamespace = 'Az.ServiceBus.private\Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace'; } - if (('Break') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Break') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1641,7 +1839,7 @@ Invokes GEO DR failover and reconfigure the alias to point to the secondary name {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs @@ -1654,7 +1852,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -1676,6 +1888,10 @@ function Invoke-AzServiceBusFailDisasterRecoveryConfigOver { param( [Parameter(ParameterSetName='Fail', Mandatory)] [Parameter(ParameterSetName='FailExpanded', Mandatory)] + [Parameter(ParameterSetName='FailViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='FailViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='FailViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='FailViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The Disaster Recovery configuration name @@ -1683,6 +1899,8 @@ param( [Parameter(ParameterSetName='Fail', Mandatory)] [Parameter(ParameterSetName='FailExpanded', Mandatory)] + [Parameter(ParameterSetName='FailViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='FailViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name @@ -1690,6 +1908,8 @@ param( [Parameter(ParameterSetName='Fail', Mandatory)] [Parameter(ParameterSetName='FailExpanded', Mandatory)] + [Parameter(ParameterSetName='FailViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='FailViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. @@ -1697,6 +1917,8 @@ param( [Parameter(ParameterSetName='Fail')] [Parameter(ParameterSetName='FailExpanded')] + [Parameter(ParameterSetName='FailViaJsonFilePath')] + [Parameter(ParameterSetName='FailViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -1709,24 +1931,43 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='FailViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='FailViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='Fail', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='FailViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='FailViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IFailoverProperties] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IFailoverProperties] # Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='FailExpanded')] [Parameter(ParameterSetName='FailViaIdentityExpanded')] + [Parameter(ParameterSetName='FailViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] # Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. ${IsSafeFailover}, + [Parameter(ParameterSetName='FailViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Path of Json file supplied to the Fail operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='FailViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Json string supplied to the Fail operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1795,8 +2036,12 @@ begin { FailExpanded = 'Az.ServiceBus.private\Invoke-AzServiceBusFailDisasterRecoveryConfigOver_FailExpanded'; FailViaIdentity = 'Az.ServiceBus.private\Invoke-AzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentity'; FailViaIdentityExpanded = 'Az.ServiceBus.private\Invoke-AzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityExpanded'; + FailViaIdentityNamespace = 'Az.ServiceBus.private\Invoke-AzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityNamespace'; + FailViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\Invoke-AzServiceBusFailDisasterRecoveryConfigOver_FailViaIdentityNamespaceExpanded'; + FailViaJsonFilePath = 'Az.ServiceBus.private\Invoke-AzServiceBusFailDisasterRecoveryConfigOver_FailViaJsonFilePath'; + FailViaJsonString = 'Az.ServiceBus.private\Invoke-AzServiceBusFailDisasterRecoveryConfigOver_FailViaJsonString'; } - if (('Fail', 'FailExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Fail', 'FailExpanded', 'FailViaJsonFilePath', 'FailViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1838,18 +2083,18 @@ end { <# .Synopsis -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) .Description -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) .Example New-AzServiceBusGeoDRConfiguration -Name myAlias -ResourceGroupName myResourceGroup -NamespaceName myPrimaryNamespace -PartnerNamespace "/subscriptions/0000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/mySecondaryNamespace" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery .Notes COMPLEX PARAMETER PROPERTIES @@ -1858,7 +2103,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -1872,31 +2117,23 @@ INPUTOBJECT : Identity Parameter PARAMETER : Single item in List or Get Alias(Disaster Recovery configuration) operation [AlternateName ]: Primary/Secondary eventhub namespace name, which is part of GEO DR pairing [PartnerNamespace ]: ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusgeodrconfiguration #> function New-AzServiceBusGeoDRConfiguration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery] # Single item in List or Get Alias(Disaster Recovery configuration) operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -1998,20 +2235,20 @@ end { <# .Synopsis -Creates or updates an authorization rule for a namespace. +Create an authorization rule for a namespace. .Description -Creates or updates an authorization rule for a namespace. +Create an authorization rule for a namespace. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES @@ -2020,7 +2257,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -2032,21 +2283,19 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. PARAMETER : Description of a namespace authorization rule. - [Rights ]: The rights associated with the rule. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [Rights >]: The rights associated with the rule. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusnamespaceauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639410.aspx #> function New-AzServiceBusNamespaceAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -2076,22 +2325,29 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [AllowEmptyCollection()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule] # Description of a namespace authorization rule. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -2154,8 +2410,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusNamespaceAuthorizationRule_CreateExpanded'; CreateViaIdentity = 'Az.ServiceBus.private\New-AzServiceBusNamespaceAuthorizationRule_CreateViaIdentity'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusNamespaceAuthorizationRule_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -2206,23 +2464,41 @@ Regenerates the primary or secondary connection strings for the namespace. {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + PARAMETER : Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - KeyType : The access key to regenerate. + KeyType : The access key to regenerate. [Key ]: Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusnamespacekey +.Link +https://msdn.microsoft.com/en-us/library/azure/mt718977.aspx #> function New-AzServiceBusNamespaceKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] -[CmdletBinding(DefaultParameterSetName='Regenerate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] +[CmdletBinding(DefaultParameterSetName='RegenerateViaIdentityNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] @@ -2230,19 +2506,25 @@ param( # The authorization rule name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='Regenerate')] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath')] + [Parameter(ParameterSetName='RegenerateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -2250,13 +2532,45 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter(Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='Regenerate', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters] # Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # The access key to regenerate. + ${KeyType}, + + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType + ${Key}, + + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Path of Json file supplied to the Regenerate operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Json string supplied to the Regenerate operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2316,8 +2630,12 @@ begin { $mapping = @{ Regenerate = 'Az.ServiceBus.private\New-AzServiceBusNamespaceKey_Regenerate'; + RegenerateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusNamespaceKey_RegenerateViaIdentityNamespace'; + RegenerateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusNamespaceKey_RegenerateViaIdentityNamespaceExpanded'; + RegenerateViaJsonFilePath = 'Az.ServiceBus.private\New-AzServiceBusNamespaceKey_RegenerateViaJsonFilePath'; + RegenerateViaJsonString = 'Az.ServiceBus.private\New-AzServiceBusNamespaceKey_RegenerateViaJsonString'; } - if (('Regenerate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Regenerate', 'RegenerateViaJsonFilePath', 'RegenerateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -2359,11 +2677,11 @@ end { <# .Synopsis -Creates or updates a service namespace. +Create a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. .Description -Creates or updates a service namespace. +Create a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. .Example @@ -2378,11 +2696,11 @@ New-AzServiceBusNamespace -ResourceGroupName myResourceGroup -Name myNamespace - New-AzServiceBusNamespace -ResourceGroupName myResourceGroup -Name myNamespace -SkuName Standard -Location southcentralus -Tag @{k1='v1'; k2='v2'} -DisableLocalAuth .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace .Notes COMPLEX PARAMETER PROPERTIES @@ -2391,7 +2709,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -2414,57 +2732,41 @@ PARAMETER : Description of a namespace resource. [(Any) ]: This indicates any property can be added to this object. [AlternateName ]: Alternate name for namespace [DisableLocalAuth ]: This property disables SAS authentication for the Service Bus namespace. - [IdentityType ]: Type of managed service identity. - [KeySource ]: Enumerates the possible value of keySource for Encryption - [KeyVaultProperty ]: Properties of KeyVault + [IdentityType ]: Type of managed service identity. + [KeySource ]: Enumerates the possible value of keySource for Encryption + [KeyVaultProperty >]: Properties of KeyVault [KeyName ]: Name of the Key from KeyVault [KeyVaultUri ]: Uri of KeyVault [KeyVersion ]: Version of KeyVault [UserAssignedIdentity ]: ARM ID of user Identity selected for encryption - [MinimumTlsVersion ]: The minimum TLS version for the cluster to support, e.g. '1.2' + [MinimumTlsVersion ]: The minimum TLS version for the cluster to support, e.g. '1.2' [PremiumMessagingPartition ]: The number of partitions of a Service Bus namespace. This property is only applicable to Premium SKU namespaces. The default value is 1 and possible values are 1, 2 and 4 - [PrivateEndpointConnection ]: List of private endpoint connections. - [ConnectionState ]: Status of the connection. + [PrivateEndpointConnection >]: List of private endpoint connections. + [ConnectionState ]: Status of the connection. [Description ]: Description of the connection state. [PrivateEndpointId ]: The ARM identifier for Private Endpoint. - [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. - [PublicNetworkAccess ]: This determines if traffic is allowed over public network. By default it is enabled. + [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. + [PublicNetworkAccess ]: This determines if traffic is allowed over public network. By default it is enabled. [RequireInfrastructureEncryption ]: Enable Infrastructure Encryption (Double Encryption) [SkuCapacity ]: Messaging units for your service bus premium namespace. Valid capacities are {1, 2, 4, 8, 16} multiples of your properties.premiumMessagingPartitions setting. For example, If properties.premiumMessagingPartitions is 1 then possible capacity values are 1, 2, 4, 8, and 16. If properties.premiumMessagingPartitions is 4 then possible capacity values are 4, 8, 16, 32 and 64 - [SkuName ]: Name of this SKU. - [SkuTier ]: The billing tier of this particular SKU. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [SkuName ]: Name of this SKU. + [SkuTier ]: The billing tier of this particular SKU. [UserAssignedIdentity ]: Properties for User Assigned Identities [(Any) ]: This indicates any property can be added to this object. [ZoneRedundant ]: Enabling this property creates a Premium Service Bus Namespace in regions supported availability zones. PRIVATEENDPOINTCONNECTION : List of private endpoint connections. - [ConnectionState ]: Status of the connection. + [ConnectionState ]: Status of the connection. [Description ]: Description of the connection state. [PrivateEndpointId ]: The ARM identifier for Private Endpoint. - [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusnamespace +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx #> function New-AzServiceBusNamespace { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -2492,7 +2794,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -2514,31 +2815,30 @@ param( ${DisableLocalAuth}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity. ${IdentityType}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Microsoft.KeyVault")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource] + [System.String] # Enumerates the possible value of keySource for Encryption ${KeySource}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties[]] # Properties of KeyVault - # To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ${KeyVaultProperty}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("1.0", "1.1", "1.2")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion] + [System.String] # The minimum TLS version for the cluster to support, e.g. # '1.2' ${MinimumTlsVersion}, @@ -2554,15 +2854,14 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection[]] # List of private endpoint connections. - # To construct, see NOTES section for PRIVATEENDPOINTCONNECTION properties and create a hash table. ${PrivateEndpointConnection}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. ${PublicNetworkAccess}, @@ -2583,29 +2882,29 @@ param( ${SkuCapacity}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName] + [System.String] # Name of this SKU. ${SkuName}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier] + [System.String] # The billing tier of this particular SKU. ${SkuTier}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api10.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IIdentityUserAssignedIdentities]))] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IIdentityUserAssignedIdentities]))] [System.Collections.Hashtable] # Properties for User Assigned Identities ${UserAssignedIdentity}, @@ -2618,9 +2917,8 @@ param( [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace] # Description of a namespace resource. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -2696,7 +2994,7 @@ begin { CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusNamespace_CreateExpanded'; CreateViaIdentity = 'Az.ServiceBus.private\New-AzServiceBusNamespace_CreateViaIdentity'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -2738,20 +3036,20 @@ end { <# .Synopsis -Create or update NetworkRuleSet for a Namespace. +Create NetworkRuleSet for a Namespace. .Description -Create or update NetworkRuleSet for a Namespace. +Create NetworkRuleSet for a Namespace. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet .Notes COMPLEX PARAMETER PROPERTIES @@ -2760,7 +3058,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -2772,23 +3070,17 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. IPRULE : List of IpRules - [Action ]: The IP Filter Action + [Action ]: The IP Filter Action [IPMask ]: IP Mask PARAMETER : Description of NetworkRuleSet resource. - [DefaultAction ]: Default Action for Network Rule Set - [IPRule ]: List of IpRules - [Action ]: The IP Filter Action + [DefaultAction ]: Default Action for Network Rule Set + [IPRule >]: List of IpRules + [Action ]: The IP Filter Action [IPMask ]: IP Mask - [PublicNetworkAccess ]: This determines if traffic is allowed over public network. By default it is enabled. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [PublicNetworkAccess ]: This determines if traffic is allowed over public network. By default it is enabled. [TrustedServiceAccessEnabled ]: Value that indicates whether Trusted Service Access is Enabled or not. - [VirtualNetworkRule ]: List VirtualNetwork Rules + [VirtualNetworkRule >]: List VirtualNetwork Rules [IgnoreMissingVnetServiceEndpoint ]: Value that indicates whether to ignore missing VNet Service Endpoint [SubnetId ]: Resource ID of Virtual Network Subnet @@ -2799,7 +3091,7 @@ VIRTUALNETWORKRULE : List VirtualNetwork Rules https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusnetworkruleset #> function New-AzServiceBusNetworkRuleSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -2826,28 +3118,26 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Allow", "Deny")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction] + [System.String] # Default Action for Network Rule Set ${DefaultAction}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules[]] # List of IpRules - # To construct, see NOTES section for IPRULE properties and create a hash table. ${IPRule}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. ${PublicNetworkAccess}, @@ -2861,16 +3151,14 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules[]] # List VirtualNetwork Rules - # To construct, see NOTES section for VIRTUALNETWORKRULE properties and create a hash table. ${VirtualNetworkRule}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet] # Description of NetworkRuleSet resource. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -2934,7 +3222,7 @@ begin { CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusNetworkRuleSet_CreateExpanded'; CreateViaIdentity = 'Az.ServiceBus.private\New-AzServiceBusNetworkRuleSet_CreateViaIdentity'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -2976,20 +3264,20 @@ end { <# .Synopsis -Creates or updates PrivateEndpointConnections of service namespace. +Create PrivateEndpointConnections of service namespace. .Description -Creates or updates PrivateEndpointConnections of service namespace. +Create PrivateEndpointConnections of service namespace. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -2998,7 +3286,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -3010,24 +3312,22 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. PARAMETER : Properties of the PrivateEndpointConnection. - [ConnectionState ]: Status of the connection. + [ConnectionState ]: Status of the connection. [Description ]: Description of the connection state. [PrivateEndpointId ]: The ARM identifier for Private Endpoint. - [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusprivateendpointconnection +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx #> function New-AzServiceBusPrivateEndpointConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Alias('PrivateEndpointConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] @@ -3058,40 +3358,50 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # The ARM identifier for Private Endpoint. ${PrivateEndpointId}, [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # Description of the connection state. ${PrivateLinkServiceConnectionStateDescription}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus])] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus] + [System.String] # Status of the connection. ${PrivateLinkServiceConnectionStateStatus}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState])] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState] + [System.String] # Provisioning state of the Private Endpoint Connection. ${ProvisioningState}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection] # Properties of the PrivateEndpointConnection. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -3154,8 +3464,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusPrivateEndpointConnection_CreateExpanded'; CreateViaIdentity = 'Az.ServiceBus.private\New-AzServiceBusPrivateEndpointConnection_CreateViaIdentity'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusPrivateEndpointConnection_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -3197,20 +3509,20 @@ end { <# .Synopsis -Creates an authorization rule for a queue. +Create an authorization rule for a queue. .Description -Creates an authorization rule for a queue. +Create an authorization rule for a queue. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES @@ -3219,7 +3531,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -3231,21 +3557,33 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. PARAMETER : Description of a namespace authorization rule. - [Rights ]: The rights associated with the rule. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. -.Link + [Rights >]: The rights associated with the rule. + +QUEUEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. +.Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusqueueauthorizationrule #> function New-AzServiceBusQueueAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityQueue', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityQueueExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -3258,6 +3596,8 @@ param( ${NamespaceName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The queue name. @@ -3281,22 +3621,38 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateViaIdentityQueue', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityQueueExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${QueueInputObject}, + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityQueueExpanded')] [AllowEmptyCollection()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityQueue', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule] # Description of a namespace authorization rule. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -3359,8 +3715,12 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusQueueAuthorizationRule_CreateExpanded'; CreateViaIdentity = 'Az.ServiceBus.private\New-AzServiceBusQueueAuthorizationRule_CreateViaIdentity'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusQueueAuthorizationRule_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusQueueAuthorizationRule_CreateViaIdentityNamespaceExpanded'; + CreateViaIdentityQueue = 'Az.ServiceBus.private\New-AzServiceBusQueueAuthorizationRule_CreateViaIdentityQueue'; + CreateViaIdentityQueueExpanded = 'Az.ServiceBus.private\New-AzServiceBusQueueAuthorizationRule_CreateViaIdentityQueueExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -3411,23 +3771,55 @@ Regenerates the primary or secondary connection strings to the queue. {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + PARAMETER : Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - KeyType : The access key to regenerate. + KeyType : The access key to regenerate. [Key ]: Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType + +QUEUEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusqueuekey +.Link +https://msdn.microsoft.com/en-us/library/azure/mt705606.aspx #> function New-AzServiceBusQueueKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] -[CmdletBinding(DefaultParameterSetName='Regenerate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] +[CmdletBinding(DefaultParameterSetName='RegenerateViaIdentityQueue', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] @@ -3435,25 +3827,35 @@ param( # The authorization rule name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The queue name. ${QueueName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='Regenerate')] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath')] + [Parameter(ParameterSetName='RegenerateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -3461,13 +3863,55 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter(Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='RegenerateViaIdentityQueue', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityQueueExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${QueueInputObject}, + + [Parameter(ParameterSetName='Regenerate', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityQueue', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters] # Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityQueueExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # The access key to regenerate. + ${KeyType}, + + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='RegenerateViaIdentityQueueExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType + ${Key}, + + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Path of Json file supplied to the Regenerate operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Json string supplied to the Regenerate operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3527,8 +3971,14 @@ begin { $mapping = @{ Regenerate = 'Az.ServiceBus.private\New-AzServiceBusQueueKey_Regenerate'; + RegenerateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusQueueKey_RegenerateViaIdentityNamespace'; + RegenerateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusQueueKey_RegenerateViaIdentityNamespaceExpanded'; + RegenerateViaIdentityQueue = 'Az.ServiceBus.private\New-AzServiceBusQueueKey_RegenerateViaIdentityQueue'; + RegenerateViaIdentityQueueExpanded = 'Az.ServiceBus.private\New-AzServiceBusQueueKey_RegenerateViaIdentityQueueExpanded'; + RegenerateViaJsonFilePath = 'Az.ServiceBus.private\New-AzServiceBusQueueKey_RegenerateViaJsonFilePath'; + RegenerateViaJsonString = 'Az.ServiceBus.private\New-AzServiceBusQueueKey_RegenerateViaJsonString'; } - if (('Regenerate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Regenerate', 'RegenerateViaJsonFilePath', 'RegenerateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -3570,20 +4020,20 @@ end { <# .Synopsis -Creates or updates a Service Bus queue. +Create a Service Bus queue. This operation is idempotent. .Description -Creates or updates a Service Bus queue. +Create a Service Bus queue. This operation is idempotent. .Example New-AzServiceBusQueue -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name myQueue -AutoDeleteOnIdle (New-TimeSpan -Days 1 -Minutes 3 -Seconds 4) -DefaultMessageTimeToLive (New-TimeSpan -Days 5) -EnablePartitioning .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue .Notes COMPLEX PARAMETER PROPERTIES @@ -3592,7 +4042,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -3619,32 +4069,26 @@ PARAMETER : Description of queue Resource. [MaxSizeInMegabytes ]: The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024. [RequiresDuplicateDetection ]: A value indicating if this queue requires duplicate detection. [RequiresSession ]: A value that indicates whether the queue supports the concept of sessions. - [Status ]: Enumerates the possible values for the status of a messaging entity. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [Status ]: Enumerates the possible values for the status of a messaging entity. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusqueue +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639395.aspx #> function New-AzServiceBusQueue { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue] # Description of queue Resource. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -3740,20 +4184,20 @@ end { <# .Synopsis -Creates a new rule and updates an existing rule +Create a new rule and updates an existing rule .Description -Creates a new rule and updates an existing rule +Create a new rule and updates an existing rule .Example New-AzServiceBusRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -SubscriptionName mySubscription -Name myCorrelationRule -FilterType CorrelationFilter -ContentType contenttype -CorrelationFilterProperty @{a='b';c='d'} -SessionId sessionid -CorrelationId correlationid -MessageId messageid -Label label -ReplyTo replyto -ReplyToSessionId replytosessionid .Example New-AzServiceBusRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -SubscriptionName mySubscription -Name mySqlRule -FilterType SqlFilter -SqlExpression 3=2 -ActionSqlExpression "SET a=b" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule .Notes COMPLEX PARAMETER PROPERTIES @@ -3762,7 +4206,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -3782,7 +4226,7 @@ PARAMETER : Description of Rule Resource. [(Any) ]: This indicates any property can be added to this object. [CorrelationFilterRequiresPreprocessing ]: Value that indicates whether the rule action requires preprocessing. [CorrelationId ]: Identifier of the correlation. - [FilterType ]: Filter type that is evaluated against a BrokeredMessage. + [FilterType ]: Filter type that is evaluated against a BrokeredMessage. [Label ]: Application specific label. [MessageId ]: Identifier of the message. [ReplyTo ]: Address of the queue to reply to. @@ -3791,32 +4235,24 @@ PARAMETER : Description of Rule Resource. [SqlExpression ]: The SQL expression. e.g. MyProperty='ABC' [SqlFilterCompatibilityLevel ]: This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. [SqlFilterRequiresPreprocessing ]: Value that indicates whether the rule action requires preprocessing. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. [To ]: Address to send to. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebusrule #> function New-AzServiceBusRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule] # Description of Rule Resource. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -3912,18 +4348,18 @@ end { <# .Synopsis -Creates a topic subscription. +Create a topic subscription. .Description -Creates a topic subscription. +Create a topic subscription. .Example New-AzServiceBusSubscription -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -Name mySubscription -DefaultMessageTimeToLive (New-TimeSpan -Days 6) -EnableBatchedOperations .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription .Notes COMPLEX PARAMETER PROPERTIES @@ -3932,7 +4368,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -3959,32 +4395,26 @@ PARAMETER : Description of subscription resource. [LockDuration ]: ISO 8061 lock duration timespan for the subscription. The default value is 1 minute. [MaxDeliveryCount ]: Number of maximum deliveries. [RequiresSession ]: Value indicating if a subscription supports the concept of sessions. - [Status ]: Enumerates the possible values for the status of a messaging entity. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [Status ]: Enumerates the possible values for the status of a messaging entity. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebussubscription +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx #> function New-AzServiceBusSubscription { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription] # Description of subscription resource. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -4080,20 +4510,20 @@ end { <# .Synopsis -Creates an authorization rule for the specified topic. +Create an authorization rule for the specified topic. .Description -Creates an authorization rule for the specified topic. +Create an authorization rule for the specified topic. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES @@ -4102,7 +4532,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -4114,21 +4558,35 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. PARAMETER : Description of a namespace authorization rule. - [Rights ]: The rights associated with the rule. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [Rights >]: The rights associated with the rule. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebustopicauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt720678.aspx #> function New-AzServiceBusTopicAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityTopic', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -4155,6 +4613,8 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The topic name. @@ -4164,22 +4624,38 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityTopicExpanded')] [AllowEmptyCollection()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights])] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityTopic', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule] # Description of a namespace authorization rule. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -4242,8 +4718,12 @@ begin { $mapping = @{ CreateExpanded = 'Az.ServiceBus.private\New-AzServiceBusTopicAuthorizationRule_CreateExpanded'; CreateViaIdentity = 'Az.ServiceBus.private\New-AzServiceBusTopicAuthorizationRule_CreateViaIdentity'; + CreateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusTopicAuthorizationRule_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusTopicAuthorizationRule_CreateViaIdentityNamespaceExpanded'; + CreateViaIdentityTopic = 'Az.ServiceBus.private\New-AzServiceBusTopicAuthorizationRule_CreateViaIdentityTopic'; + CreateViaIdentityTopicExpanded = 'Az.ServiceBus.private\New-AzServiceBusTopicAuthorizationRule_CreateViaIdentityTopicExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -4294,23 +4774,55 @@ Regenerates primary or secondary connection strings for the topic. {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + PARAMETER : Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - KeyType : The access key to regenerate. + KeyType : The access key to regenerate. [Key ]: Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebustopickey +.Link +https://msdn.microsoft.com/en-us/library/azure/mt720679.aspx #> function New-AzServiceBusTopicKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys])] -[CmdletBinding(DefaultParameterSetName='Regenerate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys])] +[CmdletBinding(DefaultParameterSetName='RegenerateViaIdentityTopic', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] @@ -4318,25 +4830,25 @@ param( # The authorization rule name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. ${ResourceGroupName}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] - [System.String] - # The topic name. - ${TopicName}, - - [Parameter()] + [Parameter(ParameterSetName='Regenerate')] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath')] + [Parameter(ParameterSetName='RegenerateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -4344,13 +4856,65 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter(Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [System.String] + # The topic name. + ${TopicName}, + + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='RegenerateViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityTopicExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + + [Parameter(ParameterSetName='Regenerate', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityTopic', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRegenerateAccessKeyParameters] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRegenerateAccessKeyParameters] # Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityTopicExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # The access key to regenerate. + ${KeyType}, + + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded')] + [Parameter(ParameterSetName='RegenerateViaIdentityTopicExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType + ${Key}, + + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Path of Json file supplied to the Regenerate operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Json string supplied to the Regenerate operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4410,8 +4974,14 @@ begin { $mapping = @{ Regenerate = 'Az.ServiceBus.private\New-AzServiceBusTopicKey_Regenerate'; + RegenerateViaIdentityNamespace = 'Az.ServiceBus.private\New-AzServiceBusTopicKey_RegenerateViaIdentityNamespace'; + RegenerateViaIdentityNamespaceExpanded = 'Az.ServiceBus.private\New-AzServiceBusTopicKey_RegenerateViaIdentityNamespaceExpanded'; + RegenerateViaIdentityTopic = 'Az.ServiceBus.private\New-AzServiceBusTopicKey_RegenerateViaIdentityTopic'; + RegenerateViaIdentityTopicExpanded = 'Az.ServiceBus.private\New-AzServiceBusTopicKey_RegenerateViaIdentityTopicExpanded'; + RegenerateViaJsonFilePath = 'Az.ServiceBus.private\New-AzServiceBusTopicKey_RegenerateViaJsonFilePath'; + RegenerateViaJsonString = 'Az.ServiceBus.private\New-AzServiceBusTopicKey_RegenerateViaJsonString'; } - if (('Regenerate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Regenerate', 'RegenerateViaJsonFilePath', 'RegenerateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -4453,18 +5023,18 @@ end { <# .Synopsis -Creates a topic in the specified namespace. +Create a topic in the specified namespace. .Description -Creates a topic in the specified namespace. +Create a topic in the specified namespace. .Example New-AzServiceBusTopic -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name myTopic -DefaultMessageTimeToLive (New-TimeSpan -Days 18) -EnableBatchedOperations .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic .Notes COMPLEX PARAMETER PROPERTIES @@ -4473,7 +5043,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -4494,33 +5064,27 @@ PARAMETER : Description of topic resource. [MaxMessageSizeInKilobytes ]: Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024. [MaxSizeInMegabytes ]: Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024. [RequiresDuplicateDetection ]: Value indicating if this topic requires duplicate detection. - [Status ]: Enumerates the possible values for the status of a messaging entity. + [Status ]: Enumerates the possible values for the status of a messaging entity. [SupportOrdering ]: Value that indicates whether the topic supports ordering. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. .Link https://learn.microsoft.com/powershell/module/az.servicebus/new-azservicebustopic +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx #> function New-AzServiceBusTopic { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic] # Description of topic resource. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -4636,7 +5200,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -4648,12 +5226,15 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebusnamespaceauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639417.aspx #> function Remove-AzServiceBusNamespaceAuthorizationRule { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -4683,9 +5264,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4752,8 +5338,9 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusNamespaceAuthorizationRule_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusNamespaceAuthorizationRule_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusNamespaceAuthorizationRule_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -4815,7 +5402,35 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +QUEUEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -4827,12 +5442,16 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebusqueueauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt705609.aspx #> function Remove-AzServiceBusQueueAuthorizationRule { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityQueue', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -4845,6 +5464,7 @@ param( ${NamespaceName}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The queue name. @@ -4868,9 +5488,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityQueue', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${QueueInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4937,8 +5568,10 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusQueueAuthorizationRule_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusQueueAuthorizationRule_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusQueueAuthorizationRule_DeleteViaIdentityNamespace'; + DeleteViaIdentityQueue = 'Az.ServiceBus.private\Remove-AzServiceBusQueueAuthorizationRule_DeleteViaIdentityQueue'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -5000,7 +5633,35 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -5012,12 +5673,16 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebustopicauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt720681.aspx #> function Remove-AzServiceBusTopicAuthorizationRule { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityTopic', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -5044,6 +5709,7 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The topic name. @@ -5053,9 +5719,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -5122,8 +5799,10 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusTopicAuthorizationRule_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusTopicAuthorizationRule_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusTopicAuthorizationRule_DeleteViaIdentityNamespace'; + DeleteViaIdentityTopic = 'Az.ServiceBus.private\Remove-AzServiceBusTopicAuthorizationRule_DeleteViaIdentityTopic'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -5165,18 +5844,18 @@ end { <# .Synopsis -Creates Migration configuration and starts migration of entities from Standard to Premium namespace +Create Migration configuration and starts migration of entities from Standard to Premium namespace .Description -Creates Migration configuration and starts migration of entities from Standard to Premium namespace +Create Migration configuration and starts migration of entities from Standard to Premium namespace .Example Start-AzServiceBusMigration -ResourceGroupName myResourceGroup -NamespaceName myNamespace -PostMigrationName myStandardNamespace2 -TargetNamespace /subscriptions/subscriptionId/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/myPremiumNamespace .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties .Notes COMPLEX PARAMETER PROPERTIES @@ -5185,7 +5864,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -5198,32 +5877,24 @@ INPUTOBJECT : Identity Parameter PARAMETER : Single item in List or Get Migration Config operation [PostMigrationName ]: Name to access Standard Namespace after migration - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. [TargetNamespace ]: Existing premium Namespace ARM Id name which has no entities, will be used for migration .Link https://learn.microsoft.com/powershell/module/az.servicebus/start-azservicebusmigration #> function Start-AzServiceBusMigration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties] # Single item in List or Get Migration Config operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -5340,11 +6011,11 @@ Check the give namespace name availability. {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult .Notes COMPLEX PARAMETER PROPERTIES @@ -5353,7 +6024,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -5370,11 +6041,13 @@ PARAMETER : Description of a Check Name availability req https://learn.microsoft.com/powershell/module/az.servicebus/test-azservicebusdisasterrecoveryconfignameavailability #> function Test-AzServiceBusDisasterRecoveryConfigNameAvailability { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult])] [CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Check', Mandatory)] [Parameter(ParameterSetName='CheckExpanded', Mandatory)] + [Parameter(ParameterSetName='CheckViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CheckViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name @@ -5382,6 +6055,8 @@ param( [Parameter(ParameterSetName='Check', Mandatory)] [Parameter(ParameterSetName='CheckExpanded', Mandatory)] + [Parameter(ParameterSetName='CheckViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CheckViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. @@ -5389,6 +6064,8 @@ param( [Parameter(ParameterSetName='Check')] [Parameter(ParameterSetName='CheckExpanded')] + [Parameter(ParameterSetName='CheckViaJsonFilePath')] + [Parameter(ParameterSetName='CheckViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -5401,15 +6078,13 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='Check', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability] # Description of a Check Name availability request properties. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='CheckExpanded', Mandatory)] @@ -5420,6 +6095,18 @@ param( # The namespace must start with a letter, and it must end with a letter or number. ${Name}, + [Parameter(ParameterSetName='CheckViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Path of Json file supplied to the Check operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CheckViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Json string supplied to the Check operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -5482,8 +6169,10 @@ begin { CheckExpanded = 'Az.ServiceBus.private\Test-AzServiceBusDisasterRecoveryConfigNameAvailability_CheckExpanded'; CheckViaIdentity = 'Az.ServiceBus.private\Test-AzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentity'; CheckViaIdentityExpanded = 'Az.ServiceBus.private\Test-AzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded'; + CheckViaJsonFilePath = 'Az.ServiceBus.private\Test-AzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath'; + CheckViaJsonString = 'Az.ServiceBus.private\Test-AzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaJsonString'; } - if (('Check', 'CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Check', 'CheckExpanded', 'CheckViaJsonFilePath', 'CheckViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -5534,41 +6223,24 @@ Check the give namespace name availability. {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter - [Alias ]: The Disaster Recovery configuration name - [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". - [Id ]: Resource identity path - [NamespaceName ]: The namespace name - [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name - [QueueName ]: The queue name. - [ResourceGroupName ]: Name of the Resource group within the Azure subscription. - [RuleName ]: The rule name. - [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - [SubscriptionName ]: The subscription name. - [TopicName ]: The topic name. - PARAMETER : Description of a Check Name availability request properties. Name : The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. .Link https://learn.microsoft.com/powershell/module/az.servicebus/test-azservicebusnamespacenameavailability #> function Test-AzServiceBusNamespaceNameAvailability { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult])] [CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Check')] - [Parameter(ParameterSetName='CheckExpanded')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -5576,30 +6248,31 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CheckViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - [Parameter(ParameterSetName='Check', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability] # Description of a Check Name availability request properties. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='CheckExpanded', Mandatory)] - [Parameter(ParameterSetName='CheckViaIdentityExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. # The namespace must start with a letter, and it must end with a letter or number. ${Name}, + [Parameter(ParameterSetName='CheckViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Path of Json file supplied to the Check operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CheckViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Json string supplied to the Check operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -5660,10 +6333,10 @@ begin { $mapping = @{ Check = 'Az.ServiceBus.private\Test-AzServiceBusNamespaceNameAvailability_Check'; CheckExpanded = 'Az.ServiceBus.private\Test-AzServiceBusNamespaceNameAvailability_CheckExpanded'; - CheckViaIdentity = 'Az.ServiceBus.private\Test-AzServiceBusNamespaceNameAvailability_CheckViaIdentity'; - CheckViaIdentityExpanded = 'Az.ServiceBus.private\Test-AzServiceBusNamespaceNameAvailability_CheckViaIdentityExpanded'; + CheckViaJsonFilePath = 'Az.ServiceBus.private\Test-AzServiceBusNamespaceNameAvailability_CheckViaJsonFilePath'; + CheckViaJsonString = 'Az.ServiceBus.private\Test-AzServiceBusNamespaceNameAvailability_CheckViaJsonString'; } - if (('Check', 'CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Check', 'CheckExpanded', 'CheckViaJsonFilePath', 'CheckViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Remove-AzServiceBusNamespaceAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Remove-AzServiceBusNamespaceAuthorizationRule.ps1 index 4cac473f6bd1..d1758e3c6752 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Remove-AzServiceBusNamespaceAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Remove-AzServiceBusNamespaceAuthorizationRule.ps1 @@ -36,7 +36,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -48,12 +62,15 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebusnamespaceauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639417.aspx #> function Remove-AzServiceBusNamespaceAuthorizationRule { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -83,9 +100,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -152,8 +174,9 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusNamespaceAuthorizationRule_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusNamespaceAuthorizationRule_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusNamespaceAuthorizationRule_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Remove-AzServiceBusQueueAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Remove-AzServiceBusQueueAuthorizationRule.ps1 index b21968e5dcc4..c0cb55841649 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Remove-AzServiceBusQueueAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Remove-AzServiceBusQueueAuthorizationRule.ps1 @@ -36,7 +36,35 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +QUEUEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -48,12 +76,16 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebusqueueauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt705609.aspx #> function Remove-AzServiceBusQueueAuthorizationRule { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityQueue', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -66,6 +98,7 @@ param( ${NamespaceName}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The queue name. @@ -89,9 +122,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityQueue', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${QueueInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -158,8 +202,10 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusQueueAuthorizationRule_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusQueueAuthorizationRule_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusQueueAuthorizationRule_DeleteViaIdentityNamespace'; + DeleteViaIdentityQueue = 'Az.ServiceBus.private\Remove-AzServiceBusQueueAuthorizationRule_DeleteViaIdentityQueue'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Remove-AzServiceBusTopicAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Remove-AzServiceBusTopicAuthorizationRule.ps1 index 518776dd2605..df9098e94acf 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Remove-AzServiceBusTopicAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Remove-AzServiceBusTopicAuthorizationRule.ps1 @@ -36,7 +36,35 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". + [Id ]: Resource identity path + [NamespaceName ]: The namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [QueueName ]: The queue name. + [ResourceGroupName ]: Name of the Resource group within the Azure subscription. + [RuleName ]: The rule name. + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionName ]: The subscription name. + [TopicName ]: The topic name. + +TOPICINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [AuthorizationRuleName ]: The authorization rule name. + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -48,12 +76,16 @@ INPUTOBJECT : Identity Parameter [TopicName ]: The topic name. .Link https://learn.microsoft.com/powershell/module/az.servicebus/remove-azservicebustopicauthorizationrule +.Link +https://msdn.microsoft.com/en-us/library/azure/mt720681.aspx #> function Remove-AzServiceBusTopicAuthorizationRule { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityTopic', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The authorization rule name. @@ -80,6 +112,7 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The topic name. @@ -89,9 +122,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityTopic', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] + # Identity Parameter + ${TopicInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -158,8 +202,10 @@ begin { $mapping = @{ Delete = 'Az.ServiceBus.private\Remove-AzServiceBusTopicAuthorizationRule_Delete'; DeleteViaIdentity = 'Az.ServiceBus.private\Remove-AzServiceBusTopicAuthorizationRule_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.ServiceBus.private\Remove-AzServiceBusTopicAuthorizationRule_DeleteViaIdentityNamespace'; + DeleteViaIdentityTopic = 'Az.ServiceBus.private\Remove-AzServiceBusTopicAuthorizationRule_DeleteViaIdentityTopic'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Start-AzServiceBusMigration.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Start-AzServiceBusMigration.ps1 index 73b4eb932f43..3870585bc147 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Start-AzServiceBusMigration.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Start-AzServiceBusMigration.ps1 @@ -16,18 +16,18 @@ <# .Synopsis -Creates Migration configuration and starts migration of entities from Standard to Premium namespace +Create Migration configuration and starts migration of entities from Standard to Premium namespace .Description -Creates Migration configuration and starts migration of entities from Standard to Premium namespace +Create Migration configuration and starts migration of entities from Standard to Premium namespace .Example Start-AzServiceBusMigration -ResourceGroupName myResourceGroup -NamespaceName myNamespace -PostMigrationName myStandardNamespace2 -TargetNamespace /subscriptions/subscriptionId/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/myPremiumNamespace .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties .Notes COMPLEX PARAMETER PROPERTIES @@ -36,7 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -49,32 +49,24 @@ INPUTOBJECT : Identity Parameter PARAMETER : Single item in List or Get Migration Config operation [PostMigrationName ]: Name to access Standard Namespace after migration - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. [TargetNamespace ]: Existing premium Namespace ARM Id name which has no entities, will be used for migration .Link https://learn.microsoft.com/powershell/module/az.servicebus/start-azservicebusmigration #> function Start-AzServiceBusMigration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties] # Single item in List or Get Migration Config operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Test-AzServiceBusDisasterRecoveryConfigNameAvailability.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Test-AzServiceBusDisasterRecoveryConfigNameAvailability.ps1 index bb2b56f25387..b7beb06d26c9 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Test-AzServiceBusDisasterRecoveryConfigNameAvailability.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Test-AzServiceBusDisasterRecoveryConfigNameAvailability.ps1 @@ -25,11 +25,11 @@ Check the give namespace name availability. {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability .Inputs Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult .Notes COMPLEX PARAMETER PROPERTIES @@ -38,7 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". + [ConfigName ]: The configuration name. Should always be "$default". [Id ]: Resource identity path [NamespaceName ]: The namespace name [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name @@ -55,11 +55,13 @@ PARAMETER : Description of a Check Name availability req https://learn.microsoft.com/powershell/module/az.servicebus/test-azservicebusdisasterrecoveryconfignameavailability #> function Test-AzServiceBusDisasterRecoveryConfigNameAvailability { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult])] [CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Check', Mandatory)] [Parameter(ParameterSetName='CheckExpanded', Mandatory)] + [Parameter(ParameterSetName='CheckViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CheckViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # The namespace name @@ -67,6 +69,8 @@ param( [Parameter(ParameterSetName='Check', Mandatory)] [Parameter(ParameterSetName='CheckExpanded', Mandatory)] + [Parameter(ParameterSetName='CheckViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CheckViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [System.String] # Name of the Resource group within the Azure subscription. @@ -74,6 +78,8 @@ param( [Parameter(ParameterSetName='Check')] [Parameter(ParameterSetName='CheckExpanded')] + [Parameter(ParameterSetName='CheckViaJsonFilePath')] + [Parameter(ParameterSetName='CheckViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -86,15 +92,13 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='Check', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability] # Description of a Check Name availability request properties. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='CheckExpanded', Mandatory)] @@ -105,6 +109,18 @@ param( # The namespace must start with a letter, and it must end with a letter or number. ${Name}, + [Parameter(ParameterSetName='CheckViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Path of Json file supplied to the Check operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CheckViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Json string supplied to the Check operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -167,8 +183,10 @@ begin { CheckExpanded = 'Az.ServiceBus.private\Test-AzServiceBusDisasterRecoveryConfigNameAvailability_CheckExpanded'; CheckViaIdentity = 'Az.ServiceBus.private\Test-AzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentity'; CheckViaIdentityExpanded = 'Az.ServiceBus.private\Test-AzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded'; + CheckViaJsonFilePath = 'Az.ServiceBus.private\Test-AzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath'; + CheckViaJsonString = 'Az.ServiceBus.private\Test-AzServiceBusDisasterRecoveryConfigNameAvailability_CheckViaJsonString'; } - if (('Check', 'CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Check', 'CheckExpanded', 'CheckViaJsonFilePath', 'CheckViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/internal/Test-AzServiceBusNamespaceNameAvailability.ps1 b/src/ServiceBus/ServiceBus.Autorest/internal/Test-AzServiceBusNamespaceNameAvailability.ps1 index 369989283a53..258cb172cc5c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/internal/Test-AzServiceBusNamespaceNameAvailability.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/internal/Test-AzServiceBusNamespaceNameAvailability.ps1 @@ -25,41 +25,24 @@ Check the give namespace name availability. {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult +Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter - [Alias ]: The Disaster Recovery configuration name - [AuthorizationRuleName ]: The authorization rule name. - [ConfigName ]: The configuration name. Should always be "$default". - [Id ]: Resource identity path - [NamespaceName ]: The namespace name - [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name - [QueueName ]: The queue name. - [ResourceGroupName ]: Name of the Resource group within the Azure subscription. - [RuleName ]: The rule name. - [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - [SubscriptionName ]: The subscription name. - [TopicName ]: The topic name. - PARAMETER : Description of a Check Name availability request properties. Name : The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. .Link https://learn.microsoft.com/powershell/module/az.servicebus/test-azservicebusnamespacenameavailability #> function Test-AzServiceBusNamespaceNameAvailability { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult])] [CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Check')] - [Parameter(ParameterSetName='CheckExpanded')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -67,30 +50,31 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CheckViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - [Parameter(ParameterSetName='Check', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailability] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailability] # Description of a Check Name availability request properties. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='CheckExpanded', Mandatory)] - [Parameter(ParameterSetName='CheckViaIdentityExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] # The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. # The namespace must start with a letter, and it must end with a letter or number. ${Name}, + [Parameter(ParameterSetName='CheckViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Path of Json file supplied to the Check operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CheckViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] + [System.String] + # Json string supplied to the Check operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -151,10 +135,10 @@ begin { $mapping = @{ Check = 'Az.ServiceBus.private\Test-AzServiceBusNamespaceNameAvailability_Check'; CheckExpanded = 'Az.ServiceBus.private\Test-AzServiceBusNamespaceNameAvailability_CheckExpanded'; - CheckViaIdentity = 'Az.ServiceBus.private\Test-AzServiceBusNamespaceNameAvailability_CheckViaIdentity'; - CheckViaIdentityExpanded = 'Az.ServiceBus.private\Test-AzServiceBusNamespaceNameAvailability_CheckViaIdentityExpanded'; + CheckViaJsonFilePath = 'Az.ServiceBus.private\Test-AzServiceBusNamespaceNameAvailability_CheckViaJsonFilePath'; + CheckViaJsonString = 'Az.ServiceBus.private\Test-AzServiceBusNamespaceNameAvailability_CheckViaJsonString'; } - if (('Check', 'CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Check', 'CheckExpanded', 'CheckViaJsonFilePath', 'CheckViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/ServiceBus/ServiceBus.Autorest/run-module.ps1 b/src/ServiceBus/ServiceBus.Autorest/run-module.ps1 index d34c5a39dbf6..8ee71373a9c3 100644 --- a/src/ServiceBus/ServiceBus.Autorest/run-module.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/run-module.ps1 @@ -12,19 +12,19 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$Isolated, [switch]$Code) +param([switch]$NotIsolated, [switch]$Code) $ErrorActionPreference = 'Stop' -if(-not $Isolated) { +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path - & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } $isAzure = $true if($isAzure) { - . (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts + . (Join-Path $PSScriptRoot 'check-dependencies.ps1') -NotIsolated -Accounts # Load the latest version of Az.Accounts installed Import-Module -Name Az.Accounts -RequiredVersion (Get-Module -Name Az.Accounts -ListAvailable | Sort-Object -Property Version -Descending)[0].Version } diff --git a/src/ServiceBus/ServiceBus.Autorest/test-module.ps1 b/src/ServiceBus/ServiceBus.Autorest/test-module.ps1 index a72ac770b59f..06a1b646ca56 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test-module.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test-module.ps1 @@ -12,17 +12,17 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$Isolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) +param([switch]$NotIsolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) $ErrorActionPreference = 'Stop' -if(-not $Isolated) +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' if ($PSBoundParameters.ContainsKey("TestName")) { $PSBoundParameters["TestName"] = $PSBoundParameters["TestName"] -join "," } $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path - & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } @@ -34,7 +34,7 @@ if ($PSBoundParameters.ContainsKey("TestName") -and ($TestName.count -eq 1) -and $ProgressPreference = 'SilentlyContinue' $baseName = $PSScriptRoot.BaseName $requireResourceModule = (($baseName -ne "Resources") -and ($Record.IsPresent -or $Live.IsPresent)) -. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule +. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -NotIsolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule . ("$PSScriptRoot\test\utils.ps1") if ($requireResourceModule) @@ -95,4 +95,4 @@ try } } -Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file +Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Approve-AzServiceBusPrivateEndpointConnection.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Approve-AzServiceBusPrivateEndpointConnection.Recording.json index c80caca31cc9..a1339978b13d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Approve-AzServiceBusPrivateEndpointConnection.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Approve-AzServiceBusPrivateEndpointConnection.Recording.json @@ -1,17 +1,17 @@ { - "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections?api-version=2022-10-01-preview+1": { + "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "42a5d0c6-8215-4674-aecb-03adeaba2229" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "8d436725-83b2-41ee-9d9c-bf9dfab523da" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,38 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "53ce96d2-5eab-4baf-988b-cdd231520fe2_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11966" ], - "x-ms-correlation-request-id": [ "93617386-cfb1-479e-9df5-62b3d7a89bd2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131148Z:93617386-cfb1-479e-9df5-62b3d7a89bd2" ], + "x-ms-correlation-request-id": [ "10506704-3115-4b73-b437-51bfd84fa0fe" ], + "x-ms-client-request-id": [ "8d436725-83b2-41ee-9d9c-bf9dfab523da_RP" ], + "x-ms-messaging-activity-id": [ "35a34a67-e53a-4e10-9c22-0f216673a525" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T05:12:33" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "10506704-3115-4b73-b437-51bfd84fa0fe" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051233Z:10506704-3115-4b73-b437-51bfd84fa0fe" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:11:48 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0DC5B8947673458D909CF13598771B27 Ref B: SEL221051504035 Ref C: 2024-04-30T05:12:31Z" ], + "Date": [ "Tue, 30 Apr 2024 05:12:33 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1397" ], + "Content-Length": [ "1403" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}}]}", "isContentBase64": false } }, - "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview+1": { + "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "23b0ad30-f9fb-43ef-91f5-ab4209874365" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "10ab805f-4e64-4fda-8a55-0f5d050daaf9" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,36 +68,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "94aeb217-aad7-408c-b811-71e16a1af8e9_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11965" ], - "x-ms-correlation-request-id": [ "cc5fdb38-55e5-42ea-b4e2-f80df020c27b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131149Z:cc5fdb38-55e5-42ea-b4e2-f80df020c27b" ], + "x-ms-correlation-request-id": [ "b55bd8c7-b8d2-4fba-bd42-0ca4a8c16735" ], + "x-ms-client-request-id": [ "10ab805f-4e64-4fda-8a55-0f5d050daaf9_RP" ], + "x-ms-messaging-activity-id": [ "b6ae5c63-5fd9-43e7-8150-183065464028" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:12:35" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "b55bd8c7-b8d2-4fba-bd42-0ca4a8c16735" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051235Z:b55bd8c7-b8d2-4fba-bd42-0ca4a8c16735" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:11:48 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 158F05C541DE4BB7BE7C98ADF5F64C2B Ref B: SEL221051504035 Ref C: 2024-04-30T05:12:33Z" ], + "Date": [ "Tue, 30 Apr 2024 05:12:34 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "692" ], + "Content-Length": [ "695" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview+2": { + "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"privateEndpoint\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"\n },\n \"privateLinkServiceConnectionState\": {\n \"status\": \"Approved\",\n \"description\": \"\"\n },\n \"provisioningState\": \"Succeeded\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"privateEndpoint\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"\n },\n \"privateLinkServiceConnectionState\": {\n \"status\": \"Approved\",\n \"description\": \"\"\n },\n \"provisioningState\": \"Succeeded\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "360" ] + "Content-Length": [ "362" ] } }, "Response": { @@ -101,81 +109,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "982a99ae-cc1f-4040-ac06-a1f4fe271a04_M2SN1_M2SN1" ], - "Azure-AsyncOperation": [ "https://management.azure.com:443/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211/operationStatus/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview\u0026operationType=Update" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "e3332731-cbd0-4f47-9bdb-9cdea6cc6db5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131149Z:e3332731-cbd0-4f47-9bdb-9cdea6cc6db5" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b/operationStatus/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview\u0026operationType=Update\u0026t=638500507564820262\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=KrMeI0WEOHz8pFUyfSYRbiEQDCh4rWgV28I9IYq78vU7NJHdehMKpJUgu-PNeGFjeDtHtl64I1SCBSCcgTijcaSFjv3cVE9QGXy9bCa78fNjSeBzDH-mxsrFnPlwk-ucUF0xZwS04jot089ozjVarQ8BzwnC7vXt1sFAw5-g_KT8z6oUdTHYp79nEBZOZli5VO5IrOiLOagR3pvU9I2X_zd5GNbI0fx3j_UtaYF3v6SklQFI4jDw3nMFi1UzpqYLtLAXUAEWwIBndSrD7ZuQ4I2-IxG74WoN2OtYok2HngdSVQnPWo3yJZeh9vYiWMUyxEkFvFPWH_9oCbY5tgnP5w\u0026h=D_pNz7FO_HSjqTH7QrtZU286QjWfyjRIMzlQxNBqTVw" ], + "x-ms-correlation-request-id": [ "efe28dce-6d82-4596-9e72-317d3c90aafe" ], + "x-ms-client-request-id": [ "480d615f-51a9-4e34-8b62-d656953cff3b_RP" ], + "x-ms-messaging-activity-id": [ "b58948e8-967a-411b-8554-2514f3ab232b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:12:36" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "efe28dce-6d82-4596-9e72-317d3c90aafe" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051236Z:efe28dce-6d82-4596-9e72-317d3c90aafe" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:11:49 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "687" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", - "isContentBase64": false - } - }, - "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview+3": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "40c7670c-b1f2-43c6-afb4-3b29377a9170" ], - "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], - "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], - "Authorization": [ "[Filtered]" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 78AEEE712F534E4EAF4A76FC36FF340C Ref B: SEL221051504035 Ref C: 2024-04-30T05:12:35Z" ], + "Date": [ "Tue, 30 Apr 2024 05:12:35 GMT" ] }, "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b251fe3d-067c-4926-bf3a-8340997f4ec4_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11964" ], - "x-ms-correlation-request-id": [ "113bce0d-d8bc-4146-8c69-f62d482f89de" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131150Z:113bce0d-d8bc-4146-8c69-f62d482f89de" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:11:50 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "687" ], + "Content-Length": [ "690" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview+4": { + "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "7" ], - "x-ms-client-request-id": [ "a3da9e86-67ff-4514-a471-ea36ad125010" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "b8e05d68-0bf4-4e82-a404-3d761b4d4a77" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -186,38 +156,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "499ca66e-6618-4edf-8f5b-c73f0025369e_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11963" ], - "x-ms-correlation-request-id": [ "9c0bef06-ec66-4572-bd74-2af5aa7e659c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131201Z:9c0bef06-ec66-4572-bd74-2af5aa7e659c" ], + "x-ms-correlation-request-id": [ "37516a66-4e0b-452d-8c73-f62a48d5b226" ], + "x-ms-client-request-id": [ "b8e05d68-0bf4-4e82-a404-3d761b4d4a77_RP" ], + "x-ms-messaging-activity-id": [ "cdb75395-4801-4a11-a3b3-91aaac299835" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T05:12:38" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "37516a66-4e0b-452d-8c73-f62a48d5b226" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051238Z:37516a66-4e0b-452d-8c73-f62a48d5b226" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:12:00 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4177FE7BF153498580187FCD0C568E6F Ref B: SEL221051504035 Ref C: 2024-04-30T05:12:36Z" ], + "Date": [ "Tue, 30 Apr 2024 05:12:37 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "687" ], + "Content-Length": [ "690" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview+5": { + "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "8" ], - "x-ms-client-request-id": [ "5c49b351-0688-455b-a045-827ef3ba661f" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "26f6da2a-496f-4fdc-91da-73e1e82596d6" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -228,38 +202,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "dbe6e48d-85dd-49d5-90b6-407f8d2e8e5d_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11962" ], - "x-ms-correlation-request-id": [ "00131c07-9d40-40af-9329-ef0d0b47cd11" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131211Z:00131c07-9d40-40af-9329-ef0d0b47cd11" ], + "x-ms-correlation-request-id": [ "96e9d39a-4b63-4845-afed-2c3b74e55092" ], + "x-ms-client-request-id": [ "26f6da2a-496f-4fdc-91da-73e1e82596d6_RP" ], + "x-ms-messaging-activity-id": [ "16f71f24-e7fa-41ea-83b0-b371a5be5c9e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T05:12:48" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "96e9d39a-4b63-4845-afed-2c3b74e55092" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051248Z:96e9d39a-4b63-4845-afed-2c3b74e55092" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:12:10 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6572BFE5F9DB4941BAE58989667E5B04 Ref B: SEL221051504035 Ref C: 2024-04-30T05:12:48Z" ], + "Date": [ "Tue, 30 Apr 2024 05:12:48 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "687" ], + "Content-Length": [ "690" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview+6": { + "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "9" ], - "x-ms-client-request-id": [ "c7772bc6-ebd5-4108-9a9a-0c9691520535" ], + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "6f3c32f4-dfd4-421c-848d-c9cd4e750c8e" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -270,38 +248,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b0d457ac-77e8-489d-86de-18c77203ac7c_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11961" ], - "x-ms-correlation-request-id": [ "08bef4ea-9ad2-4f37-94da-6a31ed53418c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131222Z:08bef4ea-9ad2-4f37-94da-6a31ed53418c" ], + "x-ms-correlation-request-id": [ "b67ee332-affa-4bcd-bf1d-ef8fa4a13af1" ], + "x-ms-client-request-id": [ "6f3c32f4-dfd4-421c-848d-c9cd4e750c8e_RP" ], + "x-ms-messaging-activity-id": [ "be140dbe-0f2d-4201-93b0-f808190c71cf" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:13:00" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "b67ee332-affa-4bcd-bf1d-ef8fa4a13af1" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051300Z:b67ee332-affa-4bcd-bf1d-ef8fa4a13af1" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:12:22 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 503DE87E59D445BD921DE46CF7B2842F Ref B: SEL221051504035 Ref C: 2024-04-30T05:12:58Z" ], + "Date": [ "Tue, 30 Apr 2024 05:13:00 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "687" ], + "Content-Length": [ "690" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview+7": { + "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "10" ], - "x-ms-client-request-id": [ "cf6780da-94d4-404f-8789-2d3280823b38" ], + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "2cf9f402-5f1c-42c8-9437-8a039942f2b6" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -312,38 +294,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "db43f251-18e9-4736-8609-06b4f2dc3520_M11SN1_M11SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11960" ], - "x-ms-correlation-request-id": [ "ccece4fb-c666-4f67-8647-e59bab84e822" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131233Z:ccece4fb-c666-4f67-8647-e59bab84e822" ], + "x-ms-correlation-request-id": [ "cb75657c-8912-4057-a3eb-b70c10765d65" ], + "x-ms-client-request-id": [ "2cf9f402-5f1c-42c8-9437-8a039942f2b6_RP" ], + "x-ms-messaging-activity-id": [ "3f06de07-5f72-40ad-91b9-7abf1110775d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:13:12" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "cb75657c-8912-4057-a3eb-b70c10765d65" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051312Z:cb75657c-8912-4057-a3eb-b70c10765d65" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:12:33 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 841A478AB25144AD802352EFFBD7A5C3 Ref B: SEL221051504035 Ref C: 2024-04-30T05:13:10Z" ], + "Date": [ "Tue, 30 Apr 2024 05:13:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "688" ], + "Content-Length": [ "691" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview+1": { + "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "11" ], - "x-ms-client-request-id": [ "8aa936a2-dc71-4a87-8bba-f5dd7829d502" ], + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "21545dea-55d1-47f7-8828-0b9388ab02f0" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -354,38 +340,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d2caaae2-1663-4a47-a0a9-3336b2e86583_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11959" ], - "x-ms-correlation-request-id": [ "856634e0-31f3-4c0f-b7ac-5505005b4700" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131244Z:856634e0-31f3-4c0f-b7ac-5505005b4700" ], + "x-ms-correlation-request-id": [ "8d046052-4d55-4b56-8fe0-0bcc34aac69d" ], + "x-ms-client-request-id": [ "21545dea-55d1-47f7-8828-0b9388ab02f0_RP" ], + "x-ms-messaging-activity-id": [ "22c92b26-077d-4e8b-a32a-a4a11cd64ee0" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:13:24" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "8d046052-4d55-4b56-8fe0-0bcc34aac69d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051324Z:8d046052-4d55-4b56-8fe0-0bcc34aac69d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:12:43 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D7FC47DBCB0348BD8DDD15DFE375EFED Ref B: SEL221051504035 Ref C: 2024-04-30T05:13:22Z" ], + "Date": [ "Tue, 30 Apr 2024 05:13:23 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "692" ], + "Content-Length": [ "695" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview+2": { + "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "12" ], - "x-ms-client-request-id": [ "8ffcb99d-3ff7-4cab-a2cd-bbd12783c64f" ], + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "6f900948-d7c1-4400-ac37-f9de2a4c7f71" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -396,36 +386,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "851fff21-5b33-45f4-9b1e-ae74b70e1f0b_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11958" ], - "x-ms-correlation-request-id": [ "bb51de81-7718-48fe-a841-f36d5e9cb3aa" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131244Z:bb51de81-7718-48fe-a841-f36d5e9cb3aa" ], + "x-ms-correlation-request-id": [ "1d8fd001-8bd2-4e5c-8eff-c2fbee471ec9" ], + "x-ms-client-request-id": [ "6f900948-d7c1-4400-ac37-f9de2a4c7f71_RP" ], + "x-ms-messaging-activity-id": [ "592e3bd2-d2bf-4cfa-8918-b27fa9d63e5e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:13:26" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "1d8fd001-8bd2-4e5c-8eff-c2fbee471ec9" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051326Z:1d8fd001-8bd2-4e5c-8eff-c2fbee471ec9" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:12:44 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BEB77D4BC3EF42F8A0C40D6385FC0729 Ref B: SEL221051504035 Ref C: 2024-04-30T05:13:24Z" ], + "Date": [ "Tue, 30 Apr 2024 05:13:25 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "692" ], + "Content-Length": [ "695" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview+3": { + "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview+3": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"privateEndpoint\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"\n },\n \"privateLinkServiceConnectionState\": {\n \"status\": \"Approved\",\n \"description\": \"Bye\"\n },\n \"provisioningState\": \"Succeeded\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"privateEndpoint\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"\n },\n \"privateLinkServiceConnectionState\": {\n \"status\": \"Approved\",\n \"description\": \"Bye\"\n },\n \"provisioningState\": \"Succeeded\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "363" ] + "Content-Length": [ "365" ] } }, "Response": { @@ -433,81 +427,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "bd2e6249-98c2-472b-a4f4-8df3994b6468_M3SN1_M3SN1" ], - "Azure-AsyncOperation": [ "https://management.azure.com:443/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00/operationStatus/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview\u0026operationType=Update" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-correlation-request-id": [ "6de5e381-6c49-414a-b365-0de55085ec61" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131245Z:6de5e381-6c49-414a-b365-0de55085ec61" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:12:45 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "690" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", - "isContentBase64": false - } - }, - "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview+4": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "14" ], - "x-ms-client-request-id": [ "a949182d-9326-4dd2-a41e-b3e00176066f" ], - "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], - "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "adf01b94-17cb-4b44-b6fe-9f7e90bd2438_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11957" ], - "x-ms-correlation-request-id": [ "19a4fe69-5ccd-44ee-9ef5-9c98d236e83f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131246Z:19a4fe69-5ccd-44ee-9ef5-9c98d236e83f" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1/operationStatus/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview\u0026operationType=Update\u0026t=638500508082593765\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=YmyWxwnaKqbDOsNyIB3EPiCQPJfUhEoLf5KqdmTU72IF5ErWmqizBTF7FJPgpjoNsEvhsK5PVbnZ-Q-kZgfxCghaHuz2_xmGt73j0zzAeRwDkBgv-5mWaxpotbw0fHl0tbWcBjq3UdQKqMQDAsaeqJvR_LZBT7KO-Sqo9YonKMrXhEQLwlLIBiwdM_IKM3bCxLQk0bhTtaaSbFk-wP2fjC9XClVU1KzMy-7HznlQqX2TPOQ1DIBYitk9Hui842_uv4tZqxxSXCFgdKZONkX8iUEc132PnAYKBk6Ck8pxuE0QhYKOux7DQyOc_re2oJcQeiGWx1xPp-6mRLwSw3HN9A\u0026h=gOe__O2fVYBwuIZhoEwYgRTTCiRVhMwli5fFfX7FOX0" ], + "x-ms-correlation-request-id": [ "705adcfc-8fc6-4154-b422-cdd6f1997402" ], + "x-ms-client-request-id": [ "80baf1c0-46bb-4485-8db1-5db31e5613b5_RP" ], + "x-ms-messaging-activity-id": [ "94642abc-ace0-4841-bcec-abf13db34232" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:13:28" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "705adcfc-8fc6-4154-b422-cdd6f1997402" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051328Z:705adcfc-8fc6-4154-b422-cdd6f1997402" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:12:45 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2EA0ED83349B4EC8B6F62E4A4D472EA9 Ref B: SEL221051504035 Ref C: 2024-04-30T05:13:26Z" ], + "Date": [ "Tue, 30 Apr 2024 05:13:27 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "690" ], + "Content-Length": [ "693" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview+5": { + "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "15" ], - "x-ms-client-request-id": [ "47980340-6205-4420-bd50-ffc4a075f704" ], + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "24955d71-540a-479f-8b06-408b6206dc4a" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -518,38 +474,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a7524d26-6caa-44f4-83df-1168e7e949b9_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11956" ], - "x-ms-correlation-request-id": [ "be4d5f2e-2694-4177-a991-d340664e6db8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131257Z:be4d5f2e-2694-4177-a991-d340664e6db8" ], + "x-ms-correlation-request-id": [ "b680d416-45c5-4f78-b98d-59259aa08015" ], + "x-ms-client-request-id": [ "24955d71-540a-479f-8b06-408b6206dc4a_RP" ], + "x-ms-messaging-activity-id": [ "0e9a7b2e-ce5a-4a99-9fde-a5415ac2ba57" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:13:30" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "b680d416-45c5-4f78-b98d-59259aa08015" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051330Z:b680d416-45c5-4f78-b98d-59259aa08015" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:12:56 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7E2746B2395249438B72ECD8B0CFF1F4 Ref B: SEL221051504035 Ref C: 2024-04-30T05:13:28Z" ], + "Date": [ "Tue, 30 Apr 2024 05:13:29 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "690" ], + "Content-Length": [ "693" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview+6": { + "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "16" ], - "x-ms-client-request-id": [ "0262094e-c6b0-4c5c-b333-fa857cfe5801" ], + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "c4bdf52c-50f7-497f-8ee4-279a3f481c69" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -560,38 +520,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7381f02f-de93-430d-a356-31831094d51c_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11955" ], - "x-ms-correlation-request-id": [ "8a63cc48-a685-40cb-b4a3-bb4305c994e2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131307Z:8a63cc48-a685-40cb-b4a3-bb4305c994e2" ], + "x-ms-correlation-request-id": [ "a71ff605-c34f-4c22-aef1-3ea9a4000e31" ], + "x-ms-client-request-id": [ "c4bdf52c-50f7-497f-8ee4-279a3f481c69_RP" ], + "x-ms-messaging-activity-id": [ "2f6a41fe-93f0-4899-b169-fad6f7c3bf64" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:13:42" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "a71ff605-c34f-4c22-aef1-3ea9a4000e31" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051342Z:a71ff605-c34f-4c22-aef1-3ea9a4000e31" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:13:06 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 956E0AD03E5343B397BA712BF3DF3D29 Ref B: SEL221051504035 Ref C: 2024-04-30T05:13:40Z" ], + "Date": [ "Tue, 30 Apr 2024 05:13:41 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "690" ], + "Content-Length": [ "693" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview+7": { + "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "17" ], - "x-ms-client-request-id": [ "d24cf890-de7c-4350-80cd-c70279c1e6a9" ], + "x-ms-unique-id": [ "14" ], + "x-ms-client-request-id": [ "00236256-ac41-4c19-9394-e60dc4fa6d3d" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -602,38 +566,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "30948682-f9b1-4b61-8d13-8565bc840d2c_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11954" ], - "x-ms-correlation-request-id": [ "6e323d05-b6bf-413a-a16e-a14fe8619c25" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131318Z:6e323d05-b6bf-413a-a16e-a14fe8619c25" ], + "x-ms-correlation-request-id": [ "1e91daa0-539c-44fe-aaa5-86b317abd934" ], + "x-ms-client-request-id": [ "00236256-ac41-4c19-9394-e60dc4fa6d3d_RP" ], + "x-ms-messaging-activity-id": [ "b318e02a-107f-45f8-a0ff-5d1d4686360a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T05:13:53" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "1e91daa0-539c-44fe-aaa5-86b317abd934" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051353Z:1e91daa0-539c-44fe-aaa5-86b317abd934" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:13:18 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0B5AF9BC4ED449079770F0C8DA824CA9 Ref B: SEL221051504035 Ref C: 2024-04-30T05:13:52Z" ], + "Date": [ "Tue, 30 Apr 2024 05:13:53 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "690" ], + "Content-Length": [ "693" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview+8": { + "Approve-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "18" ], - "x-ms-client-request-id": [ "571618f2-8a96-4f2f-aa5a-98b2ab57cbf0" ], + "x-ms-unique-id": [ "15" ], + "x-ms-client-request-id": [ "9ab70a8d-674e-488d-a2c5-2a0214d8227e" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -644,22 +612,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5a09dee7-56d3-4487-acb2-8eced619b358_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11953" ], - "x-ms-correlation-request-id": [ "e918e250-247e-4696-8c3c-faf0972b6f7f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131328Z:e918e250-247e-4696-8c3c-faf0972b6f7f" ], + "x-ms-correlation-request-id": [ "accadd8a-b3d8-4a97-8e7e-b4c02a187328" ], + "x-ms-client-request-id": [ "9ab70a8d-674e-488d-a2c5-2a0214d8227e_RP" ], + "x-ms-messaging-activity-id": [ "674db8ea-f6dd-4954-9977-b952bc56648f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:14:05" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "accadd8a-b3d8-4a97-8e7e-b4c02a187328" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051405Z:accadd8a-b3d8-4a97-8e7e-b4c02a187328" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:13:28 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FB93849E746E4F04AF4DB38627CCC8EF Ref B: SEL221051504035 Ref C: 2024-04-30T05:14:03Z" ], + "Date": [ "Tue, 30 Apr 2024 05:14:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "691" ], + "Content-Length": [ "694" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Approve-AzServiceBusPrivateEndpointConnection.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Approve-AzServiceBusPrivateEndpointConnection.Tests.ps1 index b1af627566da..ff31cb0622bb 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Approve-AzServiceBusPrivateEndpointConnection.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Approve-AzServiceBusPrivateEndpointConnection.Tests.ps1 @@ -16,7 +16,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Approve-AzServiceBusPrivateEn Describe 'Approve-AzServiceBusPrivateEndpointConnection' { $privateEndpoint = Get-AzServiceBusPrivateEndpointConnection -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace - + It 'SetExpanded' { $privateEndpoint[0].ConnectionState | Should -Be "Pending" $privateEndpoint[0].Description | Should -Be "Hello" @@ -27,7 +27,7 @@ Describe 'Approve-AzServiceBusPrivateEndpointConnection' { while($firstPrivateEndpoint.ProvisioningState -ne "Succeeded"){ $firstPrivateEndpoint = Get-AzServiceBusPrivateEndpointConnection -Name $privateEndpoint[0].Name -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace - Start-TestSleep 10 + Start-Sleep 10 } } @@ -40,7 +40,7 @@ Describe 'Approve-AzServiceBusPrivateEndpointConnection' { while($secondPrivateEndpoint.ProvisioningState -ne "Succeeded"){ $secondPrivateEndpoint = Get-AzServiceBusPrivateEndpointConnection -Name $privateEndpoint[1].Name -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace - Start-TestSleep 10 + Start-Sleep 10 } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Deny-AzServiceBusPrivateEndpointConnection.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Deny-AzServiceBusPrivateEndpointConnection.Recording.json index 4a4b170bbc93..866e3bbdd10f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Deny-AzServiceBusPrivateEndpointConnection.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Deny-AzServiceBusPrivateEndpointConnection.Recording.json @@ -1,17 +1,17 @@ { - "Deny-AzServiceBusPrivateEndpointConnection+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections?api-version=2022-10-01-preview+1": { + "Deny-AzServiceBusPrivateEndpointConnection+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "19" ], - "x-ms-client-request-id": [ "2d31d170-1d29-4f5b-b6df-d9a97e7951d8" ], + "x-ms-unique-id": [ "16" ], + "x-ms-client-request-id": [ "4e7c341c-30bb-4e74-b6f5-9a9da1959857" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,38 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "760c852f-b58d-4181-b855-a261b182f6b3_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11952" ], - "x-ms-correlation-request-id": [ "a456fda7-1d89-4d6b-bd2d-e5f134eba177" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131404Z:a456fda7-1d89-4d6b-bd2d-e5f134eba177" ], + "x-ms-correlation-request-id": [ "2ca70822-225e-4651-9856-44cff482aa65" ], + "x-ms-client-request-id": [ "4e7c341c-30bb-4e74-b6f5-9a9da1959857_RP" ], + "x-ms-messaging-activity-id": [ "75b299bb-0a51-4e00-affd-dbd334b65b0d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T05:14:46" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "2ca70822-225e-4651-9856-44cff482aa65" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051446Z:2ca70822-225e-4651-9856-44cff482aa65" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:03 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9BE934D7BEE74F019CBA8BACD7A4F0DE Ref B: SEL221051504035 Ref C: 2024-04-30T05:14:44Z" ], + "Date": [ "Tue, 30 Apr 2024 05:14:45 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1392" ], + "Content-Length": [ "1398" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}]}", "isContentBase64": false } }, - "Deny-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview+1": { + "Deny-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "20" ], - "x-ms-client-request-id": [ "4c41eedc-f71b-4906-944f-b96d1b104393" ], + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "cf764b96-44e8-4d0c-a692-9888f1ad3a36" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,36 +68,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fcff3ffb-2794-4b7f-8232-f715eb363517_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11951" ], - "x-ms-correlation-request-id": [ "456f9968-80d2-48ef-a607-3a6ef4adbe9d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131404Z:456f9968-80d2-48ef-a607-3a6ef4adbe9d" ], + "x-ms-correlation-request-id": [ "817a5f99-a6c4-4701-8316-70c5b2096b24" ], + "x-ms-client-request-id": [ "cf764b96-44e8-4d0c-a692-9888f1ad3a36_RP" ], + "x-ms-messaging-activity-id": [ "71f57c02-1034-4909-a04c-9f28bdbaa101" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T05:14:47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "817a5f99-a6c4-4701-8316-70c5b2096b24" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051448Z:817a5f99-a6c4-4701-8316-70c5b2096b24" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:04 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BA59F4B029554193885F8AF70687B2DD Ref B: SEL221051504035 Ref C: 2024-04-30T05:14:46Z" ], + "Date": [ "Tue, 30 Apr 2024 05:14:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "688" ], + "Content-Length": [ "691" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Deny-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview+2": { + "Deny-AzServiceBusPrivateEndpointConnection+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"privateEndpoint\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"\n },\n \"privateLinkServiceConnectionState\": {\n \"status\": \"Rejected\",\n \"description\": \"\"\n },\n \"provisioningState\": \"Succeeded\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"privateEndpoint\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"\n },\n \"privateLinkServiceConnectionState\": {\n \"status\": \"Rejected\",\n \"description\": \"\"\n },\n \"provisioningState\": \"Succeeded\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "360" ] + "Content-Length": [ "362" ] } }, "Response": { @@ -101,39 +109,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "25441ba1-5dca-450e-8b28-c3483a216c1d_M3SN1_M3SN1" ], - "Azure-AsyncOperation": [ "https://management.azure.com:443/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211/operationStatus/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview\u0026operationType=Update" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], - "x-ms-correlation-request-id": [ "5def83e4-71de-40e6-a4d0-12067d59b107" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131405Z:5def83e4-71de-40e6-a4d0-12067d59b107" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b/operationStatus/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview\u0026operationType=Update\u0026t=638500508902233692\u0026c=MIIHKjCCBhKgAwIBAgITHgRwbFvgB8QvXABGowAABHBsWzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNDI5MDU0OTI2WhcNMjUwNDI0MDU0OTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMI74kkH1s1fyf3u8I9NW48Al606jCyqMV0yJPFfgnXzY0ksG-iZgod2J98qesULbjiYsbXV0sHlD9QSNQU8ZIQZl4DfemNJow8QYsOz2cltqajb66-USZbxABjDvSsGKjICxWLcm-lEWkFg-GDs8LOHMiQgVivfOLn7vDT_tlU3gBy5H5UGQZJbY-elo_utlDtbzZjJPwDoybfFV_XnexkBuSK9pNVgXtOaPWgibTw2p-q5YwtHXjDet3VsWKc1qwD3IlKgLxR_nCg4CBO9Nnw6w41TJKFwDQVN070SUNKYulYf4-9KqXF5dDpB_ftcILJ2TkWDhNwtm10IQy4Lic0CAwEAAaOCBBcwggQTMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBTDbpQqaXJdBMiU7rIDX9nVdRd9VDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMEEGA1UdIAQ6MDgwDAYKKwYBBAGCN3sBATAMBgorBgEEAYI3ewIBMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKxfK_S7hJnYof2MUz_YwGYBOzg_bFpkN8fnmSQBEjC55tA8eliiZ1Y8cgSFYU-LPdEJz2KQssa1GmILoSFme62JtwI7gbHaRG0cHW8LeGSEqeRVYvguFIY17qAqJaIIDLdalEim7FRRdsARusI7yf5l3J-TrUADFhz0zQcaRdXj1tBaLqvHGQxcHxjGDL9TYGvE5QX3gMDaRP4rUEREpn5PnLZ4aKpHcO9mrypJxv7RkgkCc0NIr31WSKhZdw9PUdWvPTPnBEXNqUySJ4YGP66oGk8XPAgXkJBCoAZnTvYi8hum8Ef-2gnF4J2bTC7n-RXSGH7n1eACAZrzg8vxueM\u0026s=XNObl2ta2t_gYgDoyV-HV-5D5uKxt-MMjBAAwdDyM6T2lHHBO9LqnNiDJfd42UpeR5aUrfRvKfx7WmwFLevLWX-T0A_yRRzRYxWFP2PJyXPvjiHSz5PJd4ol58Qw-sw6QBCiq_3Apo8nffd2Tf_-if-ZWiGDNGEsXy4ssgabspOPDm1esFppxwqyG5OCNsDROe_nbK-m2VcQ8wgwaivwrrwQZFHrqHnnvoWnf6nv0VFczDmaG4NMaoHpfNW9wBhKkvMgnSsG7AjS8bqy84OPWv1rjn2WGnn727YFYQciUZAbwzT_PsEz4iK2TOc0QtMotM05l64T9jeGLE76NHLtbQ\u0026h=e7WBatp0TmXSjwJsQbuNnKw_YWHAuO2ACOfYj1VX_E4" ], + "x-ms-correlation-request-id": [ "a34dabe2-b0e3-4225-b66e-d220a09918e6" ], + "x-ms-client-request-id": [ "c634c27e-0646-478f-99b1-2d8870fd8ccf_RP" ], + "x-ms-messaging-activity-id": [ "51bf1674-3110-4f45-914f-1529c39f3c46" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:14:50" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "a34dabe2-b0e3-4225-b66e-d220a09918e6" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051450Z:a34dabe2-b0e3-4225-b66e-d220a09918e6" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:05 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: AE6F1CD1832041528FB4E53D2DAA0313 Ref B: SEL221051504035 Ref C: 2024-04-30T05:14:48Z" ], + "Date": [ "Tue, 30 Apr 2024 05:14:49 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "687" ], + "Content-Length": [ "690" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Deny-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview+1": { + "Deny-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "22" ], - "x-ms-client-request-id": [ "fdd9cc52-d71a-4454-90e2-f33f4799e77d" ], + "x-ms-unique-id": [ "19" ], + "x-ms-client-request-id": [ "c3327035-8ebc-4042-9a34-025d82a001af" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -144,38 +156,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3538dcff-ef69-465e-b889-01e5b0fd3667_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11950" ], - "x-ms-correlation-request-id": [ "9ed3dae2-2235-48c2-9767-14815182bebf" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131406Z:9ed3dae2-2235-48c2-9767-14815182bebf" ], + "x-ms-correlation-request-id": [ "265f89fe-4f78-481f-a2c8-2bb0898aa540" ], + "x-ms-client-request-id": [ "c3327035-8ebc-4042-9a34-025d82a001af_RP" ], + "x-ms-messaging-activity-id": [ "38111bd2-4c78-4304-a965-144c9a9bac64" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T05:14:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "265f89fe-4f78-481f-a2c8-2bb0898aa540" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051451Z:265f89fe-4f78-481f-a2c8-2bb0898aa540" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:05 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: AACC52AC7256475B8B162D56475BFBBC Ref B: SEL221051504035 Ref C: 2024-04-30T05:14:50Z" ], + "Date": [ "Tue, 30 Apr 2024 05:14:51 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "691" ], + "Content-Length": [ "694" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Deny-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview+2": { + "Deny-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "23" ], - "x-ms-client-request-id": [ "ed1556a1-ff1f-458c-a3de-9dd3c83ffce6" ], + "x-ms-unique-id": [ "20" ], + "x-ms-client-request-id": [ "f3f42a33-2cd3-4e3a-940b-0617fc0de0d4" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -186,36 +202,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "26698def-a663-4914-ab31-f1a355674424_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11949" ], - "x-ms-correlation-request-id": [ "0a9655a8-1e51-4328-85a5-9723333f2326" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131406Z:0a9655a8-1e51-4328-85a5-9723333f2326" ], + "x-ms-correlation-request-id": [ "b031df5d-bbc8-4a92-bd5f-2c65d80aef1d" ], + "x-ms-client-request-id": [ "f3f42a33-2cd3-4e3a-940b-0617fc0de0d4_RP" ], + "x-ms-messaging-activity-id": [ "372bf193-025b-4f0a-b459-0ad64a46d020" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:14:53" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "b031df5d-bbc8-4a92-bd5f-2c65d80aef1d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051453Z:b031df5d-bbc8-4a92-bd5f-2c65d80aef1d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:06 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6146F966147A4218A777D6882F68E0E1 Ref B: SEL221051504035 Ref C: 2024-04-30T05:14:51Z" ], + "Date": [ "Tue, 30 Apr 2024 05:14:53 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "691" ], + "Content-Length": [ "694" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Deny-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview+3": { + "Deny-AzServiceBusPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview+3": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"privateEndpoint\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"\n },\n \"privateLinkServiceConnectionState\": {\n \"status\": \"Rejected\",\n \"description\": \"Bye\"\n },\n \"provisioningState\": \"Succeeded\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"privateEndpoint\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"\n },\n \"privateLinkServiceConnectionState\": {\n \"status\": \"Rejected\",\n \"description\": \"Bye\"\n },\n \"provisioningState\": \"Succeeded\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "363" ] + "Content-Length": [ "365" ] } }, "Response": { @@ -223,23 +243,27 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9f8d2a6f-4ca2-4d5e-9067-7f54243fa203_M3SN1_M3SN1" ], - "Azure-AsyncOperation": [ "https://management.azure.com:443/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00/operationStatus/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview\u0026operationType=Update" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], - "x-ms-correlation-request-id": [ "cb851537-da1e-4029-8489-139ccce6d507" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131407Z:cb851537-da1e-4029-8489-139ccce6d507" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1/operationStatus/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview\u0026operationType=Update\u0026t=638500508949863201\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=XQtfzhaiJl9MipA_z0RKU2i3Bo9hW8hjVb7qlCEW5yMsUB4c4UP64VrQvb96xTg1F_C6LdQr5KtJ6b5u2wK5W2B2J5h9GHmEJVP33u6XYF6yawFFtE0g99v8Ld-zg-IeVgqR5b0K_sVS9ydgikjHxLJzw3ZQJSfQq8rfosuPW0Y0CXUkFWSo8uby46v39VZhVYZq2Wjy5NbqlyNiLO6jnO8S00B2seOd9vJ2ip3pAvnVYQaRpXGzOqWn1UCt_pp3Knr0GPRn278C6FqnYCg0v2rMNxR7qlnYVj89lGAJGWmLGT83kgwk-GKWCj_ScLIkRYcoDfelyvVfdK4JgLTwTQ\u0026h=g3LafrJI2hBhRjpP7dW9mIVuKDKX7LZeDivDpp7XcJ0" ], + "x-ms-correlation-request-id": [ "c130e2cf-809f-4318-a4f8-f08fe60833f8" ], + "x-ms-client-request-id": [ "2e1889a3-c585-4567-ac0c-f11eaaf2ce52_RP" ], + "x-ms-messaging-activity-id": [ "2f41e16a-d7a9-4116-88e2-f177f44ff6af" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:14:54" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "c130e2cf-809f-4318-a4f8-f08fe60833f8" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051455Z:c130e2cf-809f-4318-a4f8-f08fe60833f8" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:07 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E65C4D2962084199A96982CB2398D7E5 Ref B: SEL221051504035 Ref C: 2024-04-30T05:14:54Z" ], + "Date": [ "Tue, 30 Apr 2024 05:14:54 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "690" ], + "Content-Length": [ "693" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusAuthorizationRule.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusAuthorizationRule.Recording.json index dea8359edad5..1c60b9ff3d37 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusAuthorizationRule.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusAuthorizationRule.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzServiceBusAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "25" ], - "x-ms-client-request-id": [ "5052e433-6d3b-410a-b3ec-704ef05f726a" ], + "x-ms-unique-id": [ "22" ], + "x-ms-client-request-id": [ "1ac9d9d8-3f95-4805-baa4-6057a99d72f4" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzServiceBusNamespaceAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,37 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11948" ], - "x-ms-request-id": [ "a871c1bf-5531-4b1d-8abf-b46a4d645719" ], - "x-ms-correlation-request-id": [ "a871c1bf-5531-4b1d-8abf-b46a4d645719" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131419Z:a871c1bf-5531-4b1d-8abf-b46a4d645719" ], + "x-ms-correlation-request-id": [ "2c8638ec-0e7c-4d97-a407-1aa1d8820bf1" ], + "x-ms-client-request-id": [ "1ac9d9d8-3f95-4805-baa4-6057a99d72f4_RP" ], + "x-ms-messaging-activity-id": [ "8244eb61-936a-4f39-8b5c-69dc06366c8f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T05:15:10" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "2c8638ec-0e7c-4d97-a407-1aa1d8820bf1" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051510Z:2c8638ec-0e7c-4d97-a407-1aa1d8820bf1" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:19 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A151510ED5C54C5885AB79F2D9F9DC6E Ref B: SEL221051504035 Ref C: 2024-04-30T05:15:08Z" ], + "Date": [ "Tue, 30 Apr 2024 05:15:09 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "362" ], + "Content-Length": [ "364" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } }, - "Get-AzServiceBusAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview+2": { + "Get-AzServiceBusAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "26" ], - "x-ms-client-request-id": [ "a4323d7c-9d9a-48c7-b2ee-fabdbd67d8de" ], + "x-ms-unique-id": [ "23" ], + "x-ms-client-request-id": [ "33bf7a2a-80ce-4aa4-badf-8b9dcf02397f" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusQueueAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzServiceBusQueueAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -63,37 +68,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11947" ], - "x-ms-request-id": [ "ad61e9e7-1416-44bc-a520-f3e23aa6aefc" ], - "x-ms-correlation-request-id": [ "ad61e9e7-1416-44bc-a520-f3e23aa6aefc" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131420Z:ad61e9e7-1416-44bc-a520-f3e23aa6aefc" ], + "x-ms-correlation-request-id": [ "a5823e46-78a0-4419-992c-ab5263ad34e9" ], + "x-ms-client-request-id": [ "33bf7a2a-80ce-4aa4-badf-8b9dcf02397f_RP" ], + "x-ms-messaging-activity-id": [ "278ff490-5b62-4f62-aa56-bcd281bf3fc2" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:15:12" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "a5823e46-78a0-4419-992c-ab5263ad34e9" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051512Z:a5823e46-78a0-4419-992c-ab5263ad34e9" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:19 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F36F5E96FF974CC7955217B77ABC1B6C Ref B: SEL221051504035 Ref C: 2024-04-30T05:15:10Z" ], + "Date": [ "Tue, 30 Apr 2024 05:15:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "375" ], + "Content-Length": [ "377" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } }, - "Get-AzServiceBusAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview+3": { + "Get-AzServiceBusAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "27" ], - "x-ms-client-request-id": [ "72f8d65d-5387-457c-b768-ce34b0847570" ], + "x-ms-unique-id": [ "24" ], + "x-ms-client-request-id": [ "191e2c13-61e3-493f-a62e-030d2313293a" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusTopicAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzServiceBusTopicAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -104,37 +114,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11946" ], - "x-ms-request-id": [ "66516147-bde0-488f-a310-6a444474252b" ], - "x-ms-correlation-request-id": [ "66516147-bde0-488f-a310-6a444474252b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131421Z:66516147-bde0-488f-a310-6a444474252b" ], + "x-ms-correlation-request-id": [ "f88506fd-a6b1-47a5-a31b-49d38b067e6a" ], + "x-ms-client-request-id": [ "191e2c13-61e3-493f-a62e-030d2313293a_RP" ], + "x-ms-messaging-activity-id": [ "cca5661f-7e54-4c2e-b201-2001ae6c25b4" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:15:14" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "f88506fd-a6b1-47a5-a31b-49d38b067e6a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051514Z:f88506fd-a6b1-47a5-a31b-49d38b067e6a" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:20 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F86754FC6AAA49489C2CBECB9C681860 Ref B: SEL221051504035 Ref C: 2024-04-30T05:15:12Z" ], + "Date": [ "Tue, 30 Apr 2024 05:15:13 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "375" ], + "Content-Length": [ "377" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } }, - "Get-AzServiceBusAuthorizationRule+[NoContext]+GetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusAuthorizationRule+[NoContext]+GetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "28" ], - "x-ms-client-request-id": [ "3d0553ae-2467-4db7-9adb-f9dd016f2298" ], + "x-ms-unique-id": [ "25" ], + "x-ms-client-request-id": [ "d4f7e85b-4982-4850-b39d-0b3dccbee6d3" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusNamespaceAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -145,37 +160,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11945" ], - "x-ms-request-id": [ "25371831-6d12-4ed8-82e9-67815e006279" ], - "x-ms-correlation-request-id": [ "25371831-6d12-4ed8-82e9-67815e006279" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131422Z:25371831-6d12-4ed8-82e9-67815e006279" ], + "x-ms-correlation-request-id": [ "e90a2186-8d0e-4cc8-bb59-26b03e09494d" ], + "x-ms-client-request-id": [ "d4f7e85b-4982-4850-b39d-0b3dccbee6d3_RP" ], + "x-ms-messaging-activity-id": [ "5deb418d-1817-408a-a752-0da2eb7a6f38" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T05:15:16" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "e90a2186-8d0e-4cc8-bb59-26b03e09494d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051516Z:e90a2186-8d0e-4cc8-bb59-26b03e09494d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:21 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 21BDCFAEE4274484B9126B977E51426B Ref B: SEL221051504035 Ref C: 2024-04-30T05:15:14Z" ], + "Date": [ "Tue, 30 Apr 2024 05:15:15 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1096" ], + "Content-Length": [ "1449" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule2\",\"name\":\"namespaceAuthRule2\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule2\",\"name\":\"namespaceAuthRule2\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule3\",\"name\":\"namespaceAuthRule3\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}]}", "isContentBase64": false } }, - "Get-AzServiceBusAuthorizationRule+[NoContext]+GetExpandedQueue+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusAuthorizationRule+[NoContext]+GetExpandedQueue+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "29" ], - "x-ms-client-request-id": [ "bc7aeb95-b1ab-4a6f-884f-f8db98ae592b" ], + "x-ms-unique-id": [ "26" ], + "x-ms-client-request-id": [ "8704464c-7b4d-4458-8ae0-dbbd3804eaa9" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusQueueAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusQueueAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -186,37 +206,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11944" ], - "x-ms-request-id": [ "fa3e24ac-3b68-44b0-bb94-60ce3c95ac18" ], - "x-ms-correlation-request-id": [ "fa3e24ac-3b68-44b0-bb94-60ce3c95ac18" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131422Z:fa3e24ac-3b68-44b0-bb94-60ce3c95ac18" ], + "x-ms-correlation-request-id": [ "e415647a-18e6-4415-9efc-ecffa116c49c" ], + "x-ms-client-request-id": [ "8704464c-7b4d-4458-8ae0-dbbd3804eaa9_RP" ], + "x-ms-messaging-activity-id": [ "468af560-d3ee-4ecb-87ab-c5a845a51cf4" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T05:15:18" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "e415647a-18e6-4415-9efc-ecffa116c49c" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051518Z:e415647a-18e6-4415-9efc-ecffa116c49c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:22 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D3F5C484C0624BE695139CEBB157B6C3 Ref B: SEL221051504035 Ref C: 2024-04-30T05:15:16Z" ], + "Date": [ "Tue, 30 Apr 2024 05:15:17 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "763" ], + "Content-Length": [ "1145" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule2\",\"name\":\"queueAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule2\",\"name\":\"queueAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule3\",\"name\":\"queueAuthRule3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", "isContentBase64": false } }, - "Get-AzServiceBusAuthorizationRule+[NoContext]+GetExpandedTopic+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusAuthorizationRule+[NoContext]+GetExpandedTopic+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "30" ], - "x-ms-client-request-id": [ "73226c62-d392-49f0-81fd-234ea26af67f" ], + "x-ms-unique-id": [ "27" ], + "x-ms-client-request-id": [ "be4c521b-bede-4049-9324-63e51872440c" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusTopicAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusTopicAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -227,37 +252,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11943" ], - "x-ms-request-id": [ "c1282746-d45d-4d21-b2ce-b4a7fdae5c5a" ], - "x-ms-correlation-request-id": [ "c1282746-d45d-4d21-b2ce-b4a7fdae5c5a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131423Z:c1282746-d45d-4d21-b2ce-b4a7fdae5c5a" ], + "x-ms-correlation-request-id": [ "d920eee5-abf8-4586-81fb-5bb110857e18" ], + "x-ms-client-request-id": [ "be4c521b-bede-4049-9324-63e51872440c_RP" ], + "x-ms-messaging-activity-id": [ "d00d4123-5ade-4e62-801e-c5f13da0b96e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T05:15:19" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "d920eee5-abf8-4586-81fb-5bb110857e18" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051519Z:d920eee5-abf8-4586-81fb-5bb110857e18" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:22 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F3819A9DC98B4B56889660D7504F05E9 Ref B: SEL221051504035 Ref C: 2024-04-30T05:15:18Z" ], + "Date": [ "Tue, 30 Apr 2024 05:15:19 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "747" ], + "Content-Length": [ "1113" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule2\",\"name\":\"topicAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule2\",\"name\":\"topicAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule3\",\"name\":\"topicAuthRule3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", "isContentBase64": false } }, - "Get-AzServiceBusAuthorizationRule+[NoContext]+GetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusAuthorizationRule+[NoContext]+GetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "31" ], - "x-ms-client-request-id": [ "7e71f2d7-4e48-40b9-93cc-84c1d792d23e" ], + "x-ms-unique-id": [ "28" ], + "x-ms-client-request-id": [ "9843aeb6-86fb-4b17-9594-89303598d18f" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceAuthorizationRule_GetViaIdentity" ], "FullCommandName": [ "Get-AzServiceBusNamespaceAuthorizationRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -268,37 +298,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11942" ], - "x-ms-request-id": [ "d62762c7-b07d-47b5-b40c-20dbb91b3d7f" ], - "x-ms-correlation-request-id": [ "d62762c7-b07d-47b5-b40c-20dbb91b3d7f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131424Z:d62762c7-b07d-47b5-b40c-20dbb91b3d7f" ], + "x-ms-correlation-request-id": [ "82ca2f76-d944-47de-8997-6d7175836b60" ], + "x-ms-client-request-id": [ "9843aeb6-86fb-4b17-9594-89303598d18f_RP" ], + "x-ms-messaging-activity-id": [ "af8496f2-eabb-4143-94b0-6f495d460e5c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T05:15:21" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "82ca2f76-d944-47de-8997-6d7175836b60" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051521Z:82ca2f76-d944-47de-8997-6d7175836b60" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:23 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 14014A8C451E4BE5864DC8B95AE499B0 Ref B: SEL221051504035 Ref C: 2024-04-30T05:15:20Z" ], + "Date": [ "Tue, 30 Apr 2024 05:15:21 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "362" ], + "Content-Length": [ "364" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } }, - "Get-AzServiceBusAuthorizationRule+[NoContext]+GetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview+2": { + "Get-AzServiceBusAuthorizationRule+[NoContext]+GetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "32" ], - "x-ms-client-request-id": [ "db8d2512-d7b3-4d83-8740-c2128b50c908" ], + "x-ms-unique-id": [ "29" ], + "x-ms-client-request-id": [ "e43e0ac9-e3ce-4d3b-9faf-a53502a996c2" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusQueueAuthorizationRule_GetViaIdentity" ], "FullCommandName": [ "Get-AzServiceBusQueueAuthorizationRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -309,37 +344,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11941" ], - "x-ms-request-id": [ "a50618f8-df8f-4e64-850f-8db240b6b0b9" ], - "x-ms-correlation-request-id": [ "a50618f8-df8f-4e64-850f-8db240b6b0b9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131425Z:a50618f8-df8f-4e64-850f-8db240b6b0b9" ], + "x-ms-correlation-request-id": [ "572ce28e-debb-4e8e-a299-91f4888d9347" ], + "x-ms-client-request-id": [ "e43e0ac9-e3ce-4d3b-9faf-a53502a996c2_RP" ], + "x-ms-messaging-activity-id": [ "23dda6be-d609-422c-b275-eb65cc00bc70" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:15:23" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "572ce28e-debb-4e8e-a299-91f4888d9347" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051523Z:572ce28e-debb-4e8e-a299-91f4888d9347" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:24 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F2D470603AB84187AB33D2087F7A86A6 Ref B: SEL221051504035 Ref C: 2024-04-30T05:15:21Z" ], + "Date": [ "Tue, 30 Apr 2024 05:15:23 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "375" ], + "Content-Length": [ "377" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } }, - "Get-AzServiceBusAuthorizationRule+[NoContext]+GetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview+3": { + "Get-AzServiceBusAuthorizationRule+[NoContext]+GetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "33" ], - "x-ms-client-request-id": [ "ae6186d1-32b5-495d-b05b-47900f338df4" ], + "x-ms-unique-id": [ "30" ], + "x-ms-client-request-id": [ "3d22cba0-86af-41d8-9553-2fc626beefb5" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusTopicAuthorizationRule_GetViaIdentity" ], "FullCommandName": [ "Get-AzServiceBusTopicAuthorizationRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -350,21 +390,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11940" ], - "x-ms-request-id": [ "6c1899a1-ad4a-4ace-aa44-9a2e0abc4cf9" ], - "x-ms-correlation-request-id": [ "6c1899a1-ad4a-4ace-aa44-9a2e0abc4cf9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131426Z:6c1899a1-ad4a-4ace-aa44-9a2e0abc4cf9" ], + "x-ms-correlation-request-id": [ "b676779a-ac9e-458c-b1e1-feb11dd1a200" ], + "x-ms-client-request-id": [ "3d22cba0-86af-41d8-9553-2fc626beefb5_RP" ], + "x-ms-messaging-activity-id": [ "849e71a8-2af5-493a-a93d-fb547ee31e9c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:15:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "b676779a-ac9e-458c-b1e1-feb11dd1a200" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051525Z:b676779a-ac9e-458c-b1e1-feb11dd1a200" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:25 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 34159A9EF9BF41BAAC406AE80ED3DFED Ref B: SEL221051504035 Ref C: 2024-04-30T05:15:23Z" ], + "Date": [ "Tue, 30 Apr 2024 05:15:25 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "375" ], + "Content-Length": [ "377" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusAuthorizationRule.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusAuthorizationRule.Tests.ps1 index ac2e118cce57..00fc8e5902ab 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusAuthorizationRule.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusAuthorizationRule.Tests.ps1 @@ -25,7 +25,7 @@ Describe 'Get-AzServiceBusAuthorizationRule' { $namespaceAuthRule.Rights.Count | Should -Be 3 $listOfAuthRules = Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace - $listOfAuthRules.Count | Should -Be 3 + $listOfAuthRules.Count | Should -Be 4 } It 'GetExpandedQueue' { @@ -34,7 +34,7 @@ Describe 'Get-AzServiceBusAuthorizationRule' { $queueAuthRule.Rights.Count | Should -Be 3 $listOfAuthRules = Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -QueueName queue1 - $listOfAuthRules.Count | Should -Be 2 + $listOfAuthRules.Count | Should -Be 3 } It 'GetExpandedTopic' { @@ -43,7 +43,7 @@ Describe 'Get-AzServiceBusAuthorizationRule' { $topicAuthRule.Rights.Count | Should -Be 3 $listOfAuthRules = Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 - $listOfAuthRules.Count | Should -Be 2 + $listOfAuthRules.Count | Should -Be 3 } It 'GetViaIdentityExpanded' { diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusKey.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusKey.Recording.json index bd832649fb6f..7889787a2cf9 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusKey.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusKey.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzServiceBusKey+[NoContext]+GetExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1/listKeys?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusKey+[NoContext]+GetExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1/listKeys?api-version=2022-10-01-preview+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1/listKeys?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1/listKeys?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "34" ], - "x-ms-client-request-id": [ "33c533ce-0b4f-4c09-96b4-3cd4b886138c" ], + "x-ms-unique-id": [ "31" ], + "x-ms-client-request-id": [ "35432087-771c-44b0-aeac-407f9701781b" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceKey_List" ], "FullCommandName": [ "Get-AzServiceBusNamespaceKey_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,37 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-request-id": [ "3a120513-ff25-4520-b33d-525e82412bf0" ], - "x-ms-correlation-request-id": [ "3a120513-ff25-4520-b33d-525e82412bf0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131448Z:3a120513-ff25-4520-b33d-525e82412bf0" ], + "x-ms-correlation-request-id": [ "53779213-ef7c-486b-a45f-4d1ad364aa27" ], + "x-ms-client-request-id": [ "35432087-771c-44b0-aeac-407f9701781b_RP" ], + "x-ms-messaging-activity-id": [ "2bcbfd53-0289-4a00-8ce7-f193131c2cdd" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T05:15:55" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "53779213-ef7c-486b-a45f-4d1ad364aa27" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051555Z:53779213-ef7c-486b-a45f-4d1ad364aa27" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:48 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6D1B1133E6954A2B956CD361A481BB6F Ref B: SEL221051504035 Ref C: 2024-04-30T05:15:53Z" ], + "Date": [ "Tue, 30 Apr 2024 05:15:55 GMT" ] }, "ContentHeaders": { "Content-Length": [ "528" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=x6oIGJ4kG+21Tg8d8Q68Hz3nnygn5ebHy+ASbCB3YvE=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=XVfSwAW8/2zZ0gMmpeE5sRx3ern/rKCv7+ASbGdJ0is=\",\"primaryKey\":\"x6oIGJ4kG+21Tg8d8Q68Hz3nnygn5ebHy+ASbCB3YvE=\",\"secondaryKey\":\"XVfSwAW8/2zZ0gMmpeE5sRx3ern/rKCv7+ASbGdJ0is=\",\"keyName\":\"namespaceAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=KvozQe/8xX2EZwk1Cz844VOcsVqfeN0YH+ASbFHvObI=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=6dkAPQE1hphI851Z5NK4h96TybT+gTPio+ASbACZH14=\",\"primaryKey\":\"KvozQe/8xX2EZwk1Cz844VOcsVqfeN0YH+ASbFHvObI=\",\"secondaryKey\":\"6dkAPQE1hphI851Z5NK4h96TybT+gTPio+ASbACZH14=\",\"keyName\":\"namespaceAuthRule1\"}", "isContentBase64": false } }, - "Get-AzServiceBusKey+[NoContext]+GetExpandedQueue+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1/ListKeys?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusKey+[NoContext]+GetExpandedQueue+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1/ListKeys?api-version=2022-10-01-preview+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1/ListKeys?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1/ListKeys?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "35" ], - "x-ms-client-request-id": [ "9d02995b-6a2c-4071-b5c9-fc75b7a6b301" ], + "x-ms-unique-id": [ "32" ], + "x-ms-client-request-id": [ "aceba89e-cf62-4a17-af31-e99c08485d1b" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusQueueKey_List" ], "FullCommandName": [ "Get-AzServiceBusQueueKey_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -63,37 +68,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-request-id": [ "d5fbe21e-7823-44af-8afd-22da607f1ddd" ], - "x-ms-correlation-request-id": [ "d5fbe21e-7823-44af-8afd-22da607f1ddd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131449Z:d5fbe21e-7823-44af-8afd-22da607f1ddd" ], + "x-ms-correlation-request-id": [ "6f85201a-5625-4b0b-9cb4-e50fbb376880" ], + "x-ms-client-request-id": [ "aceba89e-cf62-4a17-af31-e99c08485d1b_RP" ], + "x-ms-messaging-activity-id": [ "790f8052-56a0-4822-9433-42c804512a32" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T05:15:57" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "6f85201a-5625-4b0b-9cb4-e50fbb376880" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051557Z:6f85201a-5625-4b0b-9cb4-e50fbb376880" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:49 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B14E50C7D15C4F7C9EAFF865C8B65A27 Ref B: SEL221051504035 Ref C: 2024-04-30T05:15:55Z" ], + "Date": [ "Tue, 30 Apr 2024 05:15:56 GMT" ] }, "ContentHeaders": { "Content-Length": [ "552" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=TuGK3T3dv9NQC1Ga7KezLgzpV5x/3NCRs+ASbNm52ok=;EntityPath=queue1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=jzpzNASrPw8MizwCbMpQLXBEbFaTGgyjo+ASbI+BS5c=;EntityPath=queue1\",\"primaryKey\":\"TuGK3T3dv9NQC1Ga7KezLgzpV5x/3NCRs+ASbNm52ok=\",\"secondaryKey\":\"jzpzNASrPw8MizwCbMpQLXBEbFaTGgyjo+ASbI+BS5c=\",\"keyName\":\"queueAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=aBRueSXKnb7h0bQ2nL8XyXxPtrX2IDRAR+ASbArnvSg=;EntityPath=queue1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=QxWXHNqZqpE2JNQPm6CL7rerm8KSGsTL9+ASbPJD/sc=;EntityPath=queue1\",\"primaryKey\":\"aBRueSXKnb7h0bQ2nL8XyXxPtrX2IDRAR+ASbArnvSg=\",\"secondaryKey\":\"QxWXHNqZqpE2JNQPm6CL7rerm8KSGsTL9+ASbPJD/sc=\",\"keyName\":\"queueAuthRule1\"}", "isContentBase64": false } }, - "Get-AzServiceBusKey+[NoContext]+GetExpandedTopic+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1/ListKeys?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusKey+[NoContext]+GetExpandedTopic+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1/ListKeys?api-version=2022-10-01-preview+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1/ListKeys?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1/ListKeys?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "36" ], - "x-ms-client-request-id": [ "c5460c54-74c8-4d8d-8b9b-7c7f62b81c2d" ], + "x-ms-unique-id": [ "33" ], + "x-ms-client-request-id": [ "01c47818-7b16-4a40-9d6a-6ef5ef20415e" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusTopicKey_List" ], "FullCommandName": [ "Get-AzServiceBusTopicKey_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -104,21 +114,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], - "x-ms-request-id": [ "58bdf0b3-4b08-4591-b74c-7e486f4295fc" ], - "x-ms-correlation-request-id": [ "58bdf0b3-4b08-4591-b74c-7e486f4295fc" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131450Z:58bdf0b3-4b08-4591-b74c-7e486f4295fc" ], + "x-ms-correlation-request-id": [ "f65fe2ec-d324-49c1-a800-8a4c3d1c49d5" ], + "x-ms-client-request-id": [ "01c47818-7b16-4a40-9d6a-6ef5ef20415e_RP" ], + "x-ms-messaging-activity-id": [ "d41596bc-340a-42c4-98a9-0cde23c72954" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T05:15:59" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "f65fe2ec-d324-49c1-a800-8a4c3d1c49d5" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051559Z:f65fe2ec-d324-49c1-a800-8a4c3d1c49d5" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:14:50 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DA4BAFB8184E47E9998B750F70A6B313 Ref B: SEL221051504035 Ref C: 2024-04-30T05:15:57Z" ], + "Date": [ "Tue, 30 Apr 2024 05:15:59 GMT" ] }, "ContentHeaders": { "Content-Length": [ "552" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=f33rSyiL7n/z1Z6G+y3HdBjHEXVeZAboF+ASbHaw1ug=;EntityPath=topic1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=mpNbl3j14kx4+D5cH636PArtxDhUG6iNP+ASbP/FPQk=;EntityPath=topic1\",\"primaryKey\":\"f33rSyiL7n/z1Z6G+y3HdBjHEXVeZAboF+ASbHaw1ug=\",\"secondaryKey\":\"mpNbl3j14kx4+D5cH636PArtxDhUG6iNP+ASbP/FPQk=\",\"keyName\":\"topicAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=BmOBGX0/5mZ8fkWwefjO83mHWktV6GljU+ASbAw57Nk=;EntityPath=topic1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=kX0eNC21jNPirto1pp89dkzXJwgvkIgzF+ASbPQ95L0=;EntityPath=topic1\",\"primaryKey\":\"BmOBGX0/5mZ8fkWwefjO83mHWktV6GljU+ASbAw57Nk=\",\"secondaryKey\":\"kX0eNC21jNPirto1pp89dkzXJwgvkIgzF+ASbPQ95L0=\",\"keyName\":\"topicAuthRule1\"}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusNamespaceV2.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusNamespaceV2.Recording.json index a31690329729..e6cad2f16f94 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusNamespaceV2.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusNamespaceV2.Recording.json @@ -6,12 +6,12 @@ "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "37" ], - "x-ms-client-request-id": [ "eb273a78-a759-411c-b078-40e1fd0b5f30" ], + "x-ms-unique-id": [ "34" ], + "x-ms-client-request-id": [ "7df680d6-9cd6-4804-b9ee-1e9f6bf2c6ec" ], "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_List" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,82 +22,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-inline-count": [ "" ], - "x-ms-request-id": [ "8219e828-cf68-4f22-8c2f-75a996cd933d_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11939" ], - "x-ms-correlation-request-id": [ "46bf4ad8-9186-4d3d-8dab-07d5b857f776" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131517Z:46bf4ad8-9186-4d3d-8dab-07d5b857f776" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:15:16 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "79959" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"value\":[{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/v-carrue-powershelltest/providers/Microsoft.ServiceBus/namespaces/v-carrue-ns1\",\"name\":\"v-carrue-ns1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:v-carrue-ns1\",\"createdAt\":\"2021-04-08T23:48:28.973Z\",\"updatedAt\":\"2021-04-08T23:49:11.203Z\",\"serviceBusEndpoint\":\"https://v-carrue-ns1.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/suparame-rg/providers/Microsoft.ServiceBus/namespaces/SuparameSbusTest\",\"name\":\"SuparameSbusTest\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:suparamesbustest\",\"createdAt\":\"2021-06-01T19:19:37.613Z\",\"updatedAt\":\"2021-06-01T19:20:20.14Z\",\"serviceBusEndpoint\":\"https://SuparameSbusTest.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/SB-Intern2021ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sophia-explore\",\"name\":\"sophia-explore\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sophia-explore\",\"createdAt\":\"2021-06-15T21:30:00.227Z\",\"updatedAt\":\"2021-06-15T21:30:41.93Z\",\"serviceBusEndpoint\":\"https://sophia-explore.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/dorothytest/providers/Microsoft.ServiceBus/namespaces/standardnewapi\",\"name\":\"standardnewapi\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:standardnewapi\",\"createdAt\":\"2021-07-12T17:45:32.617Z\",\"updatedAt\":\"2021-07-12T17:46:16.403Z\",\"serviceBusEndpoint\":\"https://standardnewapi.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Ardsouza-MoveTest-WestEurope-Source-1/providers/Microsoft.ServiceBus/namespaces/spsbusns08043\",\"name\":\"spsbusns08043\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:spsbusns08043\",\"createdAt\":\"2021-08-04T22:07:17.28Z\",\"updatedAt\":\"2021-08-04T22:08:01.633Z\",\"serviceBusEndpoint\":\"https://spsbusns08043.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.ServiceBus/namespaces/TestSBPrim0901\",\"name\":\"TestSBPrim0901\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Central US EUAP\",\"tags\":{},\"identity\":{\"principalId\":\"6b33d086-ffbd-4ccb-8b66-40ab9405cb6a\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testsbprim0901\",\"createdAt\":\"2021-09-02T01:02:44.753Z\",\"updatedAt\":\"2023-02-15T19:40:14.5Z\",\"serviceBusEndpoint\":\"https://TestSBPrim0901.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.ServiceBus/namespaces/TestSBPremSec0901\",\"name\":\"TestSBPremSec0901\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testsbpremsec0901\",\"createdAt\":\"2021-09-02T01:10:50.98Z\",\"updatedAt\":\"2023-02-15T19:41:27.563Z\",\"serviceBusEndpoint\":\"https://TestSBPremSec0901.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-5506\",\"name\":\"sdk-Namespace-5506\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West Central US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-5506\",\"createdAt\":\"2021-09-22T21:15:19.707Z\",\"updatedAt\":\"2021-09-22T21:24:59.14Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-5506.servicebus.windows.net:443/\",\"status\":\"Active\",\"alternateName\":\"sdk-PostMigration-5506\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_networkwrj55aatxlgxucsba6igeidap7hqov64fz6i6fhkxg2q66tsychlm5im/providers/Microsoft.ServiceBus/namespaces/servicebus-nsclidurp\",\"name\":\"servicebus-nsclidurp\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{\"{tag1\":\"value1}\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-nsclidurp\",\"createdAt\":\"2021-09-30T00:42:42.94Z\",\"updatedAt\":\"2021-09-30T00:43:27.07Z\",\"serviceBusEndpoint\":\"https://servicebus-nsclidurp.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_networkb6dybi7i77qadmwp3x7qn4fsvzex5svqgkd23ljbqqekhpuqpewxl5ox/providers/Microsoft.ServiceBus/namespaces/servicebus-nsclimdvj\",\"name\":\"servicebus-nsclimdvj\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{\"{tag1\":\"value1}\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-nsclimdvj\",\"createdAt\":\"2021-09-30T01:41:09.41Z\",\"updatedAt\":\"2021-09-30T01:41:52.31Z\",\"serviceBusEndpoint\":\"https://servicebus-nsclimdvj.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_networkteenbwgqgyyl2y6iy7uyajvcvzeffcawclhjplzvgypwqep53ptcz56k/providers/Microsoft.ServiceBus/namespaces/servicebus-nscligk4i\",\"name\":\"servicebus-nscligk4i\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{\"{tag1\":\"value1}\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-nscligk4i\",\"createdAt\":\"2021-09-30T02:07:26.58Z\",\"updatedAt\":\"2021-09-30T02:08:08.96Z\",\"serviceBusEndpoint\":\"https://servicebus-nscligk4i.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7912\",\"name\":\"sdk-Namespace-7912\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West Central US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-7912\",\"createdAt\":\"2021-10-25T10:43:06.873Z\",\"updatedAt\":\"2021-10-25T11:35:04.843Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-7912.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6064\",\"name\":\"sdk-Namespace-6064\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West Central US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-6064\",\"createdAt\":\"2021-10-25T11:28:25.843Z\",\"updatedAt\":\"2021-10-25T11:35:10.567Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-6064.servicebus.windows.net:443/\",\"status\":\"Active\",\"alternateName\":\"sdk-PostMigration-4665\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/dorothytest/providers/Microsoft.ServiceBus/namespaces/standardregressiontest\",\"name\":\"standardregressiontest\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:standardregressiontest\",\"createdAt\":\"2021-11-02T05:22:12.01Z\",\"updatedAt\":\"2021-11-02T05:22:56.543Z\",\"serviceBusEndpoint\":\"https://standardregressiontest.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-synthetics/providers/Microsoft.ServiceBus/namespaces/synthetics-sb-ns\",\"name\":\"synthetics-sb-ns\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{\"jms-for\":\"cache\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:synthetics-sb-ns\",\"createdAt\":\"2022-01-26T21:42:54.873Z\",\"updatedAt\":\"2022-07-08T18:29:09.99Z\",\"serviceBusEndpoint\":\"https://synthetics-sb-ns.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-EASTUS2EUAP/providers/Microsoft.ServiceBus/namespaces/sbprem-perf-cbn-ns-1\",\"name\":\"sbprem-perf-cbn-ns-1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"EAST US 2 EUAP\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Failed\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sbprem-perf-cbn-ns-1\",\"createdAt\":\"2022-01-31T23:43:38.71Z\",\"updatedAt\":\"2022-06-01T21:49:33.537Z\",\"serviceBusEndpoint\":\"https://sbprem-perf-cbn-ns-1.servicebus.windows.net:443/\",\"status\":\"Activating\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-eldert-pg/providers/Microsoft.ServiceBus/namespaces/sb-eldert-pg\",\"name\":\"sb-eldert-pg\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-eldert-pg\",\"createdAt\":\"2022-02-09T22:18:45.293Z\",\"updatedAt\":\"2022-04-04T02:57:41.057Z\",\"serviceBusEndpoint\":\"https://sb-eldert-pg.servicebus.windows.net:443/\",\"status\":\"Active\",\"alternateName\":\"sb-eldert-pg-standard\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps8383/providers/Microsoft.ServiceBus/namespaces/ServiceBus-STDNamespace-8049\",\"name\":\"ServiceBus-STDNamespace-8049\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-stdnamespace-8049\",\"createdAt\":\"2022-02-16T14:59:22.237Z\",\"updatedAt\":\"2022-02-16T15:06:07.67Z\",\"serviceBusEndpoint\":\"https://ServiceBus-STDNamespace-8049.servicebus.windows.net:443/\",\"status\":\"Active\",\"alternateName\":\"PostMigration-Name-3646\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps8383/providers/Microsoft.ServiceBus/namespaces/ServiceBus-PRENamespace-8744\",\"name\":\"ServiceBus-PRENamespace-8744\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-prenamespace-8744\",\"createdAt\":\"2022-02-16T15:00:30.94Z\",\"updatedAt\":\"2022-02-16T15:05:57.88Z\",\"serviceBusEndpoint\":\"https://ServiceBus-PRENamespace-8744.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_aliast2seb6uiraga2np5lweiufaxq64glozljlzhjhj3fcla4zct3swtvszahw/providers/Microsoft.ServiceBus/namespaces/sb-nscli4sweuzamk5wa\",\"name\":\"sb-nscli4sweuzamk5wa\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-nscli4sweuzamk5wa\",\"createdAt\":\"2022-02-22T04:06:39.203Z\",\"updatedAt\":\"2022-02-22T04:11:45.95Z\",\"serviceBusEndpoint\":\"https://sb-nscli4sweuzamk5wa.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_aliast2seb6uiraga2np5lweiufaxq64glozljlzhjhj3fcla4zct3swtvszahw/providers/Microsoft.ServiceBus/namespaces/sb-nsclitm6qtnps6jqu\",\"name\":\"sb-nsclitm6qtnps6jqu\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Central US\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-nsclitm6qtnps6jqu\",\"createdAt\":\"2022-02-22T04:08:21.133Z\",\"updatedAt\":\"2022-02-22T04:11:48.73Z\",\"serviceBusEndpoint\":\"https://sb-nsclitm6qtnps6jqu.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-minimum-tls-sample/providers/Microsoft.ServiceBus/namespaces/sb-minimum-tls-sample\",\"name\":\"sb-minimum-tls-sample\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{\"Owner\":\"Eldert Grootenboer\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-minimum-tls-sample\",\"createdAt\":\"2022-03-21T17:30:32.467Z\",\"updatedAt\":\"2022-03-21T17:31:16.66Z\",\"serviceBusEndpoint\":\"https://sb-minimum-tls-sample.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/spsbusrg/providers/Microsoft.ServiceBus/namespaces/spsbusns0412\",\"name\":\"spsbusns0412\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:spsbusns0412\",\"createdAt\":\"2022-04-12T21:39:51.047Z\",\"updatedAt\":\"2022-04-12T21:40:35.39Z\",\"serviceBusEndpoint\":\"https://spsbusns0412.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-EASTUS2EUAP/providers/Microsoft.ServiceBus/namespaces/vijayperftest2\",\"name\":\"vijayperftest2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"EAST US 2 EUAP\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Failed\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:vijayperftest2\",\"createdAt\":\"2022-04-14T22:48:57.633Z\",\"updatedAt\":\"2022-06-01T21:49:33.53Z\",\"serviceBusEndpoint\":\"https://vijayperftest2.servicebus.windows.net:443/\",\"status\":\"Activating\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-eldert-empower-your-azure-iac-with-bicep/providers/Microsoft.ServiceBus/namespaces/contoso-service-bus\",\"name\":\"contoso-service-bus\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:contoso-service-bus\",\"createdAt\":\"2022-04-15T21:10:11.32Z\",\"updatedAt\":\"2022-04-15T21:10:54.23Z\",\"serviceBusEndpoint\":\"https://contoso-service-bus.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/TestingSDK20220101/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7033\",\"name\":\"sdk-Namespace-7033\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Australia East\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-7033\",\"createdAt\":\"2022-04-21T22:01:13.913Z\",\"updatedAt\":\"2022-04-21T22:01:58.623Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-7033.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/TestingSDK20220101/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-5025\",\"name\":\"sdk-Namespace-5025\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Australia East\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-5025\",\"createdAt\":\"2022-04-21T22:16:39.923Z\",\"updatedAt\":\"2022-04-21T22:17:25.36Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-5025.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jagstest/providers/Microsoft.ServiceBus/namespaces/jagsPMmintls\",\"name\":\"jagsPMmintls\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:jagspmmintls\",\"createdAt\":\"2022-04-27T18:09:53.973Z\",\"updatedAt\":\"2022-04-27T18:30:41.993Z\",\"serviceBusEndpoint\":\"https://jagsPMmintls.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-EASTUS2EUAP/providers/Microsoft.ServiceBus/namespaces/vijayperftest7\",\"name\":\"vijayperftest7\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"EAST US 2 EUAP\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Failed\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:vijayperftest7\",\"createdAt\":\"2022-04-28T00:22:48.597Z\",\"updatedAt\":\"2022-06-01T21:49:33.53Z\",\"serviceBusEndpoint\":\"https://vijayperftest7.servicebus.windows.net:443/\",\"status\":\"Activating\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/spsbusrg/providers/Microsoft.ServiceBus/namespaces/sptlsns0510\",\"name\":\"sptlsns0510\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sptlsns0510\",\"createdAt\":\"2022-05-10T18:37:45.837Z\",\"updatedAt\":\"2022-05-10T18:38:29.23Z\",\"serviceBusEndpoint\":\"https://sptlsns0510.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_privateyh52pynvfafabynpghrgrtmgx3cg2exbaafx6a3dlwhxxnwvnuredxr4/providers/Microsoft.ServiceBus/namespaces/servicebus-nsclifr66\",\"name\":\"servicebus-nsclifr66\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{\"{tag1\":\"value1}\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/namespaces/privateEndpointConnections/a8c89231-6cd1-47a5-98ac-87e51283ef43\",\"name\":\"a8c89231-6cd1-47a5-98ac-87e51283ef43\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_privateyh52pynvfafabynpghrgrtmgx3cg2exbaafx6a3dlwhxxnwvnuredxr4/providers/Microsoft.Network/privateEndpoints/cli-pe-ay4qn7os5r3w3j4yw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}],\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-nsclifr66\",\"createdAt\":\"2022-05-13T17:11:57.133Z\",\"updatedAt\":\"2022-05-13T17:13:15.163Z\",\"serviceBusEndpoint\":\"https://servicebus-nsclifr66.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":4},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/spsbusrg/providers/Microsoft.ServiceBus/namespaces/spsbuspremns0516\",\"name\":\"spsbuspremns0516\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:spsbuspremns0516\",\"createdAt\":\"2022-05-16T19:10:24.013Z\",\"updatedAt\":\"2023-02-19T11:00:43.797Z\",\"serviceBusEndpoint\":\"https://spsbuspremns0516.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/spsbuspremrgimport/providers/Microsoft.ServiceBus/namespaces/spsbuspremnsimport0516\",\"name\":\"spsbuspremnsimport0516\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:spsbuspremnsimport0516\",\"createdAt\":\"2022-05-16T20:03:33.607Z\",\"updatedAt\":\"2022-05-16T20:04:46.26Z\",\"serviceBusEndpoint\":\"https://spsbuspremnsimport0516.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":4},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/spsbuspremimportrg2/providers/Microsoft.ServiceBus/namespaces/spsbuspremnsimport05162\",\"name\":\"spsbuspremnsimport05162\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:spsbuspremnsimport05162\",\"createdAt\":\"2022-05-16T20:09:18.567Z\",\"updatedAt\":\"2023-02-19T11:01:09.187Z\",\"serviceBusEndpoint\":\"https://spsbuspremnsimport05162.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/spsbusarmrg0516/providers/Microsoft.ServiceBus/namespaces/spsbusarmns0516\",\"name\":\"spsbusarmns0516\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:spsbusarmns0516\",\"createdAt\":\"2022-05-17T01:21:33.28Z\",\"updatedAt\":\"2023-02-19T11:01:05.7Z\",\"serviceBusEndpoint\":\"https://spsbusarmns0516.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-eldert-implementing-an-event-sourcing-strategy-on-azure/providers/Microsoft.ServiceBus/namespaces/sb-implementing-event-sourcing-strategy\",\"name\":\"sb-implementing-event-sourcing-strategy\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-implementing-event-sourcing-strategy\",\"createdAt\":\"2022-05-27T00:56:33.893Z\",\"updatedAt\":\"2022-12-06T18:15:02.64Z\",\"serviceBusEndpoint\":\"https://sb-implementing-event-sourcing-strategy.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-eldert-pg/providers/Microsoft.ServiceBus/namespaces/sb-eldert-premium-pg\",\"name\":\"sb-eldert-premium-pg\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/namespaces/privateEndpointConnections/649fe754-3fdf-4d43-a672-c90dd9045e0a\",\"name\":\"649fe754-3fdf-4d43-a672-c90dd9045e0a\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"West US 2\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-eldert-pg/providers/Microsoft.Network/privateEndpoints/pe-eldert-pg\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Auto-Approved\"},\"groupIds\":[\"namespace\"]}}],\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-eldert-premium-pg\",\"createdAt\":\"2022-05-31T22:20:50.39Z\",\"updatedAt\":\"2022-10-14T20:48:17.98Z\",\"serviceBusEndpoint\":\"https://sb-eldert-premium-pg.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.ServiceBus/namespaces/geodrbackup\",\"name\":\"geodrbackup\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:geodrbackup\",\"createdAt\":\"2022-06-03T10:07:15.727Z\",\"updatedAt\":\"2022-06-10T08:03:55.733Z\",\"serviceBusEndpoint\":\"https://geodrbackup.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-8587\",\"name\":\"sdk-Namespace-8587\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-8587\",\"createdAt\":\"2022-06-08T13:09:22.407Z\",\"updatedAt\":\"2022-06-08T13:27:13.71Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-8587.servicebus.windows.net:443/\",\"status\":\"Disabled\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGTestingCreateCluster/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6837\",\"name\":\"sdk-Namespace-6837\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-6837\",\"createdAt\":\"2022-06-08T13:31:34.743Z\",\"updatedAt\":\"2022-06-08T13:33:16.23Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-6837.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/DefaultResourceGroup-EUS2/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-8810\",\"name\":\"sdk-Namespace-8810\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US 2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-8810\",\"createdAt\":\"2022-06-08T13:32:47.733Z\",\"updatedAt\":\"2022-06-08T13:34:01.107Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-8810.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGTestingCreateCluster/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-4456\",\"name\":\"sdk-Namespace-4456\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-4456\",\"createdAt\":\"2022-06-08T13:36:30.017Z\",\"updatedAt\":\"2022-06-08T13:49:53.697Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-4456.servicebus.windows.net:443/\",\"status\":\"Active\",\"alternateName\":\"sdk-DisasterRecovery8645\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGTestingCreateCluster/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-4885\",\"name\":\"sdk-Namespace-4885\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Central US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-4885\",\"createdAt\":\"2022-06-08T13:38:15.643Z\",\"updatedAt\":\"2022-06-08T13:51:26.41Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-4885.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/DefaultResourceGroup-EUS2/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9022\",\"name\":\"sdk-Namespace-9022\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US 2\",\"tags\":{\"tag3\":\"value3\",\"tag4\":\"value4\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-9022\",\"createdAt\":\"2022-06-08T13:54:41.563Z\",\"updatedAt\":\"2022-06-08T13:56:31.21Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-9022.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.ServiceBus/namespaces/geodrsec\",\"name\":\"geodrsec\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:geodrsec\",\"createdAt\":\"2022-06-10T06:30:54.383Z\",\"updatedAt\":\"2022-06-10T08:03:57.317Z\",\"serviceBusEndpoint\":\"https://geodrsec.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/spsbusrg/providers/Microsoft.ServiceBus/namespaces/contoso-service-bus-ns\",\"name\":\"contoso-service-bus-ns\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:contoso-service-bus-ns\",\"createdAt\":\"2022-06-14T20:02:39.237Z\",\"updatedAt\":\"2022-06-14T20:03:22.84Z\",\"serviceBusEndpoint\":\"https://contoso-service-bus-ns.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/spsbusrg/providers/Microsoft.ServiceBus/namespaces/spsbusns0617\",\"name\":\"spsbusns0617\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:spsbusns0617\",\"createdAt\":\"2022-06-17T15:16:10.293Z\",\"updatedAt\":\"2022-06-17T15:16:54.407Z\",\"serviceBusEndpoint\":\"https://spsbusns0617.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGTestingCreateCluster/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-8755\",\"name\":\"sdk-Namespace-8755\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-8755\",\"createdAt\":\"2022-06-20T08:01:50.84Z\",\"updatedAt\":\"2022-06-20T08:19:28.517Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-8755.servicebus.windows.net:443/\",\"status\":\"Active\",\"alternateName\":\"sdk-DisasterRecovery5454\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGTestingCreateCluster/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9515\",\"name\":\"sdk-Namespace-9515\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Central US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-9515\",\"createdAt\":\"2022-06-20T08:03:37.943Z\",\"updatedAt\":\"2022-06-20T08:21:57.427Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-9515.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-356\",\"name\":\"sdk-Namespace-356\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West Central US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-356\",\"createdAt\":\"2022-06-20T10:17:56.817Z\",\"updatedAt\":\"2022-06-20T10:24:54.94Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-356.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7844\",\"name\":\"sdk-Namespace-7844\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-7844\",\"createdAt\":\"2022-06-20T10:20:07.663Z\",\"updatedAt\":\"2022-06-20T10:24:51.11Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-7844.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7080\",\"name\":\"sdk-Namespace-7080\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West Central US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-7080\",\"createdAt\":\"2022-06-20T10:25:57.817Z\",\"updatedAt\":\"2022-06-20T10:34:17.16Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-7080.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-8820\",\"name\":\"sdk-Namespace-8820\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-8820\",\"createdAt\":\"2022-06-20T10:28:08.497Z\",\"updatedAt\":\"2022-06-20T10:31:58.61Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-8820.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-8391\",\"name\":\"sdk-Namespace-8391\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West Central US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-8391\",\"createdAt\":\"2022-06-20T15:21:25.033Z\",\"updatedAt\":\"2022-06-20T15:38:16.48Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-8391.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7648\",\"name\":\"sdk-Namespace-7648\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-7648\",\"createdAt\":\"2022-06-20T15:23:34.99Z\",\"updatedAt\":\"2022-06-20T15:37:49.787Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-7648.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6665\",\"name\":\"sdk-Namespace-6665\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West Central US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-6665\",\"createdAt\":\"2022-06-20T15:35:25.98Z\",\"updatedAt\":\"2022-06-20T15:49:36.68Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-6665.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-4813\",\"name\":\"sdk-Namespace-4813\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-4813\",\"createdAt\":\"2022-06-20T15:38:10.15Z\",\"updatedAt\":\"2022-06-20T15:54:02.917Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-4813.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testvinsusbrg621/providers/Microsoft.ServiceBus/namespaces/testvinsustns621\",\"name\":\"testvinsustns621\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testvinsustns621\",\"createdAt\":\"2022-06-21T17:52:08.463Z\",\"updatedAt\":\"2022-06-21T17:52:51.333Z\",\"serviceBusEndpoint\":\"https://testvinsustns621.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/DefaultResourceGroup-EUS2/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7743\",\"name\":\"sdk-Namespace-7743\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US 2\",\"tags\":{\"tag3\":\"value3\",\"tag4\":\"value4\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-7743\",\"createdAt\":\"2022-06-22T05:36:47.6Z\",\"updatedAt\":\"2022-06-22T05:38:36.483Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-7743.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps7874/providers/Microsoft.ServiceBus/namespaces/ServiceBus-STDNamespace-81\",\"name\":\"ServiceBus-STDNamespace-81\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-stdnamespace-81\",\"createdAt\":\"2022-06-25T16:29:39.377Z\",\"updatedAt\":\"2022-06-25T16:30:23.5Z\",\"serviceBusEndpoint\":\"https://ServiceBus-STDNamespace-81.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps7874/providers/Microsoft.ServiceBus/namespaces/ServiceBus-PRENamespace-5412\",\"name\":\"ServiceBus-PRENamespace-5412\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-prenamespace-5412\",\"createdAt\":\"2022-06-25T16:30:48.453Z\",\"updatedAt\":\"2022-06-25T16:32:07.38Z\",\"serviceBusEndpoint\":\"https://ServiceBus-PRENamespace-5412.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGName-5648/providers/Microsoft.ServiceBus/namespaces/Namespace1-1879\",\"name\":\"Namespace1-1879\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US 2\",\"tags\":{\"Tag1\":\"Tag1Value\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace1-1879\",\"createdAt\":\"2022-06-25T18:02:09.607Z\",\"updatedAt\":\"2022-06-25T18:02:53.07Z\",\"serviceBusEndpoint\":\"https://Namespace1-1879.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps7723/providers/Microsoft.ServiceBus/namespaces/ServiceBus-Namespace-9941\",\"name\":\"ServiceBus-Namespace-9941\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-namespace-9941\",\"createdAt\":\"2022-06-27T05:30:19.03Z\",\"updatedAt\":\"2022-06-27T05:35:38.073Z\",\"serviceBusEndpoint\":\"https://ServiceBus-Namespace-9941.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps7723/providers/Microsoft.ServiceBus/namespaces/ServiceBus-Namespace-6576\",\"name\":\"ServiceBus-Namespace-6576\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-namespace-6576\",\"createdAt\":\"2022-06-27T05:32:01.23Z\",\"updatedAt\":\"2022-06-27T05:35:33.557Z\",\"serviceBusEndpoint\":\"https://ServiceBus-Namespace-6576.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/geguirgu/providers/Microsoft.ServiceBus/namespaces/geguirgu-servicebus\",\"name\":\"geguirgu-servicebus\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:geguirgu-servicebus\",\"createdAt\":\"2022-06-28T17:31:06.9Z\",\"updatedAt\":\"2022-06-28T17:31:50.843Z\",\"serviceBusEndpoint\":\"https://geguirgu-servicebus.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":4},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testvinsu718/providers/Microsoft.ServiceBus/namespaces/testsbPremvinsu1\",\"name\":\"testsbPremvinsu1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Central US EUAP\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testsbpremvinsu1\",\"createdAt\":\"2022-07-19T02:44:14.26Z\",\"updatedAt\":\"2023-02-09T00:27:21.637Z\",\"serviceBusEndpoint\":\"https://testsbPremvinsu1.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testservicebusRG-6007/providers/Microsoft.ServiceBus/namespaces/testnamespacemgmt6809\",\"name\":\"testnamespacemgmt6809\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"identity\":{\"principalId\":\"79ab4c89-6a57-4dfd-8334-10adec71cecc\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt6809\",\"createdAt\":\"2022-08-03T12:04:00.99Z\",\"updatedAt\":\"2023-02-03T11:59:08.4Z\",\"serviceBusEndpoint\":\"https://testnamespacemgmt6809.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testservicebusRG-569/providers/Microsoft.ServiceBus/namespaces/testnamespacemgmt1331\",\"name\":\"testnamespacemgmt1331\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt1331\",\"createdAt\":\"2022-08-04T05:27:45.82Z\",\"updatedAt\":\"2022-08-04T05:28:57.907Z\",\"serviceBusEndpoint\":\"https://testnamespacemgmt1331.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testservicebusRG-3931/providers/Microsoft.ServiceBus/namespaces/testnamespacemgmt7504\",\"name\":\"testnamespacemgmt7504\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt7504\",\"createdAt\":\"2022-08-04T05:46:10.67Z\",\"updatedAt\":\"2022-08-04T05:47:23.873Z\",\"serviceBusEndpoint\":\"https://testnamespacemgmt7504.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testservicebusRG-74/providers/Microsoft.ServiceBus/namespaces/testnamespacemgmt1417\",\"name\":\"testnamespacemgmt1417\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt1417\",\"createdAt\":\"2022-08-04T06:02:23.22Z\",\"updatedAt\":\"2022-08-04T06:03:35.823Z\",\"serviceBusEndpoint\":\"https://testnamespacemgmt1417.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testservicebusRG-4710/providers/Microsoft.ServiceBus/namespaces/testnamespacemgmt8453\",\"name\":\"testnamespacemgmt8453\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt8453\",\"createdAt\":\"2022-08-04T08:15:34.403Z\",\"updatedAt\":\"2022-08-04T08:16:39.06Z\",\"serviceBusEndpoint\":\"https://testnamespacemgmt8453.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testservicebusRG-4749/providers/Microsoft.ServiceBus/namespaces/testnamespacemgmt2719\",\"name\":\"testnamespacemgmt2719\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt2719\",\"createdAt\":\"2022-08-04T08:19:34.51Z\",\"updatedAt\":\"2022-08-04T08:20:55.813Z\",\"serviceBusEndpoint\":\"https://testnamespacemgmt2719.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/SDK-ServiceBus-7854/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-8751\",\"name\":\"sdk-Namespace-8751\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Australia East\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-8751\",\"createdAt\":\"2022-08-05T05:24:49.13Z\",\"updatedAt\":\"2022-08-05T05:25:33.72Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-8751.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGTestingCreateCluster/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6005\",\"name\":\"sdk-Namespace-6005\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-6005\",\"createdAt\":\"2022-08-05T05:28:18.517Z\",\"updatedAt\":\"2022-08-05T05:38:11.98Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-6005.servicebus.windows.net:443/\",\"status\":\"Active\",\"alternateName\":\"sdk-DisasterRecovery1518\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGTestingCreateCluster/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9395\",\"name\":\"sdk-Namespace-9395\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Central US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-9395\",\"createdAt\":\"2022-08-05T05:29:56.073Z\",\"updatedAt\":\"2022-08-05T05:39:34.333Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-9395.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-8877\",\"name\":\"sdk-Namespace-8877\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West Central US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-8877\",\"createdAt\":\"2022-08-05T06:42:12.9Z\",\"updatedAt\":\"2022-08-05T06:52:48.643Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-8877.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-818\",\"name\":\"sdk-Namespace-818\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-818\",\"createdAt\":\"2022-08-05T06:44:15.33Z\",\"updatedAt\":\"2022-08-05T06:54:04.78Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-818.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/SDK-ServiceBus-7854/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-8973\",\"name\":\"sdk-Namespace-8973\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Australia East\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-8973\",\"createdAt\":\"2022-08-05T08:05:40.303Z\",\"updatedAt\":\"2022-08-05T08:06:24.6Z\",\"serviceBusEndpoint\":\"https://sdk-Namespace-8973.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps5206/providers/Microsoft.ServiceBus/namespaces/ServiceBus-STDNamespace-6102\",\"name\":\"ServiceBus-STDNamespace-6102\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-stdnamespace-6102\",\"createdAt\":\"2022-08-15T04:47:52.1Z\",\"updatedAt\":\"2022-08-15T04:54:51.313Z\",\"serviceBusEndpoint\":\"https://ServiceBus-STDNamespace-6102.servicebus.windows.net:443/\",\"status\":\"Active\",\"alternateName\":\"PostMigration-Name-8545\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps5206/providers/Microsoft.ServiceBus/namespaces/ServiceBus-PRENamespace-3686\",\"name\":\"ServiceBus-PRENamespace-3686\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-prenamespace-3686\",\"createdAt\":\"2022-08-15T04:48:55.11Z\",\"updatedAt\":\"2022-08-15T04:54:48.803Z\",\"serviceBusEndpoint\":\"https://ServiceBus-PRENamespace-3686.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ServiceBus-DRDrill-August-2022/providers/Microsoft.ServiceBus/namespaces/ServiceBus-DRDrill-August-2022-SB-NonAZ\",\"name\":\"ServiceBus-DRDrill-August-2022-SB-NonAZ\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"EAST US 2 EUAP\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-drdrill-august-2022-sb-nonaz\",\"createdAt\":\"2022-08-15T17:00:54.41Z\",\"updatedAt\":\"2022-08-15T17:02:33.183Z\",\"serviceBusEndpoint\":\"https://ServiceBus-DRDrill-August-2022-SB-NonAZ.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ServiceBus-DRDrill-August-2022/providers/Microsoft.ServiceBus/namespaces/ServiceBus-DRDrill-August-2022-SB-ReallyNonAZ\",\"name\":\"ServiceBus-DRDrill-August-2022-SB-ReallyNonAZ\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"EAST US 2 EUAP\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-drdrill-august-2022-sb-reallynonaz\",\"createdAt\":\"2022-08-15T17:11:52.113Z\",\"updatedAt\":\"2022-08-15T17:38:25.417Z\",\"serviceBusEndpoint\":\"https://ServiceBus-DRDrill-August-2022-SB-ReallyNonAZ.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ServiceBus-DRDrill-August-2022/providers/Microsoft.ServiceBus/namespaces/ServiceBus-DRDrill-August-2022-SB-NonAZ-cuseuap\",\"name\":\"ServiceBus-DRDrill-August-2022-SB-NonAZ-cuseuap\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Central US EUAP\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-drdrill-august-2022-sb-nonaz-cuseuap\",\"createdAt\":\"2022-08-15T17:30:08.67Z\",\"updatedAt\":\"2022-08-15T17:38:19.193Z\",\"serviceBusEndpoint\":\"https://ServiceBus-DRDrill-August-2022-SB-NonAZ-cuseuap.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps51/providers/Microsoft.ServiceBus/namespaces/ServiceBus-STDNamespace-276\",\"name\":\"ServiceBus-STDNamespace-276\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-stdnamespace-276\",\"createdAt\":\"2022-08-16T05:32:29.537Z\",\"updatedAt\":\"2022-08-16T05:39:11.66Z\",\"serviceBusEndpoint\":\"https://ServiceBus-STDNamespace-276.servicebus.windows.net:443/\",\"status\":\"Active\",\"alternateName\":\"PostMigration-Name-9658\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps51/providers/Microsoft.ServiceBus/namespaces/ServiceBus-PRENamespace-9080\",\"name\":\"ServiceBus-PRENamespace-9080\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-prenamespace-9080\",\"createdAt\":\"2022-08-16T05:33:33.527Z\",\"updatedAt\":\"2022-08-16T05:39:09.86Z\",\"serviceBusEndpoint\":\"https://ServiceBus-PRENamespace-9080.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.ServiceBus/namespaces/testPSV2\",\"name\":\"testPSV2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Australia East\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testpsv2\",\"createdAt\":\"2022-08-17T11:12:02.61Z\",\"updatedAt\":\"2022-08-17T12:33:05.387Z\",\"serviceBusEndpoint\":\"https://testPSV2.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.ServiceBus/namespaces/testPSStandard\",\"name\":\"testPSStandard\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testpsstandard\",\"createdAt\":\"2022-08-17T12:29:22.427Z\",\"updatedAt\":\"2022-08-17T12:33:09.81Z\",\"serviceBusEndpoint\":\"https://testPSStandard.servicebus.windows.net:443/\",\"status\":\"Active\",\"alternateName\":\"testSBPostMigrationName\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/dsms-test-rg/providers/Microsoft.ServiceBus/namespaces/dsmstestsb1\",\"name\":\"dsmstestsb1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"EAST US 2 EUAP\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:dsmstestsb1\",\"createdAt\":\"2022-08-22T17:15:28.183Z\",\"updatedAt\":\"2022-08-22T17:16:12.777Z\",\"serviceBusEndpoint\":\"https://dsmstestsb1.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.ServiceBus/namespaces/testingSBTemplate\",\"name\":\"testingSBTemplate\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Australia East\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testingsbtemplate\",\"createdAt\":\"2022-08-28T06:14:15.157Z\",\"updatedAt\":\"2022-09-15T14:55:26.22Z\",\"serviceBusEndpoint\":\"https://testingSBTemplate.servicebus.windows.net:443/\",\"status\":\"Active\",\"alternateName\":\"sbmigratepremium2\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_namespaceu6xvflr4vht7rxff5dlizo3gi665atsiqq2pxzwt4uehtgjmd3dpba/providers/Microsoft.ServiceBus/namespaces/servicebus-nsclieymu\",\"name\":\"servicebus-nsclieymu\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"principalId\":\"68924081-c891-4869-b36f-a21c51e2c344\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-nsclieymu\",\"createdAt\":\"2022-08-29T07:31:14.363Z\",\"updatedAt\":\"2023-01-14T07:26:12.027Z\",\"serviceBusEndpoint\":\"https://servicebus-nsclieymu.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGName-2450/providers/Microsoft.ServiceBus/namespaces/Namespace-9959\",\"name\":\"Namespace-9959\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace-9959\",\"createdAt\":\"2022-09-02T10:43:49.647Z\",\"updatedAt\":\"2022-09-02T10:44:34.66Z\",\"serviceBusEndpoint\":\"https://Namespace-9959.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.ServiceBus/namespaces/sbmigratepremium\",\"name\":\"sbmigratepremium\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sbmigratepremium\",\"createdAt\":\"2022-09-13T05:00:55.647Z\",\"updatedAt\":\"2022-09-15T14:55:22.693Z\",\"serviceBusEndpoint\":\"https://sbmigratepremium.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.ServiceBus/namespaces/testSBARMTemplate\",\"name\":\"testSBARMTemplate\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testsbarmtemplate\",\"createdAt\":\"2022-09-14T09:01:24.307Z\",\"updatedAt\":\"2022-09-14T09:02:09.747Z\",\"serviceBusEndpoint\":\"https://testSBARMTemplate.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/serkant/providers/Microsoft.ServiceBus/namespaces/serkant-sb1\",\"name\":\"serkant-sb1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:serkant-sb1\",\"createdAt\":\"2022-09-14T18:25:04.52Z\",\"updatedAt\":\"2022-09-20T15:11:36.88Z\",\"serviceBusEndpoint\":\"https://serkant-sb1.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PS-Testing/providers/Microsoft.ServiceBus/namespaces/Namespace1-7974\",\"name\":\"Namespace1-7974\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace1-7974\",\"createdAt\":\"2022-09-25T08:01:39.173Z\",\"updatedAt\":\"2022-09-25T08:07:57.013Z\",\"serviceBusEndpoint\":\"https://Namespace1-7974.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PS-Testing/providers/Microsoft.ServiceBus/namespaces/Namespace2-5304\",\"name\":\"Namespace2-5304\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"principalId\":\"acb4ce9b-2730-494d-a18d-a8be0420bdcb\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://ps-test-kv1.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://ps-test-kv1.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace2-5304\",\"createdAt\":\"2022-09-25T08:08:42.127Z\",\"updatedAt\":\"2023-02-10T08:03:15.977Z\",\"serviceBusEndpoint\":\"https://Namespace2-5304.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PS-Testing/providers/Microsoft.ServiceBus/namespaces/Namespace1-6359\",\"name\":\"Namespace1-6359\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PS-Testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PS-Testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://ps-test-kv1.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PS-Testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://ps-test-kv1.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PS-Testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key1\",\"keyVaultUri\":\"https://ps-test-kv2.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PS-Testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace1-6359\",\"createdAt\":\"2022-09-25T08:17:21.787Z\",\"updatedAt\":\"2023-02-03T13:42:07.787Z\",\"serviceBusEndpoint\":\"https://Namespace1-6359.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-eldert-pg-javaone/providers/Microsoft.ServiceBus/namespaces/rg-eldert-pg-javaone-sbus\",\"name\":\"rg-eldert-pg-javaone-sbus\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:rg-eldert-pg-javaone-sbus\",\"createdAt\":\"2022-10-12T22:58:34.72Z\",\"updatedAt\":\"2022-10-12T22:59:48.85Z\",\"serviceBusEndpoint\":\"https://rg-eldert-pg-javaone-sbus.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":4},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-EastUS/providers/Microsoft.ServiceBus/namespaces/Ardsouza-BL-VAZ40001-ScaleSets-2\",\"name\":\"Ardsouza-BL-VAZ40001-ScaleSets-2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-bl-vaz40001-scalesets-2\",\"createdAt\":\"2022-10-13T00:48:44.047Z\",\"updatedAt\":\"2022-10-13T00:50:59.927Z\",\"serviceBusEndpoint\":\"https://Ardsouza-BL-VAZ40001-ScaleSets-2.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":4},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-EastUS/providers/Microsoft.ServiceBus/namespaces/Ardsouza-BL-VAZ40001-ScaleSets-3\",\"name\":\"Ardsouza-BL-VAZ40001-ScaleSets-3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-bl-vaz40001-scalesets-3\",\"createdAt\":\"2022-10-17T20:51:13.547Z\",\"updatedAt\":\"2022-10-17T20:52:50.7Z\",\"serviceBusEndpoint\":\"https://Ardsouza-BL-VAZ40001-ScaleSets-3.servicebus.windows.net:443/\",\"status\":\"Active\"}}],\"nextLink\":\"https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/namespaces?api-version=2022-10-01-preview\u0026$skipToken=2022-10-17T20:51:13.547Z\"}", - "isContentBase64": false - } - }, - "Get-AzServiceBusNamespaceV2+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/namespaces?api-version=2022-10-01-preview\u0026$skipToken=2022-10-17T20:51:13.547Z+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/namespaces?api-version=2022-10-01-preview\u0026$skipToken=2022-10-17T20:51:13.547Z", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "38" ], - "x-ms-client-request-id": [ "eb273a78-a759-411c-b078-40e1fd0b5f30" ], - "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_List" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-inline-count": [ "" ], - "x-ms-request-id": [ "78440f17-b40c-4bc0-8297-24a9866269a6_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11938" ], - "x-ms-correlation-request-id": [ "e022b518-6210-42a7-b530-50565cd28c40" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131518Z:e022b518-6210-42a7-b530-50565cd28c40" ], + "x-ms-original-request-ids": [ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "6c186e56-87a3-4114-a2d5-32681aa291e0" ], + "x-ms-correlation-request-id": [ "6c186e56-87a3-4114-a2d5-32681aa291e0" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051647Z:6c186e56-87a3-4114-a2d5-32681aa291e0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:15:17 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 78F1DB80EE1144B793141881C10E2ACB Ref B: SEL221051504035 Ref C: 2024-04-30T05:16:43Z" ], + "Date": [ "Tue, 30 Apr 2024 05:16:46 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "65725" ], + "Content-Length": [ "160532" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":4},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/VMScaleSetsTesting/providers/Microsoft.ServiceBus/namespaces/ardsouza-eastus-scalesets-10-18-2022\",\"name\":\"ardsouza-eastus-scalesets-10-18-2022\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":4,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-eastus-scalesets-10-18-2022\",\"createdAt\":\"2022-10-18T22:55:27.997Z\",\"updatedAt\":\"2022-10-18T22:57:06.683Z\",\"serviceBusEndpoint\":\"https://ardsouza-eastus-scalesets-10-18-2022.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/suparame-rg/providers/Microsoft.ServiceBus/namespaces/SuparameEventTest\",\"name\":\"SuparameEventTest\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:suparameeventtest\",\"createdAt\":\"2022-10-28T01:30:54.627Z\",\"updatedAt\":\"2022-10-28T01:31:38.127Z\",\"serviceBusEndpoint\":\"https://SuparameEventTest.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/anway/providers/Microsoft.ServiceBus/namespaces/syncprimary\",\"name\":\"syncprimary\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:syncprimary\",\"createdAt\":\"2022-11-09T03:52:04.83Z\",\"updatedAt\":\"2022-12-15T18:02:59.367Z\",\"serviceBusEndpoint\":\"https://syncprimary.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/anway/providers/Microsoft.ServiceBus/namespaces/syncsecondary\",\"name\":\"syncsecondary\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:syncsecondary\",\"createdAt\":\"2022-11-09T03:52:58.013Z\",\"updatedAt\":\"2022-12-15T18:02:57.23Z\",\"serviceBusEndpoint\":\"https://syncsecondary.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/spsbusrg/providers/Microsoft.ServiceBus/namespaces/spsbusns11103\",\"name\":\"spsbusns11103\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:spsbusns11103\",\"createdAt\":\"2022-11-10T23:56:06.953Z\",\"updatedAt\":\"2022-11-10T23:56:50.06Z\",\"serviceBusEndpoint\":\"https://spsbusns11103.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":16},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/bwpoc/providers/Microsoft.ServiceBus/namespaces/bwpocns1\",\"name\":\"bwpocns1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:bwpocns1\",\"createdAt\":\"2022-11-17T02:33:45.87Z\",\"updatedAt\":\"2022-11-17T02:34:59.69Z\",\"serviceBusEndpoint\":\"https://bwpocns1.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":64},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/vijayscalesetsloadtest/providers/Microsoft.ServiceBus/namespaces/bwpocssns2\",\"name\":\"bwpocssns2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":4,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:bwpocssns2\",\"createdAt\":\"2022-11-22T01:15:59.343Z\",\"updatedAt\":\"2022-11-22T02:16:13.67Z\",\"serviceBusEndpoint\":\"https://bwpocssns2.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest4i9zey/providers/Microsoft.ServiceBus/namespaces/secondaryNSe5sqx2\",\"name\":\"secondaryNSe5sqx2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynse5sqx2\",\"createdAt\":\"2022-11-22T16:46:54.59Z\",\"updatedAt\":\"2022-11-22T16:59:12.363Z\",\"serviceBusEndpoint\":\"https://secondaryNSe5sqx2.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest4i9zey/providers/Microsoft.ServiceBus/namespaces/primaryNSg2o85l\",\"name\":\"primaryNSg2o85l\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsg2o85l\",\"createdAt\":\"2022-11-22T16:46:54.713Z\",\"updatedAt\":\"2022-11-22T16:59:12.637Z\",\"serviceBusEndpoint\":\"https://primaryNSg2o85l.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresto859up/providers/Microsoft.ServiceBus/namespaces/primaryNSn6fmhu\",\"name\":\"primaryNSn6fmhu\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsn6fmhu\",\"createdAt\":\"2022-11-22T17:41:18.407Z\",\"updatedAt\":\"2022-11-22T19:02:40.557Z\",\"serviceBusEndpoint\":\"https://primaryNSn6fmhu.servicebus.windows.net:443/\",\"status\":\"Active\",\"alternateName\":\"postMigrationqt7hcd\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresto859up/providers/Microsoft.ServiceBus/namespaces/secondaryNSiqjvmr\",\"name\":\"secondaryNSiqjvmr\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynsiqjvmr\",\"createdAt\":\"2022-11-22T17:41:18.407Z\",\"updatedAt\":\"2022-11-22T19:03:33.6Z\",\"serviceBusEndpoint\":\"https://secondaryNSiqjvmr.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest1lxftd/providers/Microsoft.ServiceBus/namespaces/primaryNSg2skfn\",\"name\":\"primaryNSg2skfn\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsg2skfn\",\"createdAt\":\"2022-11-23T06:44:18.907Z\",\"updatedAt\":\"2022-11-23T06:56:31.8Z\",\"serviceBusEndpoint\":\"https://primaryNSg2skfn.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest1lxftd/providers/Microsoft.ServiceBus/namespaces/secondaryNSud1hb2\",\"name\":\"secondaryNSud1hb2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynsud1hb2\",\"createdAt\":\"2022-11-23T06:44:19.32Z\",\"updatedAt\":\"2022-11-23T06:56:33.823Z\",\"serviceBusEndpoint\":\"https://secondaryNSud1hb2.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestnqpzt9/providers/Microsoft.ServiceBus/namespaces/secondaryNScjqf18\",\"name\":\"secondaryNScjqf18\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynscjqf18\",\"createdAt\":\"2022-11-23T07:44:46.24Z\",\"updatedAt\":\"2022-11-23T07:55:58.033Z\",\"serviceBusEndpoint\":\"https://secondaryNScjqf18.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestnqpzt9/providers/Microsoft.ServiceBus/namespaces/primaryNS3ish9p\",\"name\":\"primaryNS3ish9p\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primaryns3ish9p\",\"createdAt\":\"2022-11-23T07:44:46.317Z\",\"updatedAt\":\"2022-11-23T07:55:59.193Z\",\"serviceBusEndpoint\":\"https://primaryNS3ish9p.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestqb21vp/providers/Microsoft.ServiceBus/namespaces/secondaryNSaj9zhm\",\"name\":\"secondaryNSaj9zhm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynsaj9zhm\",\"createdAt\":\"2022-11-23T08:14:48.83Z\",\"updatedAt\":\"2022-11-23T08:26:44.967Z\",\"serviceBusEndpoint\":\"https://secondaryNSaj9zhm.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestqb21vp/providers/Microsoft.ServiceBus/namespaces/primaryNSmf4b86\",\"name\":\"primaryNSmf4b86\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsmf4b86\",\"createdAt\":\"2022-11-23T08:14:49.007Z\",\"updatedAt\":\"2022-11-23T08:26:45.71Z\",\"serviceBusEndpoint\":\"https://primaryNSmf4b86.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc3akwp/providers/Microsoft.ServiceBus/namespaces/namespaceNamek15sa7\",\"name\":\"namespaceNamek15sa7\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamek15sa7\",\"createdAt\":\"2022-11-23T10:33:09.827Z\",\"updatedAt\":\"2022-11-23T10:33:52.657Z\",\"serviceBusEndpoint\":\"https://namespaceNamek15sa7.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc3akwp/providers/Microsoft.ServiceBus/namespaces/namespaceNameazit49\",\"name\":\"namespaceNameazit49\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/namespaces/privateEndpointConnections/67ed170e-22f4-45d5-88c2-65242051987e\",\"name\":\"67ed170e-22f4-45d5-88c2-65242051987e\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc3akwp/providers/Microsoft.Network/privateEndpoints/pe1xb0e6w\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/namespaces/privateEndpointConnections/1423d16b-9510-49c1-978f-ef0c2f1831f8\",\"name\":\"1423d16b-9510-49c1-978f-ef0c2f1831f8\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc3akwp/providers/Microsoft.Network/privateEndpoints/pe2j07oca\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameazit49\",\"createdAt\":\"2022-11-23T10:33:10.063Z\",\"updatedAt\":\"2022-11-23T10:37:11.773Z\",\"serviceBusEndpoint\":\"https://namespaceNameazit49.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc3akwp/providers/Microsoft.ServiceBus/namespaces/namespaceName2qt8ag\",\"name\":\"namespaceName2qt8ag\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"4bedf168-dcb9-4d89-9b35-844869a85823\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename2qt8ag\",\"createdAt\":\"2022-11-23T10:33:10.83Z\",\"updatedAt\":\"2023-01-08T10:28:09.28Z\",\"serviceBusEndpoint\":\"https://namespaceName2qt8ag.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc3akwp/providers/Microsoft.ServiceBus/namespaces/secondaryNStilqso\",\"name\":\"secondaryNStilqso\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynstilqso\",\"createdAt\":\"2022-11-23T10:42:30.29Z\",\"updatedAt\":\"2022-11-23T10:44:33.083Z\",\"serviceBusEndpoint\":\"https://secondaryNStilqso.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc3akwp/providers/Microsoft.ServiceBus/namespaces/primaryNS67mwe3\",\"name\":\"primaryNS67mwe3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primaryns67mwe3\",\"createdAt\":\"2022-11-23T10:42:30.41Z\",\"updatedAt\":\"2022-11-23T10:43:14.363Z\",\"serviceBusEndpoint\":\"https://primaryNS67mwe3.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc3akwp/providers/Microsoft.ServiceBus/namespaces/secondaryNSxg98uj\",\"name\":\"secondaryNSxg98uj\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynsxg98uj\",\"createdAt\":\"2022-11-23T10:42:30.63Z\",\"updatedAt\":\"2022-11-23T10:45:02.21Z\",\"serviceBusEndpoint\":\"https://secondaryNSxg98uj.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc3akwp/providers/Microsoft.ServiceBus/namespaces/primaryNS9kh1r7\",\"name\":\"primaryNS9kh1r7\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primaryns9kh1r7\",\"createdAt\":\"2022-11-23T10:42:30.71Z\",\"updatedAt\":\"2022-11-23T10:43:38.44Z\",\"serviceBusEndpoint\":\"https://primaryNS9kh1r7.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestel6pb5/providers/Microsoft.ServiceBus/namespaces/secondaryNS4qrb17\",\"name\":\"secondaryNS4qrb17\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondaryns4qrb17\",\"createdAt\":\"2022-11-23T12:03:35.037Z\",\"updatedAt\":\"2022-11-23T13:24:59.773Z\",\"serviceBusEndpoint\":\"https://secondaryNS4qrb17.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestel6pb5/providers/Microsoft.ServiceBus/namespaces/primaryNS6wbgdx\",\"name\":\"primaryNS6wbgdx\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primaryns6wbgdx\",\"createdAt\":\"2022-11-23T12:03:35.123Z\",\"updatedAt\":\"2022-11-23T13:24:59.547Z\",\"serviceBusEndpoint\":\"https://primaryNS6wbgdx.servicebus.windows.net:443/\",\"status\":\"Active\",\"alternateName\":\"postMigrationajsixu\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jbj-sb-testing/providers/Microsoft.ServiceBus/namespaces/jbj-sb-aad-test\",\"name\":\"jbj-sb-aad-test\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:jbj-sb-aad-test\",\"createdAt\":\"2022-11-30T20:44:46.15Z\",\"updatedAt\":\"2022-11-30T20:45:29.853Z\",\"serviceBusEndpoint\":\"https://jbj-sb-aad-test.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/abhigarg-publicnetworkaccess-cbn/providers/Microsoft.ServiceBus/namespaces/abhigarg-publicnetwrkaccess-2022-12-02\",\"name\":\"abhigarg-publicnetwrkaccess-2022-12-02\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"EAST US 2 EUAP\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:abhigarg-publicnetwrkaccess-2022-12-02\",\"createdAt\":\"2022-12-02T21:35:16.203Z\",\"updatedAt\":\"2022-12-03T01:08:23.413Z\",\"serviceBusEndpoint\":\"https://abhigarg-publicnetwrkaccess-2022-12-02.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/klam-rg/providers/Microsoft.ServiceBus/namespaces/klam-test-deleteme\",\"name\":\"klam-test-deleteme\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Brazil South\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:klam-test-deleteme\",\"createdAt\":\"2022-12-12T18:00:24.613Z\",\"updatedAt\":\"2022-12-12T18:01:08.077Z\",\"serviceBusEndpoint\":\"https://klam-test-deleteme.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.ServiceBus/namespaces/testsbcompliance\",\"name\":\"testsbcompliance\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Jio India West\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testsbcompliance\",\"createdAt\":\"2022-12-13T04:48:43.01Z\",\"updatedAt\":\"2022-12-13T07:37:52.777Z\",\"serviceBusEndpoint\":\"https://testsbcompliance.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/suparame-rg/providers/Microsoft.ServiceBus/namespaces/SuparameNamespaceTest1\",\"name\":\"SuparameNamespaceTest1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:suparamenamespacetest1\",\"createdAt\":\"2022-12-16T05:52:14.85Z\",\"updatedAt\":\"2022-12-16T05:52:59.003Z\",\"serviceBusEndpoint\":\"https://SuparameNamespaceTest1.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-testrg1/providers/Microsoft.ServiceBus/namespaces/ardsouza-polandcentral-12-21-22\",\"name\":\"ardsouza-polandcentral-12-21-22\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Poland Central\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-polandcentral-12-21-22\",\"createdAt\":\"2022-12-21T22:12:02.127Z\",\"updatedAt\":\"2022-12-21T22:13:20.107Z\",\"serviceBusEndpoint\":\"https://ardsouza-polandcentral-12-21-22.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-testrg1/providers/Microsoft.ServiceBus/namespaces/ardsouza-polandcentral-std-12-21-22\",\"name\":\"ardsouza-polandcentral-std-12-21-22\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Poland Central\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-polandcentral-std-12-21-22\",\"createdAt\":\"2022-12-22T02:37:39.503Z\",\"updatedAt\":\"2022-12-22T02:38:24.017Z\",\"serviceBusEndpoint\":\"https://ardsouza-polandcentral-std-12-21-22.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/pablorod_new/providers/Microsoft.ServiceBus/namespaces/pablorod-suscription-rules-v2\",\"name\":\"pablorod-suscription-rules-v2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:pablorod-suscription-rules-v2\",\"createdAt\":\"2022-12-28T21:24:03.74Z\",\"updatedAt\":\"2022-12-28T21:24:46.6Z\",\"serviceBusEndpoint\":\"https://pablorod-suscription-rules-v2.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/TestKaren/providers/Microsoft.ServiceBus/namespaces/jmsCanaryTest\",\"name\":\"jmsCanaryTest\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Central US EUAP\",\"tags\":{},\"identity\":{\"principalId\":\"545fa6eb-4462-4f3b-8e03-1be333624068\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/TestKaren/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aadJmsTest\":{\"clientId\":\"f7a1d0cd-b213-46ad-b00f-7b8da1ae32a9\",\"principalId\":\"8ef66c24-3d2d-4435-885c-18b4e02bbc41\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:jmscanarytest\",\"createdAt\":\"2022-12-29T02:49:54.477Z\",\"updatedAt\":\"2023-02-04T22:07:08.703Z\",\"serviceBusEndpoint\":\"https://jmsCanaryTest.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/shubham-rg/providers/Microsoft.ServiceBus/namespaces/srcauth01\",\"name\":\"srcauth01\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:srcauth01\",\"createdAt\":\"2023-01-05T09:26:00.26Z\",\"updatedAt\":\"2023-01-05T09:26:45.007Z\",\"serviceBusEndpoint\":\"https://srcauth01.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/suparame-rg/providers/Microsoft.ServiceBus/namespaces/Suparame-EG-test1\",\"name\":\"Suparame-EG-test1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US 3\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:suparame-eg-test1\",\"createdAt\":\"2023-01-06T02:55:40.927Z\",\"updatedAt\":\"2023-01-06T02:56:51.367Z\",\"serviceBusEndpoint\":\"https://Suparame-EG-test1.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-EASTUS2EUAP/providers/Microsoft.ServiceBus/namespaces/euapnoebs\",\"name\":\"euapnoebs\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"EAST US 2 EUAP\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:euapnoebs\",\"createdAt\":\"2023-01-11T04:06:37.373Z\",\"updatedAt\":\"2023-01-11T04:07:56.56Z\",\"serviceBusEndpoint\":\"https://euapnoebs.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testservicebusRG-2484/providers/Microsoft.ServiceBus/namespaces/testnamespacemgmt7646\",\"name\":\"testnamespacemgmt7646\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt7646\",\"createdAt\":\"2023-01-12T08:22:57.34Z\",\"updatedAt\":\"2023-01-12T08:24:36.11Z\",\"serviceBusEndpoint\":\"https://testnamespacemgmt7646.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/anway/providers/Microsoft.ServiceBus/namespaces/highmemeus2\",\"name\":\"highmemeus2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:highmemeus2\",\"createdAt\":\"2023-01-12T21:42:02.56Z\",\"updatedAt\":\"2023-01-12T21:43:21.12Z\",\"serviceBusEndpoint\":\"https://highmemeus2.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/shubham-rg/providers/Microsoft.ServiceBus/namespaces/srcty110\",\"name\":\"srcty110\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"f41a1e1e-8e8b-4f7a-9e2b-281966a681f8\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/shubham-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MSI-rg02\":{\"clientId\":\"1201f723-2b58-448d-9e5e-e302fcdfacbc\",\"principalId\":\"ceee4453-2c61-4e1b-bff7-87dedfb25103\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/shubham-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MSI-rg01\":{\"clientId\":\"aeb590de-880a-494c-a9c4-eedd842272f0\",\"principalId\":\"723e19ad-62ca-4b38-af07-4d9b7c3261a3\"}}},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:srcty110\",\"createdAt\":\"2023-01-23T11:29:27.333Z\",\"updatedAt\":\"2023-01-23T11:36:43.7Z\",\"serviceBusEndpoint\":\"https://srcty110.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/TestKaren/providers/Microsoft.ServiceBus/namespaces/mqTestKa\",\"name\":\"mqTestKa\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"identity\":{\"principalId\":\"f063a397-de97-42f0-9a6d-bc48fb375597\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:mqtestka\",\"createdAt\":\"2023-01-27T01:29:51.76Z\",\"updatedAt\":\"2023-01-27T05:24:54.09Z\",\"serviceBusEndpoint\":\"https://mqTestKa.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/suparame-rg/providers/Microsoft.ServiceBus/namespaces/ServiceBusStandardNSSuparme\",\"name\":\"ServiceBusStandardNSSuparme\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US 3\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebusstandardnssuparme\",\"createdAt\":\"2023-01-31T18:38:27.15Z\",\"updatedAt\":\"2023-01-31T18:39:09.853Z\",\"serviceBusEndpoint\":\"https://ServiceBusStandardNSSuparme.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testservicebusRG-6260/providers/Microsoft.ServiceBus/namespaces/testnamespacemgmt7577\",\"name\":\"testnamespacemgmt7577\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt7577\",\"createdAt\":\"2023-02-01T09:27:27.243Z\",\"updatedAt\":\"2023-02-01T09:28:38.053Z\",\"serviceBusEndpoint\":\"https://testnamespacemgmt7577.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testservicebusRG-6260/providers/Microsoft.ServiceBus/namespaces/testnamespacemgmt1217\",\"name\":\"testnamespacemgmt1217\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt1217\",\"createdAt\":\"2023-02-01T09:29:09.047Z\",\"updatedAt\":\"2023-02-01T09:31:02.407Z\",\"serviceBusEndpoint\":\"https://testnamespacemgmt1217.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sharmavijay-la-verification/providers/Microsoft.ServiceBus/namespaces/sharmavijay-sb-std-la-verification\",\"name\":\"sharmavijay-sb-std-la-verification\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"EAST US 2 EUAP\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sharmavijay-sb-std-la-verification\",\"createdAt\":\"2023-02-01T11:00:09.857Z\",\"updatedAt\":\"2023-02-01T11:00:55.313Z\",\"serviceBusEndpoint\":\"https://sharmavijay-sb-std-la-verification.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":4},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testvinsu718/providers/Microsoft.ServiceBus/namespaces/testsbpremvinsuwithHighMemoryFix\",\"name\":\"testsbpremvinsuwithHighMemoryFix\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Central US EUAP\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testsbpremvinsuwithhighmemoryfix\",\"createdAt\":\"2023-02-05T21:14:19.12Z\",\"updatedAt\":\"2023-02-09T00:27:34.767Z\",\"serviceBusEndpoint\":\"https://testsbpremvinsuwithHighMemoryFix.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_subscription6m27zc5rufs7xp34pis2phf5wfu2j7kk7lqieysmclma6iytq4r/providers/Microsoft.ServiceBus/namespaces/sb-nsclizscx2ebag64z\",\"name\":\"sb-nsclizscx2ebag64z\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-nsclizscx2ebag64z\",\"createdAt\":\"2023-02-07T08:00:56.033Z\",\"updatedAt\":\"2023-02-07T08:01:38.447Z\",\"serviceBusEndpoint\":\"https://sb-nsclizscx2ebag64z.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_queueucmveinbbhtk5zmhw4unieyuns6duvjkbs3xk7ulpknno3umqqsxfewp7t/providers/Microsoft.ServiceBus/namespaces/sb-nscli54t4su6p5nrz\",\"name\":\"sb-nscli54t4su6p5nrz\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US\",\"tags\":{\"{tag2\":\"value2,\",\"tag1\":\"value1}\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-nscli54t4su6p5nrz\",\"createdAt\":\"2023-02-07T08:11:32.08Z\",\"updatedAt\":\"2023-02-07T08:12:16.78Z\",\"serviceBusEndpoint\":\"https://sb-nscli54t4su6p5nrz.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/anqyan-rg/providers/Microsoft.ServiceBus/namespaces/anqyan-canary-premum\",\"name\":\"anqyan-canary-premum\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Central US EUAP\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:anqyan-canary-premum\",\"createdAt\":\"2023-02-08T00:34:41.913Z\",\"updatedAt\":\"2023-02-08T00:36:00.77Z\",\"serviceBusEndpoint\":\"https://anqyan-canary-premum.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Kala-test/providers/Microsoft.ServiceBus/namespaces/kala-test-poland\",\"name\":\"kala-test-poland\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Poland Central\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kala-test-poland\",\"createdAt\":\"2023-02-09T22:33:45.233Z\",\"updatedAt\":\"2023-02-16T23:42:01.043Z\",\"serviceBusEndpoint\":\"https://kala-test-poland.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc9psbq/providers/Microsoft.ServiceBus/namespaces/namespaceNameqau0ke\",\"name\":\"namespaceNameqau0ke\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameqau0ke\",\"createdAt\":\"2023-02-10T17:17:35.547Z\",\"updatedAt\":\"2023-02-10T17:18:17.667Z\",\"serviceBusEndpoint\":\"https://namespaceNameqau0ke.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc9psbq/providers/Microsoft.ServiceBus/namespaces/namespaceNameblajf8\",\"name\":\"namespaceNameblajf8\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameblajf8\",\"createdAt\":\"2023-02-10T17:17:35.657Z\",\"updatedAt\":\"2023-02-10T17:18:45.427Z\",\"serviceBusEndpoint\":\"https://namespaceNameblajf8.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc9psbq/providers/Microsoft.ServiceBus/namespaces/namespaceNamecyvb0a\",\"name\":\"namespaceNamecyvb0a\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"0798279e-3e21-4829-96f3-81262828ea3b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamecyvb0a\",\"createdAt\":\"2023-02-10T17:17:36.46Z\",\"updatedAt\":\"2023-02-10T17:24:44.783Z\",\"serviceBusEndpoint\":\"https://namespaceNamecyvb0a.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc9psbq/providers/Microsoft.ServiceBus/namespaces/primaryNSzunbvq\",\"name\":\"primaryNSzunbvq\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynszunbvq\",\"createdAt\":\"2023-02-10T17:25:08.113Z\",\"updatedAt\":\"2023-02-10T18:17:11.347Z\",\"serviceBusEndpoint\":\"https://primaryNSzunbvq.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc9psbq/providers/Microsoft.ServiceBus/namespaces/secondaryNSgsa23z\",\"name\":\"secondaryNSgsa23z\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynsgsa23z\",\"createdAt\":\"2023-02-10T17:25:08.49Z\",\"updatedAt\":\"2023-02-10T17:37:32.227Z\",\"serviceBusEndpoint\":\"https://secondaryNSgsa23z.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc9psbq/providers/Microsoft.ServiceBus/namespaces/primaryNS6bfi8t\",\"name\":\"primaryNS6bfi8t\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primaryns6bfi8t\",\"createdAt\":\"2023-02-10T17:25:08.73Z\",\"updatedAt\":\"2023-02-10T17:25:51.82Z\",\"serviceBusEndpoint\":\"https://primaryNS6bfi8t.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc9psbq/providers/Microsoft.ServiceBus/namespaces/secondaryNS4xj2hf\",\"name\":\"secondaryNS4xj2hf\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondaryns4xj2hf\",\"createdAt\":\"2023-02-10T17:25:09.733Z\",\"updatedAt\":\"2023-02-10T17:26:47.687Z\",\"serviceBusEndpoint\":\"https://secondaryNS4xj2hf.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc9psbq/providers/Microsoft.ServiceBus/namespaces/namespaceV2gqx7eh\",\"name\":\"namespaceV2gqx7eh\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2gqx7eh\",\"createdAt\":\"2023-02-10T17:39:41.903Z\",\"updatedAt\":\"2023-02-10T17:40:25.32Z\",\"serviceBusEndpoint\":\"https://namespaceV2gqx7eh.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc9psbq/providers/Microsoft.ServiceBus/namespaces/namespaceV3s5q0n2\",\"name\":\"namespaceV3s5q0n2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3s5q0n2\",\"createdAt\":\"2023-02-10T17:40:46.02Z\",\"updatedAt\":\"2023-02-10T17:41:28.37Z\",\"serviceBusEndpoint\":\"https://namespaceV3s5q0n2.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc9psbq/providers/Microsoft.ServiceBus/namespaces/namespaceV4w7kpnq\",\"name\":\"namespaceV4w7kpnq\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"ad0065a0-6933-4db9-a287-7bbd15d36c04\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4w7kpnq\",\"createdAt\":\"2023-02-10T17:41:50.053Z\",\"updatedAt\":\"2023-02-10T17:49:00.633Z\",\"serviceBusEndpoint\":\"https://namespaceV4w7kpnq.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc9psbq/providers/Microsoft.ServiceBus/namespaces/namespaceV5mdoiq0\",\"name\":\"namespaceV5mdoiq0\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamezy92k7.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamezy92k7.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5mdoiq0\",\"createdAt\":\"2023-02-10T17:49:29.18Z\",\"updatedAt\":\"2023-02-10T17:56:45.86Z\",\"serviceBusEndpoint\":\"https://namespaceV5mdoiq0.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc9psbq/providers/Microsoft.ServiceBus/namespaces/namespaceV9azx8yb\",\"name\":\"namespaceV9azx8yb\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamezy92k7.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamezy92k7.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev9azx8yb\",\"createdAt\":\"2023-02-10T17:57:08.977Z\",\"updatedAt\":\"2023-02-10T18:04:27.967Z\",\"serviceBusEndpoint\":\"https://namespaceV9azx8yb.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest3gl8u0/providers/Microsoft.ServiceBus/namespaces/secondaryNSw9rzma\",\"name\":\"secondaryNSw9rzma\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynsw9rzma\",\"createdAt\":\"2023-02-10T18:33:19.68Z\",\"updatedAt\":\"2023-02-10T20:09:29.653Z\",\"serviceBusEndpoint\":\"https://secondaryNSw9rzma.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest3gl8u0/providers/Microsoft.ServiceBus/namespaces/primaryNSut8xa0\",\"name\":\"primaryNSut8xa0\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsut8xa0\",\"createdAt\":\"2023-02-10T18:33:19.767Z\",\"updatedAt\":\"2023-02-10T20:09:27.89Z\",\"serviceBusEndpoint\":\"https://primaryNSut8xa0.servicebus.windows.net:443/\",\"status\":\"Active\",\"alternateName\":\"postMigrationulz9q8\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest6a5ioc/providers/Microsoft.ServiceBus/namespaces/primaryNSfjarv9\",\"name\":\"primaryNSfjarv9\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsfjarv9\",\"createdAt\":\"2023-02-13T06:16:32.313Z\",\"updatedAt\":\"2023-02-13T07:48:12.32Z\",\"serviceBusEndpoint\":\"https://primaryNSfjarv9.servicebus.windows.net:443/\",\"status\":\"Active\",\"alternateName\":\"postMigration16it5x\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest6a5ioc/providers/Microsoft.ServiceBus/namespaces/secondaryNS6zn7s8\",\"name\":\"secondaryNS6zn7s8\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondaryns6zn7s8\",\"createdAt\":\"2023-02-13T06:16:32.73Z\",\"updatedAt\":\"2023-02-13T07:48:12.423Z\",\"serviceBusEndpoint\":\"https://secondaryNS6zn7s8.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-EASTUS2EUAP/providers/Microsoft.ServiceBus/namespaces/kala-test-sbprem-vmss-canary-1\",\"name\":\"kala-test-sbprem-vmss-canary-1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"EAST US 2 EUAP\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kala-test-sbprem-vmss-canary-1\",\"createdAt\":\"2023-02-14T01:28:05.25Z\",\"updatedAt\":\"2023-02-16T18:28:41.807Z\",\"serviceBusEndpoint\":\"https://kala-test-sbprem-vmss-canary-1.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-test/providers/Microsoft.ServiceBus/namespaces/ardsouza-SBNS-2-14-2023-p-1\",\"name\":\"ardsouza-SBNS-2-14-2023-p-1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Poland Central\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-sbns-2-14-2023-p-1\",\"createdAt\":\"2023-02-15T01:37:52.193Z\",\"updatedAt\":\"2023-02-15T01:39:50.5Z\",\"serviceBusEndpoint\":\"https://ardsouza-SBNS-2-14-2023-p-1.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-test/providers/Microsoft.ServiceBus/namespaces/ardsouza-SBNS-std-2-14-2023-p-1\",\"name\":\"ardsouza-SBNS-std-2-14-2023-p-1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Poland Central\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-sbns-std-2-14-2023-p-1\",\"createdAt\":\"2023-02-15T01:44:36.02Z\",\"updatedAt\":\"2023-02-15T01:45:21.823Z\",\"serviceBusEndpoint\":\"https://ardsouza-SBNS-std-2-14-2023-p-1.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jupachol-rg/providers/Microsoft.ServiceBus/namespaces/jupachol-test\",\"name\":\"jupachol-test\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"West US 3\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:jupachol-test\",\"createdAt\":\"2023-02-16T22:16:08.51Z\",\"updatedAt\":\"2023-02-16T22:17:15.03Z\",\"serviceBusEndpoint\":\"https://jupachol-test.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Kala-test/providers/Microsoft.ServiceBus/namespaces/kala-test-poland-1\",\"name\":\"kala-test-poland-1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"Poland Central\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kala-test-poland-1\",\"createdAt\":\"2023-02-16T23:53:10.663Z\",\"updatedAt\":\"2023-02-16T23:57:08.007Z\",\"serviceBusEndpoint\":\"https://kala-test-poland-1.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq\",\"name\":\"namespaceNametkv0jq\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenametkv0jq\",\"createdAt\":\"2023-02-19T13:01:16.447Z\",\"updatedAt\":\"2023-02-19T13:01:58.797Z\",\"serviceBusEndpoint\":\"https://namespaceNametkv0jq.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09\",\"name\":\"namespaceNamehjil09\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/namespaces/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/namespaces/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamehjil09\",\"createdAt\":\"2023-02-19T13:01:16.6Z\",\"updatedAt\":\"2023-02-19T13:02:26.58Z\",\"serviceBusEndpoint\":\"https://namespaceNamehjil09.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T13:08:35.657Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"name\":\"secondaryNS5doyqa\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondaryns5doyqa\",\"createdAt\":\"2023-02-19T13:08:55.377Z\",\"updatedAt\":\"2023-02-19T13:10:09.897Z\",\"serviceBusEndpoint\":\"https://secondaryNS5doyqa.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"name\":\"secondaryNSjazpct\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynsjazpct\",\"createdAt\":\"2023-02-19T13:08:55.4Z\",\"updatedAt\":\"2023-02-19T13:10:39.913Z\",\"serviceBusEndpoint\":\"https://secondaryNSjazpct.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"name\":\"primaryNSd7oma3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsd7oma3\",\"createdAt\":\"2023-02-19T13:08:55.42Z\",\"updatedAt\":\"2023-02-19T13:10:12.177Z\",\"serviceBusEndpoint\":\"https://primaryNSd7oma3.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsp1xb3a\",\"createdAt\":\"2023-02-19T13:08:55.47Z\",\"updatedAt\":\"2023-02-19T13:09:38.503Z\",\"serviceBusEndpoint\":\"https://primaryNSp1xb3a.servicebus.windows.net:443/\",\"status\":\"Active\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.ServiceBus/namespaces/testPSV2\",\"name\":\"testPSV2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testpsv2\",\"serviceBusEndpoint\":\"https://testPSV2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-17T11:12:03.0498916Z\",\"updatedAt\":\"2024-01-24T02:04:20.5598499Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/SDK-ServiceBus-7854/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-8751\",\"name\":\"sdk-Namespace-8751\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-8751\",\"serviceBusEndpoint\":\"https://sdk-Namespace-8751.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-05T05:24:50.23537Z\",\"updatedAt\":\"2023-12-12T07:09:00.6023665Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/anqyan-rg/providers/Microsoft.ServiceBus/namespaces/anqyan-prem\",\"name\":\"anqyan-prem\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:anqyan-prem\",\"serviceBusEndpoint\":\"https://anqyan-prem.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-09T22:00:06.7934845Z\",\"updatedAt\":\"2024-03-13T22:30:32.2202298Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/SDK-ServiceBus-7854/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-8973\",\"name\":\"sdk-Namespace-8973\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-8973\",\"serviceBusEndpoint\":\"https://sdk-Namespace-8973.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-05T08:05:40.607159Z\",\"updatedAt\":\"2023-12-12T07:13:40.1790116Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/TestingSDK20220101/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7033\",\"name\":\"sdk-Namespace-7033\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-7033\",\"serviceBusEndpoint\":\"https://sdk-Namespace-7033.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-14T01:36:53.3994145Z\",\"updatedAt\":\"2022-06-14T22:22:30.4381938Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.ServiceBus/namespaces/testingSBTemplate\",\"name\":\"testingSBTemplate\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testingsbtemplate\",\"serviceBusEndpoint\":\"https://testingSBTemplate.servicebus.windows.net:443/\",\"alternateName\":\"sbmigratepremium2\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-28T06:14:16.302458Z\",\"updatedAt\":\"2022-09-15T14:55:28.9458373Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/TestingSDK20220101/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-5025\",\"name\":\"sdk-Namespace-5025\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-5025\",\"serviceBusEndpoint\":\"https://sdk-Namespace-5025.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-14T01:27:42.1997027Z\",\"updatedAt\":\"2022-06-14T22:20:36.5351554Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/klam-rg/providers/Microsoft.ServiceBus/namespaces/klam-test-deleteme\",\"name\":\"klam-test-deleteme\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"brazilsouth\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:klam-test-deleteme\",\"serviceBusEndpoint\":\"https://klam-test-deleteme.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-12T18:00:25.5916408Z\",\"updatedAt\":\"2022-12-12T18:01:10.0911441Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouzazoneredundantbydetaulttest/providers/Microsoft.ServiceBus/namespaces/NamespaceServiceBusStandardNonAzCreate\",\"name\":\"NamespaceServiceBusStandardNonAzCreate\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centralindia\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespaceservicebusstandardnonazcreate\",\"serviceBusEndpoint\":\"https://NamespaceServiceBusStandardNonAzCreate.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-25T00:06:50.5860334Z\",\"updatedAt\":\"2024-01-25T17:48:43.4785612Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouzazoneredundantbydetaulttest/providers/Microsoft.ServiceBus/namespaces/NamespaceServiceBusPremiumNonAzCreateAfter\",\"name\":\"NamespaceServiceBusPremiumNonAzCreateAfter\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centralindia\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespaceservicebuspremiumnonazcreateafter\",\"serviceBusEndpoint\":\"https://NamespaceServiceBusPremiumNonAzCreateAfter.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-25T00:27:37.1734657Z\",\"updatedAt\":\"2024-01-25T00:29:08.2377453Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouzazoneredundantbydetaulttest/providers/Microsoft.ServiceBus/namespaces/NamespaceServiceBusPremiumNonAzCreate\",\"name\":\"NamespaceServiceBusPremiumNonAzCreate\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centralindia\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespaceservicebuspremiumnonazcreate\",\"serviceBusEndpoint\":\"https://NamespaceServiceBusPremiumNonAzCreate.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-25T00:09:16.4646711Z\",\"updatedAt\":\"2024-01-25T16:59:28.1002397Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouzazoneredundantbydetaulttest/providers/Microsoft.ServiceBus/namespaces/NamespaceServiceBusStandardNonAzCreateAfter\",\"name\":\"NamespaceServiceBusStandardNonAzCreateAfter\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centralindia\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespaceservicebusstandardnonazcreateafter\",\"serviceBusEndpoint\":\"https://NamespaceServiceBusStandardNonAzCreateAfter.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-25T00:26:54.2431721Z\",\"updatedAt\":\"2024-01-25T00:27:43.243657Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/shsama-rg/providers/Microsoft.ServiceBus/namespaces/shsama-jms-geo-cus\",\"name\":\"shsama-jms-geo-cus\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:shsama-jms-geo-cus\",\"serviceBusEndpoint\":\"https://shsama-jms-geo-cus.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-09T04:20:31.2570872Z\",\"updatedAt\":\"2024-02-01T21:07:43.4254397Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-EastUS/providers/Microsoft.ServiceBus/namespaces/anqyan-2024\",\"name\":\"anqyan-2024\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:anqyan-2024\",\"serviceBusEndpoint\":\"https://anqyan-2024.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-02T20:15:33.309405Z\",\"updatedAt\":\"2024-01-02T20:16:19.3686304Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/namespaceName61l8y5\",\"name\":\"namespaceName61l8y5\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-6xcrdo-kv1.vault.azure.net/\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://sb-ps-6xcrdo-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename61l8y5\",\"serviceBusEndpoint\":\"https://namespaceName61l8y5.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-04T08:57:44.4442684Z\",\"updatedAt\":\"2024-03-04T09:55:57.2196303Z\"},\"identity\":{\"principalId\":\"2de0989b-d2b2-4f20-853a-09f44b85aff1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-6xcrdo-msi1\":{\"clientId\":\"c4711080-1964-4479-b0e9-8d8c859dd57c\",\"principalId\":\"64a1501b-4407-4bb5-85bd-7d4e73eb4535\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-6xcrdo-msi2\":{\"clientId\":\"d921e9e6-07cd-4f68-a6c2-e2c7a253c4d3\",\"principalId\":\"5e17a40f-cf51-425e-ab4a-40ea4b466463\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T05:06:48.3082869Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc3akwp/providers/Microsoft.ServiceBus/namespaces/primaryNS67mwe3\",\"name\":\"primaryNS67mwe3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primaryns67mwe3\",\"serviceBusEndpoint\":\"https://primaryNS67mwe3.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-23T10:42:30.6156181Z\",\"updatedAt\":\"2022-11-23T10:43:15.3377028Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_networkwrj55aatxlgxucsba6igeidap7hqov64fz6i6fhkxg2q66tsychlm5im/providers/Microsoft.ServiceBus/namespaces/servicebus-nsclidurp\",\"name\":\"servicebus-nsclidurp\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"{tag1\":\"value1}\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-nsclidurp\",\"serviceBusEndpoint\":\"https://servicebus-nsclidurp.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-25T01:13:23.2939303Z\",\"updatedAt\":\"2022-07-01T18:31:51.371547Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestel6pb5/providers/Microsoft.ServiceBus/namespaces/primaryNS6wbgdx\",\"name\":\"primaryNS6wbgdx\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primaryns6wbgdx\",\"serviceBusEndpoint\":\"https://primaryNS6wbgdx.servicebus.windows.net:443/\",\"alternateName\":\"postMigrationajsixu\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-23T12:03:35.2157047Z\",\"updatedAt\":\"2024-02-16T01:28:23.7255974Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jbj-sb-testing/providers/Microsoft.ServiceBus/namespaces/jbj-sb-none\",\"name\":\"jbj-sb-none\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:jbj-sb-none\",\"serviceBusEndpoint\":\"https://jbj-sb-none.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-20T00:02:37.5794792Z\",\"updatedAt\":\"2023-04-20T00:03:21.1901226Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/SB-Intern2021ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sophia-explore\",\"name\":\"sophia-explore\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sophia-explore\",\"serviceBusEndpoint\":\"https://sophia-explore.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-29T23:50:17.3775749Z\",\"updatedAt\":\"2022-07-01T23:40:50.7777225Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sbmessagingrg/providers/Microsoft.ServiceBus/namespaces/ContosoSBusNS1\",\"name\":\"ContosoSBusNS1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:contososbusns1\",\"serviceBusEndpoint\":\"https://ContosoSBusNS1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-14T23:47:17.3402338Z\",\"updatedAt\":\"2023-12-14T23:48:01.0284606Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/primaryNSvrj1mp\",\"name\":\"primaryNSvrj1mp\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsvrj1mp\",\"serviceBusEndpoint\":\"https://primaryNSvrj1mp.servicebus.windows.net:443/\",\"alternateName\":\"postMigrationjh51xi\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-04T08:57:43.569323Z\",\"updatedAt\":\"2024-03-04T10:15:24.4191616Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresto859up/providers/Microsoft.ServiceBus/namespaces/primaryNSn6fmhu\",\"name\":\"primaryNSn6fmhu\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsn6fmhu\",\"serviceBusEndpoint\":\"https://primaryNSn6fmhu.servicebus.windows.net:443/\",\"alternateName\":\"postMigrationqt7hcd\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-22T17:41:18.5773436Z\",\"updatedAt\":\"2024-02-16T01:28:23.7255974Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/KarenTesting/providers/Microsoft.ServiceBus/namespaces/sm2TestStand\",\"name\":\"sm2TestStand\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sm2teststand\",\"serviceBusEndpoint\":\"https://sm2TestStand.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-17T21:02:56.6941683Z\",\"updatedAt\":\"2024-04-24T07:05:10.1287993Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/dorothytest/providers/Microsoft.ServiceBus/namespaces/standardnewapi\",\"name\":\"standardnewapi\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:standardnewapi\",\"serviceBusEndpoint\":\"https://standardnewapi.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-25T01:12:08.5491945Z\",\"updatedAt\":\"2022-07-01T18:30:52.3241886Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/abhigarg-publicnetworkaccess-cbn/providers/Microsoft.ServiceBus/namespaces/dsa-message-test\",\"name\":\"dsa-message-test\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:dsa-message-test\",\"serviceBusEndpoint\":\"https://dsa-message-test.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-06-01T23:06:41.351463Z\",\"updatedAt\":\"2023-06-01T23:07:26.5942034Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"name\":\"primaryNSibt9vz\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsibt9vz\",\"serviceBusEndpoint\":\"https://primaryNSibt9vz.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:45.0033726Z\",\"updatedAt\":\"2024-04-30T05:06:28.1277631Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/namespaceNamesgerv4\",\"name\":\"namespaceNamesgerv4\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamesgerv4\",\"serviceBusEndpoint\":\"https://namespaceNamesgerv4.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-04T08:57:43.3661929Z\",\"updatedAt\":\"2024-03-04T08:57:46.2412287Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testvinsurg712/providers/Microsoft.ServiceBus/namespaces/testvinsunseastusstd2\",\"name\":\"testvinsunseastusstd2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testvinsunseastusstd2\",\"serviceBusEndpoint\":\"https://testvinsunseastusstd2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-07-13T00:05:21.8158731Z\",\"updatedAt\":\"2023-07-13T00:06:04.5839459Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/woseibonsu-pm-playground/providers/Microsoft.ServiceBus/namespaces/wo-standard-migration-namespace\",\"name\":\"wo-standard-migration-namespace\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:wo-standard-migration-namespace\",\"serviceBusEndpoint\":\"https://wo-standard-migration-namespace.servicebus.windows.net:443/\",\"alternateName\":\"wo-standard-namespace-finished-migration\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-31T22:43:44.5125182Z\",\"updatedAt\":\"2023-05-31T23:18:14.6185172Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/KarenTesting/providers/Microsoft.ServiceBus/namespaces/sm2TestPrem\",\"name\":\"sm2TestPrem\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sm2testprem\",\"serviceBusEndpoint\":\"https://sm2TestPrem.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-17T21:02:11.9195789Z\",\"updatedAt\":\"2024-04-24T07:05:29.1611169Z\"},\"identity\":{\"principalId\":\"673b073e-761b-45b6-b879-d541ae5a8b9f\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc9psbq/providers/Microsoft.ServiceBus/namespaces/namespaceNameqau0ke\",\"name\":\"namespaceNameqau0ke\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameqau0ke\",\"serviceBusEndpoint\":\"https://namespaceNameqau0ke.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-10T17:17:35.8860843Z\",\"updatedAt\":\"2023-02-10T17:18:19.2655743Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/namespaceV9915h3i\",\"name\":\"namespaceV9915h3i\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-6xcrdo-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-6xcrdo-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-6xcrdo-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-6xcrdo-msi1\"}}],\"requireInfrastructureEncryption\":true},\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev9915h3i\",\"serviceBusEndpoint\":\"https://namespaceV9915h3i.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-04T09:20:26.137644Z\",\"updatedAt\":\"2024-03-04T09:21:25.0300707Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-6xcrdo-msi1\":{\"clientId\":\"c4711080-1964-4479-b0e9-8d8c859dd57c\",\"principalId\":\"64a1501b-4407-4bb5-85bd-7d4e73eb4535\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-6xcrdo-msi2\":{\"clientId\":\"d921e9e6-07cd-4f68-a6c2-e2c7a253c4d3\",\"principalId\":\"5e17a40f-cf51-425e-ab4a-40ea4b466463\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_networkb6dybi7i77qadmwp3x7qn4fsvzex5svqgkd23ljbqqekhpuqpewxl5ox/providers/Microsoft.ServiceBus/namespaces/servicebus-nsclimdvj\",\"name\":\"servicebus-nsclimdvj\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"{tag1\":\"value1}\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-nsclimdvj\",\"serviceBusEndpoint\":\"https://servicebus-nsclimdvj.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-28T19:41:42.5700344Z\",\"updatedAt\":\"2022-07-01T20:13:49.7569297Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc3akwp/providers/Microsoft.ServiceBus/namespaces/namespaceNamek15sa7\",\"name\":\"namespaceNamek15sa7\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamek15sa7\",\"serviceBusEndpoint\":\"https://namespaceNamek15sa7.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-23T10:33:09.9134035Z\",\"updatedAt\":\"2022-11-23T10:33:53.6434673Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/namespaceV2syp0gq\",\"name\":\"namespaceV2syp0gq\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2syp0gq\",\"serviceBusEndpoint\":\"https://namespaceV2syp0gq.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-04T09:16:20.2786805Z\",\"updatedAt\":\"2024-03-04T09:16:23.1380768Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jagstest/providers/Microsoft.ServiceBus/namespaces/jagsPMmintls\",\"name\":\"jagsPMmintls\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:jagspmmintls\",\"serviceBusEndpoint\":\"https://jagsPMmintls.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-28T19:42:35.786006Z\",\"updatedAt\":\"2022-07-01T20:16:02.7964931Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc9psbq/providers/Microsoft.ServiceBus/namespaces/namespaceV2gqx7eh\",\"name\":\"namespaceV2gqx7eh\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2gqx7eh\",\"serviceBusEndpoint\":\"https://namespaceV2gqx7eh.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-10T17:39:42.0654707Z\",\"updatedAt\":\"2023-02-10T17:40:25.8819279Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix\",\"name\":\"namespaceNamep0j7ix\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamep0j7ix\",\"serviceBusEndpoint\":\"https://namespaceNamep0j7ix.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:44.9721416Z\",\"updatedAt\":\"2024-04-30T05:05:47.8845766Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testvinsurg712/providers/Microsoft.ServiceBus/namespaces/testvinsunseastusstd1\",\"name\":\"testvinsunseastusstd1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testvinsunseastusstd1\",\"serviceBusEndpoint\":\"https://testvinsunseastusstd1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-07-12T23:29:32.611628Z\",\"updatedAt\":\"2023-07-12T23:30:16.5962022Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc9psbq/providers/Microsoft.ServiceBus/namespaces/primaryNS6bfi8t\",\"name\":\"primaryNS6bfi8t\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primaryns6bfi8t\",\"serviceBusEndpoint\":\"https://primaryNS6bfi8t.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-10T17:25:08.9196971Z\",\"updatedAt\":\"2023-02-10T17:25:52.4129754Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/pablorod_new/providers/Microsoft.ServiceBus/namespaces/pablorod-suscription-rules-v2\",\"name\":\"pablorod-suscription-rules-v2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:pablorod-suscription-rules-v2\",\"serviceBusEndpoint\":\"https://pablorod-suscription-rules-v2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-28T21:24:03.9050498Z\",\"updatedAt\":\"2022-12-28T21:24:47.2023828Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/shsama-rg/providers/Microsoft.ServiceBus/namespaces/shsama-sb-basic\",\"name\":\"shsama-sb-basic\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:shsama-sb-basic\",\"serviceBusEndpoint\":\"https://shsama-sb-basic.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-07-14T17:21:51.2293166Z\",\"updatedAt\":\"2023-07-14T17:22:33.9389723Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np\",\"name\":\"namespaceNameg2d9np\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameg2d9np\",\"serviceBusEndpoint\":\"https://namespaceNameg2d9np.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:44.8002388Z\",\"updatedAt\":\"2024-04-30T05:06:23.690171Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/namespaceV3xgl2om\",\"name\":\"namespaceV3xgl2om\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3xgl2om\",\"serviceBusEndpoint\":\"https://namespaceV3xgl2om.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-04T09:16:57.0767875Z\",\"updatedAt\":\"2024-03-04T10:02:17.4934483Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest6a5ioc/providers/Microsoft.ServiceBus/namespaces/primaryNSfjarv9\",\"name\":\"primaryNSfjarv9\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsfjarv9\",\"serviceBusEndpoint\":\"https://primaryNSfjarv9.servicebus.windows.net:443/\",\"alternateName\":\"postMigration16it5x\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-13T06:16:32.4273613Z\",\"updatedAt\":\"2024-02-16T01:27:22.8129171Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/namespaceNamelm5sgq\",\"name\":\"namespaceNamelm5sgq\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamelm5sgq\",\"serviceBusEndpoint\":\"https://namespaceNamelm5sgq.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-04T08:57:43.4130449Z\",\"updatedAt\":\"2024-03-04T10:04:34.0313474Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_networkteenbwgqgyyl2y6iy7uyajvcvzeffcawclhjplzvgypwqep53ptcz56k/providers/Microsoft.ServiceBus/namespaces/servicebus-nscligk4i\",\"name\":\"servicebus-nscligk4i\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"{tag1\":\"value1}\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-nscligk4i\",\"serviceBusEndpoint\":\"https://servicebus-nscligk4i.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-29T12:39:57.4290855Z\",\"updatedAt\":\"2022-07-01T21:58:43.5950617Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/namespaceV416isnr\",\"name\":\"namespaceV416isnr\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev416isnr\",\"serviceBusEndpoint\":\"https://namespaceV416isnr.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-04T09:17:35.8975653Z\",\"updatedAt\":\"2024-03-04T10:01:47.2675652Z\"},\"identity\":{\"principalId\":\"69c48834-cdda-44fb-b186-482b565e0758\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":16}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/primaryNSr5o0yh\",\"name\":\"primaryNSr5o0yh\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsr5o0yh\",\"serviceBusEndpoint\":\"https://primaryNSr5o0yh.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-04T08:57:43.4286248Z\",\"updatedAt\":\"2024-03-04T09:48:16.1565855Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/anway/providers/Microsoft.ServiceBus/namespaces/cmktest\",\"name\":\"cmktest\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"cmkkey\",\"keyVaultUri\":\"https://anwaykveus.vault.azure.net\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:cmktest\",\"serviceBusEndpoint\":\"https://cmktest.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-04T20:43:51.2755663Z\",\"updatedAt\":\"2024-04-18T20:47:31.4544353Z\"},\"identity\":{\"principalId\":\"73fe4c96-eb6a-4dc1-8f77-69243c4721a4\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest3gl8u0/providers/Microsoft.ServiceBus/namespaces/primaryNSut8xa0\",\"name\":\"primaryNSut8xa0\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsut8xa0\",\"serviceBusEndpoint\":\"https://primaryNSut8xa0.servicebus.windows.net:443/\",\"alternateName\":\"postMigrationulz9q8\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-10T18:33:19.854114Z\",\"updatedAt\":\"2024-02-16T01:27:22.8129171Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-EastUS/providers/Microsoft.ServiceBus/namespaces/anway-bl-vaz40001\",\"name\":\"anway-bl-vaz40001\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:anway-bl-vaz40001\",\"serviceBusEndpoint\":\"https://anway-bl-vaz40001.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-06-12T18:47:35.2292862Z\",\"updatedAt\":\"2024-02-06T22:48:42.8035689Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":4}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/dorothytest/providers/Microsoft.ServiceBus/namespaces/standardregressiontest\",\"name\":\"standardregressiontest\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:standardregressiontest\",\"serviceBusEndpoint\":\"https://standardregressiontest.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-30T01:24:56.3582525Z\",\"updatedAt\":\"2022-07-02T01:24:37.2031797Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/namespaceV6psbrf2\",\"name\":\"namespaceV6psbrf2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6psbrf2\",\"serviceBusEndpoint\":\"https://namespaceV6psbrf2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-04T09:56:10.6105399Z\",\"updatedAt\":\"2024-03-04T09:57:35.4418892Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/test-migration/providers/Microsoft.ServiceBus/namespaces/namespace081\",\"name\":\"namespace081\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace081\",\"serviceBusEndpoint\":\"https://namespace081.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-14T11:33:46.2806758Z\",\"updatedAt\":\"2024-03-14T11:34:39.3173348Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/shsama-rg/providers/Microsoft.ServiceBus/namespaces/shsama-jms-geo-eus\",\"name\":\"shsama-jms-geo-eus\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:shsama-jms-geo-eus\",\"serviceBusEndpoint\":\"https://shsama-jms-geo-eus.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-09T04:22:56.0943711Z\",\"updatedAt\":\"2024-02-16T01:27:22.8285412Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/vinsutestmigrationrg95/providers/Microsoft.ServiceBus/namespaces/vinsutestmigrationstd\",\"name\":\"vinsutestmigrationstd\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:vinsutestmigrationstd\",\"serviceBusEndpoint\":\"https://vinsutestmigrationstd.servicebus.windows.net:443/\",\"alternateName\":\"vinsutestmigrationstdprev\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-09-05T22:18:40.8601279Z\",\"updatedAt\":\"2023-09-05T22:45:23.6464104Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/shsama-rg/providers/Microsoft.ServiceBus/namespaces/shsama-test-eus\",\"name\":\"shsama-test-eus\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:shsama-test-eus\",\"serviceBusEndpoint\":\"https://shsama-test-eus.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-08T00:53:18.7513429Z\",\"updatedAt\":\"2023-12-08T00:54:41.3215262Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ServiceBusDemo/providers/Microsoft.ServiceBus/namespaces/servicebuslocalstresstestpremium\",\"name\":\"servicebuslocalstresstestpremium\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebuslocalstresstestpremium\",\"serviceBusEndpoint\":\"https://servicebuslocalstresstestpremium.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-27T23:48:21.8906451Z\",\"updatedAt\":\"2024-03-27T23:49:15.743309Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/namespaceV5hbmvuo\",\"name\":\"namespaceV5hbmvuo\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-6xcrdo-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-6xcrdo-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-6xcrdo-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-6xcrdo-msi1\"}},{\"keyName\":\"key4\",\"keyVaultUri\":\"https://sb-ps-6xcrdo-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-6xcrdo-msi1\"}}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5hbmvuo\",\"serviceBusEndpoint\":\"https://namespaceV5hbmvuo.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-04T09:19:17.6484645Z\",\"updatedAt\":\"2024-03-04T09:52:30.0050503Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-6xcrdo-msi1\":{\"clientId\":\"c4711080-1964-4479-b0e9-8d8c859dd57c\",\"principalId\":\"64a1501b-4407-4bb5-85bd-7d4e73eb4535\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-6xcrdo-msi2\":{\"clientId\":\"d921e9e6-07cd-4f68-a6c2-e2c7a253c4d3\",\"principalId\":\"5e17a40f-cf51-425e-ab4a-40ea4b466463\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-synthetics/providers/Microsoft.ServiceBus/namespaces/synthetics-sb-ns\",\"name\":\"synthetics-sb-ns\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"jms-for\":\"cache\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:synthetics-sb-ns\",\"serviceBusEndpoint\":\"https://synthetics-sb-ns.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-29T12:40:40.3481843Z\",\"updatedAt\":\"2022-07-08T18:29:10.8080802Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Ardsouza-MoveTest-WestEurope-Source-1/providers/Microsoft.ServiceBus/namespaces/spsbusns08043\",\"name\":\"spsbusns08043\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:spsbusns08043\",\"serviceBusEndpoint\":\"https://spsbusns08043.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-25T01:13:18.7781138Z\",\"updatedAt\":\"2022-07-01T18:30:55.8085934Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsqi3or6\",\"serviceBusEndpoint\":\"https://primaryNSqi3or6.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:44.9565151Z\",\"updatedAt\":\"2024-04-30T05:05:47.8063512Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sbmessagingrg/providers/Microsoft.ServiceBus/namespaces/testpremiumns\",\"name\":\"testpremiumns\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testpremiumns\",\"serviceBusEndpoint\":\"https://testpremiumns.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-12T22:57:06.4977445Z\",\"updatedAt\":\"2023-12-12T22:57:51.6813107Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-eldert-pg/providers/Microsoft.ServiceBus/namespaces/sb-eldert-pg\",\"name\":\"sb-eldert-pg\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-eldert-pg\",\"serviceBusEndpoint\":\"https://sb-eldert-pg.servicebus.windows.net:443/\",\"alternateName\":\"sb-eldert-pg-standard\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-18T00:07:44.5054993Z\",\"updatedAt\":\"2022-06-23T21:29:03.2119264Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ServiceBusDemo/providers/Microsoft.ServiceBus/namespaces/stresstestlocalrunstd\",\"name\":\"stresstestlocalrunstd\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:stresstestlocalrunstd\",\"serviceBusEndpoint\":\"https://stresstestlocalrunstd.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-15T22:13:47.4654052Z\",\"updatedAt\":\"2024-02-15T22:14:32.1761532Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sbmessagingrg/providers/Microsoft.ServiceBus/namespaces/testingrestnamespace\",\"name\":\"testingrestnamespace\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testingrestnamespace\",\"serviceBusEndpoint\":\"https://testingrestnamespace.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-12T01:32:10.0516954Z\",\"updatedAt\":\"2023-12-12T01:32:52.9658514Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/skarri-cmk/providers/Microsoft.ServiceBus/namespaces/skarri-sb-network\",\"name\":\"skarri-sb-network\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:skarri-sb-network\",\"serviceBusEndpoint\":\"https://skarri-sb-network.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-14T16:40:15.6776167Z\",\"updatedAt\":\"2024-02-14T16:41:40.9004499Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.ServiceBus/namespaces/TestSBSDK130108\",\"name\":\"TestSBSDK130108\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testsbsdk130108\",\"serviceBusEndpoint\":\"https://TestSBSDK130108.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-08T23:00:42.2506917Z\",\"updatedAt\":\"2024-04-04T16:08:05.8972081Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/servicebuscrirg/providers/Microsoft.ServiceBus/namespaces/servicebuscritesting\",\"name\":\"servicebuscritesting\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebuscritesting\",\"serviceBusEndpoint\":\"https://servicebuscritesting.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-05T21:41:33.9884605Z\",\"updatedAt\":\"2024-03-05T21:42:26.5791797Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGName-5648/providers/Microsoft.ServiceBus/namespaces/Namespace1-1879\",\"name\":\"Namespace1-1879\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus2\",\"tags\":{\"Tag1\":\"Tag1Value\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace1-1879\",\"serviceBusEndpoint\":\"https://Namespace1-1879.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-25T18:02:09.9966098Z\",\"updatedAt\":\"2022-06-25T18:02:53.6788809Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sbmessagingrg/providers/Microsoft.ServiceBus/namespaces/sbmessaging-standard\",\"name\":\"sbmessaging-standard\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sbmessaging-standard\",\"serviceBusEndpoint\":\"https://sbmessaging-standard.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-06T19:41:02.1548582Z\",\"updatedAt\":\"2023-11-06T19:41:47.3489621Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/TestDataDRPPG/providers/Microsoft.ServiceBus/namespaces/TestPremSBDataDRNS0104\",\"name\":\"TestPremSBDataDRNS0104\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testpremsbdatadrns0104\",\"serviceBusEndpoint\":\"https://TestPremSBDataDRNS0104.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-05T00:53:54.1066644Z\",\"updatedAt\":\"2024-01-05T00:55:29.6885548Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-IsraelCentral/providers/Microsoft.ServiceBus/namespaces/fr-israel-sbstd\",\"name\":\"fr-israel-sbstd\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"israelcentral\",\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:fr-israel-sbstd\",\"serviceBusEndpoint\":\"https://fr-israel-sbstd.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-06-29T08:42:21.461423Z\",\"updatedAt\":\"2023-06-29T08:42:21.461423Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-ItalyNorth/providers/Microsoft.ServiceBus/namespaces/ardsouza-ITN-VAZ00001-1\",\"name\":\"ardsouza-ITN-VAZ00001-1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"italynorth\",\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-itn-vaz00001-1\",\"serviceBusEndpoint\":\"https://ardsouza-ITN-VAZ00001-1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-19T21:50:07.2019669Z\",\"updatedAt\":\"2023-05-19T21:50:53.3586264Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.ServiceBus/namespaces/basic4968\",\"name\":\"basic4968\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"italynorth\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:basic4968\",\"serviceBusEndpoint\":\"https://basic4968.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-08-20T06:19:19.155952Z\",\"updatedAt\":\"2023-08-20T06:20:04.0483354Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.ServiceBus/namespaces/basic4970\",\"name\":\"basic4970\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"italynorth\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:basic4970\",\"serviceBusEndpoint\":\"https://basic4970.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-08-20T06:21:07.4324771Z\",\"updatedAt\":\"2023-08-20T06:21:54.4706636Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.ServiceBus/namespaces/framborg-mxc-sbs\",\"name\":\"framborg-mxc-sbs\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"mexicocentral\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:framborg-mxc-sbs\",\"serviceBusEndpoint\":\"https://framborg-mxc-sbs.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-31T03:47:49.0559164Z\",\"updatedAt\":\"2023-10-31T03:47:57.2276614Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/KarenTesting/providers/Microsoft.ServiceBus/namespaces/sm2TestStandVmss\",\"name\":\"sm2TestStandVmss\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"mexicocentral\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sm2teststandvmss\",\"serviceBusEndpoint\":\"https://sm2TestStandVmss.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-24T01:08:18.7140556Z\",\"updatedAt\":\"2024-04-24T07:05:02.5828726Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationh764zxsz7zmshbhevzjfxvdehgp5g2gc5eabpwdhy5rcqdwl6mgnks/providers/Microsoft.ServiceBus/namespaces/sb-pre-nscliv3edwnxd\",\"name\":\"sb-pre-nscliv3edwnxd\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-pre-nscliv3edwnxd\",\"serviceBusEndpoint\":\"https://sb-pre-nscliv3edwnxd.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T11:20:47.3701778Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationgkxbhiyuychyewd4athlvz73tjjrf3e4ivqwm33jbpq5ztn3ed4jad/providers/Microsoft.ServiceBus/namespaces/sb-pre-nscliptizjoaa\",\"name\":\"sb-pre-nscliptizjoaa\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-pre-nscliptizjoaa\",\"serviceBusEndpoint\":\"https://sb-pre-nscliptizjoaa.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T09:07:40.522302Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationti3pyun7wnva3zwii5kbvv2ykhzmjk2ehjbyd553r5a5c7cmjpn7m5/providers/Microsoft.ServiceBus/namespaces/sb-pre-nscliixenlvu6\",\"name\":\"sb-pre-nscliixenlvu6\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-pre-nscliixenlvu6\",\"serviceBusEndpoint\":\"https://sb-pre-nscliixenlvu6.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T06:55:43.5655987Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migration5eezamk36l5j3kz2ezhtesfz65sdngon5g4c5swqfmx5re5bx2imnf/providers/Microsoft.ServiceBus/namespaces/sb-pre-nscliwot7f2kb\",\"name\":\"sb-pre-nscliwot7f2kb\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-pre-nscliwot7f2kb\",\"serviceBusEndpoint\":\"https://sb-pre-nscliwot7f2kb.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T07:03:22.5200687Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationgwiklflupjaz34l5qdwtajzgbpdugmzilw23kszwuz6phccvl7rfcc/providers/Microsoft.ServiceBus/namespaces/sb-pre-nsclisnu35eog\",\"name\":\"sb-pre-nsclisnu35eog\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-pre-nsclisnu35eog\",\"serviceBusEndpoint\":\"https://sb-pre-nsclisnu35eog.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T10:49:24.78549Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps8383/providers/Microsoft.ServiceBus/namespaces/ServiceBus-PRENamespace-8744\",\"name\":\"ServiceBus-PRENamespace-8744\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-prenamespace-8744\",\"serviceBusEndpoint\":\"https://ServiceBus-PRENamespace-8744.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-05-25T18:20:57.5767578Z\",\"updatedAt\":\"2023-12-05T20:07:45.1856044Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migration5io3sa5ajwzrzqnvstbmaj6wk565ed4f3suvlf5arqkue7douc3ej5/providers/Microsoft.ServiceBus/namespaces/sb-pre-nsclibwcbek2k\",\"name\":\"sb-pre-nsclibwcbek2k\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-pre-nsclibwcbek2k\",\"serviceBusEndpoint\":\"https://sb-pre-nsclibwcbek2k.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T10:42:01.6600652Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationdoxqfkzqz3sd2v7dfkto6uiqf3uzbrozq36cx2lyrkf35qqjonsfvq/providers/Microsoft.ServiceBus/namespaces/sb-pre-nsclihdqtn2m3\",\"name\":\"sb-pre-nsclihdqtn2m3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-pre-nsclihdqtn2m3\",\"serviceBusEndpoint\":\"https://sb-pre-nsclihdqtn2m3.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T11:05:09.5936025Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migration2di4ymwkzkfj73xqtuuvx6s5la5chn57aqs346jyw4s6ap6hijc2cx/providers/Microsoft.ServiceBus/namespaces/sb-pre-nsclilfuzcmk2\",\"name\":\"sb-pre-nsclilfuzcmk2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-pre-nsclilfuzcmk2\",\"serviceBusEndpoint\":\"https://sb-pre-nsclilfuzcmk2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T10:28:43.0346938Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationwpmp3ndtkmeamgj2u26xlptka4h4qp7in7tp5ntcqfqijjme5s5c6g/providers/Microsoft.ServiceBus/namespaces/sb-pre-nsclil4ikiywf\",\"name\":\"sb-pre-nsclil4ikiywf\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-pre-nsclil4ikiywf\",\"serviceBusEndpoint\":\"https://sb-pre-nsclil4ikiywf.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T11:43:10.4373666Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps51/providers/Microsoft.ServiceBus/namespaces/ServiceBus-PRENamespace-9080\",\"name\":\"ServiceBus-PRENamespace-9080\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-prenamespace-9080\",\"serviceBusEndpoint\":\"https://ServiceBus-PRENamespace-9080.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-16T05:33:33.9433993Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps5206/providers/Microsoft.ServiceBus/namespaces/ServiceBus-PRENamespace-3686\",\"name\":\"ServiceBus-PRENamespace-3686\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-prenamespace-3686\",\"serviceBusEndpoint\":\"https://ServiceBus-PRENamespace-3686.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-15T04:48:55.4940546Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationgo64dh47qainaf7qucvghm77jfde5w4xzbtfkhpw4lg3h26hmovw6r/providers/Microsoft.ServiceBus/namespaces/sb-pre-nscliozip4wkh\",\"name\":\"sb-pre-nscliozip4wkh\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-pre-nscliozip4wkh\",\"serviceBusEndpoint\":\"https://sb-pre-nscliozip4wkh.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T06:40:40.8595726Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/suparame-rg/providers/Microsoft.ServiceBus/namespaces/SuparameEventTest\",\"name\":\"SuparameEventTest\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:suparameeventtest\",\"serviceBusEndpoint\":\"https://SuparameEventTest.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-28T01:30:54.8595762Z\",\"updatedAt\":\"2022-10-28T01:31:39.7621001Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationeqtoed6xgavneelsmwausqqhcvr24gcbjdxth6uopazwxilwdp3w7m/providers/Microsoft.ServiceBus/namespaces/sb-pre-nsclikwlbpfe2\",\"name\":\"sb-pre-nsclikwlbpfe2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-pre-nsclikwlbpfe2\",\"serviceBusEndpoint\":\"https://sb-pre-nsclikwlbpfe2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T07:41:12.8750974Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationsculekczk6rbzy3zn3er3z3nyjgxnqecgsdiwhyqmvbfaqgr2e4isn/providers/Microsoft.ServiceBus/namespaces/sb-pre-nscliovi7tnfs\",\"name\":\"sb-pre-nscliovi7tnfs\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-pre-nscliovi7tnfs\",\"serviceBusEndpoint\":\"https://sb-pre-nscliovi7tnfs.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T06:32:38.235762Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PS-Testing/providers/Microsoft.ServiceBus/namespaces/Namespace1-7974\",\"name\":\"Namespace1-7974\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northeurope\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace1-7974\",\"serviceBusEndpoint\":\"https://Namespace1-7974.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-25T08:01:39.9152083Z\",\"updatedAt\":\"2022-09-25T08:07:58.3425988Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PS-Testing/providers/Microsoft.ServiceBus/namespaces/Namespace1-6359\",\"name\":\"Namespace1-6359\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northeurope\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://ps-test-kv1.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://ps-test-kv1.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key1\",\"keyVaultUri\":\"https://ps-test-kv2.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace1-6359\",\"serviceBusEndpoint\":\"https://Namespace1-6359.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-25T08:17:21.9588872Z\",\"updatedAt\":\"2024-01-31T19:07:54.7506401Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PS-Testing/providers/Microsoft.ServiceBus/namespaces/Namespace2-5304\",\"name\":\"Namespace2-5304\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northeurope\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://ps-test-kv1.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://ps-test-kv1.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace2-5304\",\"serviceBusEndpoint\":\"https://Namespace2-5304.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-25T08:08:42.699394Z\",\"updatedAt\":\"2024-01-31T19:07:54.7194404Z\"},\"identity\":{\"principalId\":\"acb4ce9b-2730-494d-a18d-a8be0420bdcb\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-NorthEurope/providers/Microsoft.ServiceBus/namespaces/vmsscpu\",\"name\":\"vmsscpu\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northeurope\",\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:vmsscpu\",\"serviceBusEndpoint\":\"https://vmsscpu.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-29T18:16:47.6173232Z\",\"updatedAt\":\"2024-02-29T18:18:14.2399465Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.ServiceBus/namespaces/testPSStandard\",\"name\":\"testPSStandard\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"northeurope\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testpsstandard\",\"serviceBusEndpoint\":\"https://testPSStandard.servicebus.windows.net:443/\",\"alternateName\":\"testSBPostMigrationName\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-17T12:29:23.1842017Z\",\"updatedAt\":\"2024-01-31T19:10:33.7887309Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Kala-test/providers/Microsoft.ServiceBus/namespaces/kala-postmigr-sbtest1\",\"name\":\"kala-postmigr-sbtest1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"norwayeast\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kala-postmigr-sbtest1\",\"serviceBusEndpoint\":\"https://kala-postmigr-sbtest1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-29T23:32:22.0692604Z\",\"updatedAt\":\"2024-03-29T23:32:26.2098427Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/shsama-rg/providers/Microsoft.ServiceBus/namespaces/shsama-sbtest-norwayeast-migtation2\",\"name\":\"shsama-sbtest-norwayeast-migtation2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"norwayeast\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:shsama-sbtest-norwayeast-migtation2\",\"serviceBusEndpoint\":\"https://shsama-sbtest-norwayeast-migtation2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-30T02:19:28.8314227Z\",\"updatedAt\":\"2024-03-30T02:19:33.5976684Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-testrg1/providers/Microsoft.ServiceBus/namespaces/ardsouza-polandcentral-std-12-21-22\",\"name\":\"ardsouza-polandcentral-std-12-21-22\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"polandcentral\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-polandcentral-std-12-21-22\",\"serviceBusEndpoint\":\"https://ardsouza-polandcentral-std-12-21-22.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-22T02:37:40.7350745Z\",\"updatedAt\":\"2022-12-22T02:38:29.1404032Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/anqyan-rg/providers/Microsoft.ServiceBus/namespaces/anqyan-std-vmss\",\"name\":\"anqyan-std-vmss\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"polandcentral\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:anqyan-std-vmss\",\"serviceBusEndpoint\":\"https://anqyan-std-vmss.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-06-15T22:08:07.6458619Z\",\"updatedAt\":\"2023-06-15T22:08:56.9350848Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-test/providers/Microsoft.ServiceBus/namespaces/ardsouza-SBNS-std-2-14-2023-p-1\",\"name\":\"ardsouza-SBNS-std-2-14-2023-p-1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"polandcentral\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-sbns-std-2-14-2023-p-1\",\"serviceBusEndpoint\":\"https://ardsouza-SBNS-std-2-14-2023-p-1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-15T01:44:36.9583507Z\",\"updatedAt\":\"2023-02-15T01:45:25.3062551Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationwpmp3ndtkmeamgj2u26xlptka4h4qp7in7tp5ntcqfqijjme5s5c6g/providers/Microsoft.ServiceBus/namespaces/sb-pre-nsclix6xolgzk\",\"name\":\"sb-pre-nsclix6xolgzk\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-pre-nsclix6xolgzk\",\"serviceBusEndpoint\":\"https://sb-pre-nsclix6xolgzk.servicebus.windows.net:443/\",\"alternateName\":\"clipostmigrationnmkz\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T11:42:05.3361521Z\",\"updatedAt\":\"2024-01-26T01:01:57.6996904Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps5206/providers/Microsoft.ServiceBus/namespaces/ServiceBus-STDNamespace-6102\",\"name\":\"ServiceBus-STDNamespace-6102\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-stdnamespace-6102\",\"serviceBusEndpoint\":\"https://ServiceBus-STDNamespace-6102.servicebus.windows.net:443/\",\"alternateName\":\"PostMigration-Name-8545\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-15T04:47:52.2948676Z\",\"updatedAt\":\"2024-01-26T01:01:57.7153189Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/secondaryNSmb3t1u\",\"name\":\"secondaryNSmb3t1u\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynsmb3t1u\",\"serviceBusEndpoint\":\"https://secondaryNSmb3t1u.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-04T08:57:43.6791956Z\",\"updatedAt\":\"2024-03-04T10:15:26.0607149Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestel6pb5/providers/Microsoft.ServiceBus/namespaces/secondaryNS4qrb17\",\"name\":\"secondaryNS4qrb17\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondaryns4qrb17\",\"serviceBusEndpoint\":\"https://secondaryNS4qrb17.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-23T12:03:35.3043089Z\",\"updatedAt\":\"2024-01-26T01:01:57.5903136Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationgkxbhiyuychyewd4athlvz73tjjrf3e4ivqwm33jbpq5ztn3ed4jad/providers/Microsoft.ServiceBus/namespaces/sb-std-nsclit667brb7\",\"name\":\"sb-std-nsclit667brb7\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-std-nsclit667brb7\",\"serviceBusEndpoint\":\"https://sb-std-nsclit667brb7.servicebus.windows.net:443/\",\"alternateName\":\"clipostmigrationn346\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T09:06:34.8755023Z\",\"updatedAt\":\"2024-01-26T01:01:57.6996904Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest6a5ioc/providers/Microsoft.ServiceBus/namespaces/secondaryNS6zn7s8\",\"name\":\"secondaryNS6zn7s8\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondaryns6zn7s8\",\"serviceBusEndpoint\":\"https://secondaryNS6zn7s8.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-13T06:16:33.0795294Z\",\"updatedAt\":\"2024-01-26T01:01:57.7309421Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/secondaryNSyag4fo\",\"name\":\"secondaryNSyag4fo\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynsyag4fo\",\"serviceBusEndpoint\":\"https://secondaryNSyag4fo.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-04T08:57:43.5698263Z\",\"updatedAt\":\"2024-03-04T09:49:51.5632525Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migration5eezamk36l5j3kz2ezhtesfz65sdngon5g4c5swqfmx5re5bx2imnf/providers/Microsoft.ServiceBus/namespaces/sb-std-nsclirfsecojc\",\"name\":\"sb-std-nsclirfsecojc\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-std-nsclirfsecojc\",\"serviceBusEndpoint\":\"https://sb-std-nsclirfsecojc.servicebus.windows.net:443/\",\"alternateName\":\"clipostmigrationwjzz\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T07:02:15.6412169Z\",\"updatedAt\":\"2024-01-26T01:01:57.6996904Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest3gl8u0/providers/Microsoft.ServiceBus/namespaces/secondaryNSw9rzma\",\"name\":\"secondaryNSw9rzma\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynsw9rzma\",\"serviceBusEndpoint\":\"https://secondaryNSw9rzma.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-10T18:33:19.9474033Z\",\"updatedAt\":\"2024-01-26T01:01:57.7309421Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migration5io3sa5ajwzrzqnvstbmaj6wk565ed4f3suvlf5arqkue7douc3ej5/providers/Microsoft.ServiceBus/namespaces/sb-std-nscliakx5upva\",\"name\":\"sb-std-nscliakx5upva\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-std-nscliakx5upva\",\"serviceBusEndpoint\":\"https://sb-std-nscliakx5upva.servicebus.windows.net:443/\",\"alternateName\":\"clipostmigration2xdu\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T10:40:55.8364218Z\",\"updatedAt\":\"2024-01-26T01:01:57.6996904Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresto859up/providers/Microsoft.ServiceBus/namespaces/secondaryNSiqjvmr\",\"name\":\"secondaryNSiqjvmr\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynsiqjvmr\",\"serviceBusEndpoint\":\"https://secondaryNSiqjvmr.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-22T17:41:18.69702Z\",\"updatedAt\":\"2024-01-26T01:01:57.4028107Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationgo64dh47qainaf7qucvghm77jfde5w4xzbtfkhpw4lg3h26hmovw6r/providers/Microsoft.ServiceBus/namespaces/sb-std-nscli3d7brt2y\",\"name\":\"sb-std-nscli3d7brt2y\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-std-nscli3d7brt2y\",\"serviceBusEndpoint\":\"https://sb-std-nscli3d7brt2y.servicebus.windows.net:443/\",\"alternateName\":\"clipostmigrationv4hd\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T06:39:35.540099Z\",\"updatedAt\":\"2024-01-26T01:01:57.6996904Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migration2di4ymwkzkfj73xqtuuvx6s5la5chn57aqs346jyw4s6ap6hijc2cx/providers/Microsoft.ServiceBus/namespaces/sb-std-nscliahk23qf3\",\"name\":\"sb-std-nscliahk23qf3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-std-nscliahk23qf3\",\"serviceBusEndpoint\":\"https://sb-std-nscliahk23qf3.servicebus.windows.net:443/\",\"alternateName\":\"clipostmigrationgki6\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T10:27:37.4878936Z\",\"updatedAt\":\"2024-01-26T01:01:57.6996904Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationdoxqfkzqz3sd2v7dfkto6uiqf3uzbrozq36cx2lyrkf35qqjonsfvq/providers/Microsoft.ServiceBus/namespaces/sb-pre-nsclifmgwyxrh\",\"name\":\"sb-pre-nsclifmgwyxrh\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-pre-nsclifmgwyxrh\",\"serviceBusEndpoint\":\"https://sb-pre-nsclifmgwyxrh.servicebus.windows.net:443/\",\"alternateName\":\"clipostmigrationvres\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T11:04:04.1255486Z\",\"updatedAt\":\"2024-01-26T01:01:57.6996904Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps8383/providers/Microsoft.ServiceBus/namespaces/ServiceBus-STDNamespace-8049\",\"name\":\"ServiceBus-STDNamespace-8049\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-stdnamespace-8049\",\"serviceBusEndpoint\":\"https://ServiceBus-STDNamespace-8049.servicebus.windows.net:443/\",\"alternateName\":\"PostMigration-Name-3646\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-10T22:03:31.60737Z\",\"updatedAt\":\"2024-01-26T01:01:57.7153189Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc9psbq/providers/Microsoft.ServiceBus/namespaces/namespaceV3s5q0n2\",\"name\":\"namespaceV3s5q0n2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3s5q0n2\",\"serviceBusEndpoint\":\"https://namespaceV3s5q0n2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-10T17:40:46.2327122Z\",\"updatedAt\":\"2023-02-10T17:41:29.1089653Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationgwiklflupjaz34l5qdwtajzgbpdugmzilw23kszwuz6phccvl7rfcc/providers/Microsoft.ServiceBus/namespaces/sb-std-nscli37kpfecv\",\"name\":\"sb-std-nscli37kpfecv\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-std-nscli37kpfecv\",\"serviceBusEndpoint\":\"https://sb-std-nscli37kpfecv.servicebus.windows.net:443/\",\"alternateName\":\"clipostmigration7aa2\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T10:48:19.6021974Z\",\"updatedAt\":\"2024-01-26T01:01:57.6996904Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"name\":\"secondaryNSuegwsb\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynsuegwsb\",\"serviceBusEndpoint\":\"https://secondaryNSuegwsb.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.870939Z\",\"updatedAt\":\"2024-04-30T05:06:39.073288Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"name\":\"secondaryNSkhnx2q\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynskhnx2q\",\"serviceBusEndpoint\":\"https://secondaryNSkhnx2q.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:44.8084059Z\",\"updatedAt\":\"2024-04-30T05:06:36.8856713Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestc3akwp/providers/Microsoft.ServiceBus/namespaces/secondaryNSxg98uj\",\"name\":\"secondaryNSxg98uj\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynsxg98uj\",\"serviceBusEndpoint\":\"https://secondaryNSxg98uj.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-23T10:42:30.8900509Z\",\"updatedAt\":\"2022-11-23T10:45:03.1793995Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationsculekczk6rbzy3zn3er3z3nyjgxnqecgsdiwhyqmvbfaqgr2e4isn/providers/Microsoft.ServiceBus/namespaces/sb-std-nscli6p7zx6uw\",\"name\":\"sb-std-nscli6p7zx6uw\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-std-nscli6p7zx6uw\",\"serviceBusEndpoint\":\"https://sb-std-nscli6p7zx6uw.servicebus.windows.net:443/\",\"alternateName\":\"clipostmigrationje2w\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T06:31:31.211383Z\",\"updatedAt\":\"2024-01-26T01:01:57.7309421Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/SaglodhaRG/providers/Microsoft.ServiceBus/namespaces/BasicNS\",\"name\":\"BasicNS\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:basicns\",\"serviceBusEndpoint\":\"https://BasicNS.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-06T06:45:05.4396312Z\",\"updatedAt\":\"2023-04-06T06:45:49.7716597Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps51/providers/Microsoft.ServiceBus/namespaces/ServiceBus-STDNamespace-276\",\"name\":\"ServiceBus-STDNamespace-276\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-stdnamespace-276\",\"serviceBusEndpoint\":\"https://ServiceBus-STDNamespace-276.servicebus.windows.net:443/\",\"alternateName\":\"PostMigration-Name-9658\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-16T05:32:29.7527134Z\",\"updatedAt\":\"2024-01-26T01:01:57.7153189Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationh764zxsz7zmshbhevzjfxvdehgp5g2gc5eabpwdhy5rcqdwl6mgnks/providers/Microsoft.ServiceBus/namespaces/sb-pre-nsclidsadn7fx\",\"name\":\"sb-pre-nsclidsadn7fx\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-pre-nsclidsadn7fx\",\"serviceBusEndpoint\":\"https://sb-pre-nsclidsadn7fx.servicebus.windows.net:443/\",\"alternateName\":\"clipostmigration35d7\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T11:19:42.0696133Z\",\"updatedAt\":\"2024-01-26T01:01:57.6996904Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps7874/providers/Microsoft.ServiceBus/namespaces/ServiceBus-STDNamespace-81\",\"name\":\"ServiceBus-STDNamespace-81\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-stdnamespace-81\",\"serviceBusEndpoint\":\"https://ServiceBus-STDNamespace-81.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-25T16:29:39.6742128Z\",\"updatedAt\":\"2022-06-25T16:30:24.4041021Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationti3pyun7wnva3zwii5kbvv2ykhzmjk2ehjbyd553r5a5c7cmjpn7m5/providers/Microsoft.ServiceBus/namespaces/sb-std-nscliaabalsds\",\"name\":\"sb-std-nscliaabalsds\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-std-nscliaabalsds\",\"serviceBusEndpoint\":\"https://sb-std-nscliaabalsds.servicebus.windows.net:443/\",\"alternateName\":\"clipostmigration3f65\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T06:54:36.5997072Z\",\"updatedAt\":\"2024-01-26T01:01:57.6996904Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_migrationeqtoed6xgavneelsmwausqqhcvr24gcbjdxth6uopazwxilwdp3w7m/providers/Microsoft.ServiceBus/namespaces/sb-std-nsclifmrer52d\",\"name\":\"sb-std-nsclifmrer52d\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-std-nsclifmrer52d\",\"serviceBusEndpoint\":\"https://sb-std-nsclifmrer52d.servicebus.windows.net:443/\",\"alternateName\":\"clipostmigrationamhb\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T07:40:08.1293673Z\",\"updatedAt\":\"2024-01-26T01:01:57.6996904Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-test/providers/Microsoft.ServiceBus/namespaces/ardsouza-adam-test-2\",\"name\":\"ardsouza-adam-test-2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"uaenorth\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-adam-test-2\",\"serviceBusEndpoint\":\"https://ardsouza-adam-test-2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-25T18:27:34.8093045Z\",\"updatedAt\":\"2024-04-25T18:32:51.5085046Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-test/providers/Microsoft.ServiceBus/namespaces/ardsouza-adam-test\",\"name\":\"ardsouza-adam-test\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"uaenorth\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-adam-test\",\"serviceBusEndpoint\":\"https://ardsouza-adam-test.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-25T18:15:11.3514752Z\",\"updatedAt\":\"2024-04-25T18:16:14.9850302Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6064\",\"name\":\"sdk-Namespace-6064\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westcentralus\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-6064\",\"serviceBusEndpoint\":\"https://sdk-Namespace-6064.servicebus.windows.net:443/\",\"alternateName\":\"sdk-PostMigration-4665\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-05-16T23:03:13.268341Z\",\"updatedAt\":\"2023-12-04T20:04:25.202856Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7912\",\"name\":\"sdk-Namespace-7912\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westcentralus\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-7912\",\"serviceBusEndpoint\":\"https://sdk-Namespace-7912.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-05-17T18:14:19.8230335Z\",\"updatedAt\":\"2023-12-04T20:04:25.1872282Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/abhigarg-publicnetworkaccess-cbn/providers/Microsoft.ServiceBus/namespaces/ardsouza-1-10-2024-namespaceskuvalidation\",\"name\":\"ardsouza-1-10-2024-namespaceskuvalidation\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-1-10-2024-namespaceskuvalidation\",\"serviceBusEndpoint\":\"https://ardsouza-1-10-2024-namespaceskuvalidation.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-11T02:01:03.5622177Z\",\"updatedAt\":\"2024-01-11T02:01:07.5154051Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-5506\",\"name\":\"sdk-Namespace-5506\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westcentralus\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-namespace-5506\",\"serviceBusEndpoint\":\"https://sdk-Namespace-5506.servicebus.windows.net:443/\",\"alternateName\":\"sdk-PostMigration-5506\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-05-16T23:03:13.2527129Z\",\"updatedAt\":\"2022-05-19T17:14:23.9709598Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.ServiceBus/namespaces/davadhani3026\",\"name\":\"davadhani3026\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westeurope\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani3026\",\"serviceBusEndpoint\":\"https://davadhani3026.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-12T10:48:42.4629858Z\",\"updatedAt\":\"2023-12-12T10:49:28.469854Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jfgSBRsrcGrp1/providers/Microsoft.ServiceBus/namespaces/jfgBscNmpsc1\",\"name\":\"jfgBscNmpsc1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westeurope\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:jfgbscnmpsc1\",\"serviceBusEndpoint\":\"https://jfgBscNmpsc1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-22T18:14:12.8659366Z\",\"updatedAt\":\"2023-03-22T18:15:04.1369302Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jfgSBRsrcGrp1/providers/Microsoft.ServiceBus/namespaces/jfgSBNmspc1\",\"name\":\"jfgSBNmspc1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westeurope\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:jfgsbnmspc1\",\"serviceBusEndpoint\":\"https://jfgSBNmspc1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-09T22:57:08.592498Z\",\"updatedAt\":\"2023-03-09T22:57:55.0779659Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/suparame-rg/providers/Microsoft.ServiceBus/namespaces/SuparameSbusTest\",\"name\":\"SuparameSbusTest\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:suparamesbustest\",\"serviceBusEndpoint\":\"https://SuparameSbusTest.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-10T02:29:57.3676953Z\",\"updatedAt\":\"2022-06-10T02:29:57.3676953Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGName-2450/providers/Microsoft.ServiceBus/namespaces/Namespace-9959\",\"name\":\"Namespace-9959\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace-9959\",\"serviceBusEndpoint\":\"https://Namespace-9959.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-02T10:43:49.7401268Z\",\"updatedAt\":\"2024-02-23T01:12:52.8670868Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-minimum-tls-sample/providers/Microsoft.ServiceBus/namespaces/sb-minimum-tls-sample\",\"name\":\"sb-minimum-tls-sample\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus\",\"tags\":{\"Owner\":\"Eldert Grootenboer\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-minimum-tls-sample\",\"serviceBusEndpoint\":\"https://sb-minimum-tls-sample.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T21:18:40.839113Z\",\"updatedAt\":\"2022-06-09T21:18:40.839113Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EHPerformanceTestingFramework/providers/Microsoft.ServiceBus/namespaces/performanceframeworkbroker\",\"name\":\"performanceframeworkbroker\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:performanceframeworkbroker\",\"serviceBusEndpoint\":\"https://performanceframeworkbroker.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-09-19T07:56:44.692459Z\",\"updatedAt\":\"2023-09-19T07:57:27.8038791Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-eldert-pg/providers/Microsoft.ServiceBus/namespaces/sb-eldert-pg-basic\",\"name\":\"sb-eldert-pg-basic\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-eldert-pg-basic\",\"serviceBusEndpoint\":\"https://sb-eldert-pg-basic.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-20T21:46:15.3387193Z\",\"updatedAt\":\"2024-02-20T21:46:58.5912982Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/suparame-rg/providers/Microsoft.ServiceBus/namespaces/SuparameNamespaceTest1\",\"name\":\"SuparameNamespaceTest1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:suparamenamespacetest1\",\"serviceBusEndpoint\":\"https://SuparameNamespaceTest1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-16T05:52:15.1832564Z\",\"updatedAt\":\"2022-12-16T05:53:00.183933Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.ServiceBus/namespaces/testSBARMTemplate\",\"name\":\"testSBARMTemplate\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testsbarmtemplate\",\"serviceBusEndpoint\":\"https://testSBARMTemplate.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-14T09:01:24.7124833Z\",\"updatedAt\":\"2024-02-23T01:23:46.7510623Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/anway/providers/Microsoft.ServiceBus/namespaces/dlqtestfordavid\",\"name\":\"dlqtestfordavid\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:dlqtestfordavid\",\"serviceBusEndpoint\":\"https://dlqtestfordavid.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-11T16:48:22.7563558Z\",\"updatedAt\":\"2023-04-11T16:58:13.9243033Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_sb_subscription6m27zc5rufs7xp34pis2phf5wfu2j7kk7lqieysmclma6iytq4r/providers/Microsoft.ServiceBus/namespaces/sb-nsclizscx2ebag64z\",\"name\":\"sb-nsclizscx2ebag64z\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-nsclizscx2ebag64z\",\"serviceBusEndpoint\":\"https://sb-nsclizscx2ebag64z.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-07T08:00:56.4710146Z\",\"updatedAt\":\"2023-02-07T08:01:39.3967793Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/geguirgu/providers/Microsoft.ServiceBus/namespaces/geguirgu-servicebus\",\"name\":\"geguirgu-servicebus\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:geguirgu-servicebus\",\"serviceBusEndpoint\":\"https://geguirgu-servicebus.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-28T17:31:07.7018234Z\",\"updatedAt\":\"2024-02-23T01:13:05.648582Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.ServiceBus/namespaces/recreate\",\"name\":\"recreate\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus\",\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:recreate\",\"serviceBusEndpoint\":\"https://recreate.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-10T21:40:30.4945103Z\",\"updatedAt\":\"2023-12-11T04:54:08.0288363Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/anway/providers/Microsoft.ServiceBus/namespaces/testvstsan2\",\"name\":\"testvstsan2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testvstsan2\",\"serviceBusEndpoint\":\"https://testvstsan2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-25T20:55:33.8867676Z\",\"updatedAt\":\"2024-02-25T20:56:25.9657291Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/anway/providers/Microsoft.ServiceBus/namespaces/testvstsan1\",\"name\":\"testvstsan1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testvstsan1\",\"serviceBusEndpoint\":\"https://testvstsan1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-25T20:55:31.6367998Z\",\"updatedAt\":\"2024-02-25T20:56:25.9657291Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/anway/providers/Microsoft.ServiceBus/namespaces/testvstsan3\",\"name\":\"testvstsan3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testvstsan3\",\"serviceBusEndpoint\":\"https://testvstsan3.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-25T20:55:35.746222Z\",\"updatedAt\":\"2024-02-25T20:56:52.3567074Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/anqyan-rg/providers/Microsoft.ServiceBus/namespaces/anqyan-std-cs\",\"name\":\"anqyan-std-cs\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:anqyan-std-cs\",\"serviceBusEndpoint\":\"https://anqyan-std-cs.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-19T18:31:15.6152972Z\",\"updatedAt\":\"2024-03-19T18:31:19.24127Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-test/providers/Microsoft.ServiceBus/namespaces/ardsouza-premiumnamespacetest-deleteme\",\"name\":\"ardsouza-premiumnamespacetest-deleteme\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-premiumnamespacetest-deleteme\",\"serviceBusEndpoint\":\"https://ardsouza-premiumnamespacetest-deleteme.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-11T05:01:57.6799557Z\",\"updatedAt\":\"2024-01-11T05:03:27.3033106Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/KarenTesting/providers/Microsoft.ServiceBus/namespaces/st2testpremVmss\",\"name\":\"st2testpremVmss\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:st2testpremvmss\",\"serviceBusEndpoint\":\"https://st2testpremVmss.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-18T23:21:14.6444569Z\",\"updatedAt\":\"2024-04-24T07:05:10.6934365Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-eldert-implementing-an-event-sourcing-strategy-on-azure/providers/Microsoft.ServiceBus/namespaces/sb-implementing-event-sourcing-strategy\",\"name\":\"sb-implementing-event-sourcing-strategy\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-implementing-event-sourcing-strategy\",\"serviceBusEndpoint\":\"https://sb-implementing-event-sourcing-strategy.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T20:28:20.0617256Z\",\"updatedAt\":\"2022-12-06T18:15:03.9465739Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-eldert-empower-your-azure-iac-with-bicep/providers/Microsoft.ServiceBus/namespaces/contoso-service-bus\",\"name\":\"contoso-service-bus\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:contoso-service-bus\",\"serviceBusEndpoint\":\"https://contoso-service-bus.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T20:28:22.4992557Z\",\"updatedAt\":\"2022-06-24T20:28:22.4992557Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AzureServiceBusInDepth/providers/Microsoft.ServiceBus/namespaces/simplesbmessaging\",\"name\":\"simplesbmessaging\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:simplesbmessaging\",\"serviceBusEndpoint\":\"https://simplesbmessaging.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-28T23:16:58.4116898Z\",\"updatedAt\":\"2023-12-28T23:17:43.5894886Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/v-carrue-powershelltest/providers/Microsoft.ServiceBus/namespaces/v-carrue-ns1\",\"name\":\"v-carrue-ns1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:v-carrue-ns1\",\"serviceBusEndpoint\":\"https://v-carrue-ns1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T23:46:28.8715332Z\",\"updatedAt\":\"2022-06-24T23:46:28.8715332Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/anqyan-rg/providers/Microsoft.ServiceBus/namespaces/anqyan-prem-westus2\",\"name\":\"anqyan-prem-westus2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:anqyan-prem-westus2\",\"serviceBusEndpoint\":\"https://anqyan-prem-westus2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-20T19:42:25.5081971Z\",\"updatedAt\":\"2024-03-13T22:30:24.9330976Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.ServiceBus/namespaces/SBTestPagination06060129\",\"name\":\"SBTestPagination06060129\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus3\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sbtestpagination06060129\",\"serviceBusEndpoint\":\"https://SBTestPagination06060129.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-29T23:28:16.2615671Z\",\"updatedAt\":\"2024-04-10T20:14:32.7743468Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jupachol-rg/providers/Microsoft.ServiceBus/namespaces/jupachol-std\",\"name\":\"jupachol-std\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus3\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:jupachol-std\",\"serviceBusEndpoint\":\"https://jupachol-std.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-20T22:34:20.8031202Z\",\"updatedAt\":\"2024-02-20T22:34:24.4596844Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-eldert-pg/providers/Microsoft.ServiceBus/namespaces/sb-eldert-pg-premium\",\"name\":\"sb-eldert-pg-premium\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus3\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sb-eldert-pg-premium\",\"serviceBusEndpoint\":\"https://sb-eldert-pg-premium.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-19T19:49:27.5808727Z\",\"updatedAt\":\"2024-03-20T17:29:19.0731486Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/suparame-rg/providers/Microsoft.ServiceBus/namespaces/ServiceBusStandardNSSuparme\",\"name\":\"ServiceBusStandardNSSuparme\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"westus3\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebusstandardnssuparme\",\"serviceBusEndpoint\":\"https://ServiceBusStandardNSSuparme.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-01-31T18:38:27.5382008Z\",\"updatedAt\":\"2023-09-18T19:02:02.0162724Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-CentralUSEUAP/providers/Microsoft.ServiceBus/namespaces/PROD-CDM-V00001-sb-std-test\",\"name\":\"PROD-CDM-V00001-sb-std-test\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centraluseuap\",\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:prod-cdm-v00001-sb-std-test\",\"serviceBusEndpoint\":\"https://PROD-CDM-V00001-sb-std-test.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-14T23:38:35.6725437Z\",\"updatedAt\":\"2023-03-14T23:39:18.6578755Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Kala-test/providers/Microsoft.ServiceBus/namespaces/kala-cdm-vmss-test-ns1\",\"name\":\"kala-cdm-vmss-test-ns1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kala-cdm-vmss-test-ns1\",\"serviceBusEndpoint\":\"https://kala-cdm-vmss-test-ns1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-20T22:34:19.3737826Z\",\"updatedAt\":\"2023-09-17T23:46:36.7358065Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/leandertestcanary/providers/Microsoft.ServiceBus/namespaces/leanderflagmismatch\",\"name\":\"leanderflagmismatch\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:leanderflagmismatch\",\"serviceBusEndpoint\":\"https://leanderflagmismatch.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T21:33:12.9001586Z\",\"updatedAt\":\"2024-04-29T21:38:12.0121364Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/vijayscalesetsloadtest/providers/Microsoft.ServiceBus/namespaces/vijaystandardaadtest\",\"name\":\"vijaystandardaadtest\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:vijaystandardaadtest\",\"serviceBusEndpoint\":\"https://vijaystandardaadtest.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-07T01:07:39.8730691Z\",\"updatedAt\":\"2023-03-07T01:08:23.4077867Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/abhigarg-publicnetworkaccess-cbn/providers/Microsoft.ServiceBus/namespaces/abhigarg-test-ns-2023-11-28-001\",\"name\":\"abhigarg-test-ns-2023-11-28-001\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:abhigarg-test-ns-2023-11-28-001\",\"serviceBusEndpoint\":\"https://abhigarg-test-ns-2023-11-28-001.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-29T00:32:00.2165282Z\",\"updatedAt\":\"2023-11-29T00:41:55.0726947Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.ServiceBus/namespaces/davadhani7136\",\"name\":\"davadhani7136\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani7136\",\"serviceBusEndpoint\":\"https://davadhani7136.servicebus.windows.net:443/\",\"alternateName\":\"davadhani7137\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-18T14:39:10.3774029Z\",\"updatedAt\":\"2023-12-22T17:22:49.3446209Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.ServiceBus/namespaces/davadhani1023\",\"name\":\"davadhani1023\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani1023\",\"serviceBusEndpoint\":\"https://davadhani1023.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-12T10:36:41.0320485Z\",\"updatedAt\":\"2023-12-12T10:36:44.5060343Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/anqyan-rg/providers/Microsoft.ServiceBus/namespaces/anqyan-std-test1\",\"name\":\"anqyan-std-test1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:anqyan-std-test1\",\"serviceBusEndpoint\":\"https://anqyan-std-test1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-09-07T17:13:09.8798629Z\",\"updatedAt\":\"2023-09-07T17:13:54.3626802Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.ServiceBus/namespaces/davadhani17136\",\"name\":\"davadhani17136\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani17136\",\"serviceBusEndpoint\":\"https://davadhani17136.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-22T10:21:15.7560782Z\",\"updatedAt\":\"2023-12-22T10:22:36.6605874Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ServiceBus-DRDrill-August-2022/providers/Microsoft.ServiceBus/namespaces/ServiceBus-DRDrill-August-2022-SB-NonAZ-cuseuap\",\"name\":\"ServiceBus-DRDrill-August-2022-SB-NonAZ-cuseuap\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-drdrill-august-2022-sb-nonaz-cuseuap\",\"serviceBusEndpoint\":\"https://ServiceBus-DRDrill-August-2022-SB-NonAZ-cuseuap.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-15T17:30:08.874055Z\",\"updatedAt\":\"2023-09-05T18:54:12.8175972Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.ServiceBus/namespaces/test6718\",\"name\":\"test6718\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:test6718\",\"serviceBusEndpoint\":\"https://test6718.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-10T08:44:41.007877Z\",\"updatedAt\":\"2023-12-22T17:22:52.0009037Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-CentralUSEUAP/providers/Microsoft.ServiceBus/namespaces/lee-alert-test-cdm03-402\",\"name\":\"lee-alert-test-cdm03-402\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centraluseuap\",\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:lee-alert-test-cdm03-402\",\"serviceBusEndpoint\":\"https://lee-alert-test-cdm03-402.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-23T21:12:57.7908377Z\",\"updatedAt\":\"2024-04-23T21:14:29.0917775Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/leandertestcanary/providers/Microsoft.ServiceBus/namespaces/leandertestgeodrmsi1\",\"name\":\"leandertestgeodrmsi1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:leandertestgeodrmsi1\",\"serviceBusEndpoint\":\"https://leandertestgeodrmsi1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T17:32:41.1250309Z\",\"updatedAt\":\"2024-04-29T18:40:09.5018937Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/leandertestcanary/providers/Microsoft.ManagedIdentity/userAssignedIdentities/leandertestgeodruai1\":{\"clientId\":\"03a28b4d-95ff-4afa-8ffb-67f92d01c31d\",\"principalId\":\"1962a5e8-5480-4325-92ab-9ce8569261aa\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ServiceBus-DRDrill-August-2022/providers/Microsoft.ServiceBus/namespaces/ServiceBus-DRDrill-August-2022-SB-ReallyNonAZ\",\"name\":\"ServiceBus-DRDrill-August-2022-SB-ReallyNonAZ\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:servicebus-drdrill-august-2022-sb-reallynonaz\",\"serviceBusEndpoint\":\"https://ServiceBus-DRDrill-August-2022-SB-ReallyNonAZ.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-15T17:11:52.3250786Z\",\"updatedAt\":\"2023-10-09T18:35:59.3834614Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sharmavijay-la-verification/providers/Microsoft.ServiceBus/namespaces/sharmavijay-sb-std-la-verification\",\"name\":\"sharmavijay-sb-std-la-verification\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sharmavijay-sb-std-la-verification\",\"serviceBusEndpoint\":\"https://sharmavijay-sb-std-la-verification.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-01T11:00:10.0884419Z\",\"updatedAt\":\"2023-02-01T11:00:57.0274208Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/dsms-test-rg/providers/Microsoft.ServiceBus/namespaces/dsmstestsb1\",\"name\":\"dsmstestsb1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:dsmstestsb1\",\"serviceBusEndpoint\":\"https://dsmstestsb1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-22T17:15:28.4683589Z\",\"updatedAt\":\"2023-11-14T10:34:31.0549Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/leandertestcanary/providers/Microsoft.ServiceBus/namespaces/leandertestgeodrmsi2\",\"name\":\"leandertestgeodrmsi2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:leandertestgeodrmsi2\",\"serviceBusEndpoint\":\"https://leandertestgeodrmsi2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T17:33:21.1148004Z\",\"updatedAt\":\"2024-04-29T18:40:12.6348664Z\"},\"identity\":{\"principalId\":\"259a5aa4-3da8-4e04-8a8e-7e74450844a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/leandertestcanary/providers/Microsoft.ManagedIdentity/userAssignedIdentities/leandertestgeodruai2\":{\"clientId\":\"97938887-bba6-40bd-9625-1c59c5841224\",\"principalId\":\"55232884-1922-41c9-9a96-e0295d70614d\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-EASTUS2EUAP/providers/Microsoft.ServiceBus/namespaces/lee-aad-v2-cbn04-401\",\"name\":\"lee-aad-v2-cbn04-401\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:lee-aad-v2-cbn04-401\",\"serviceBusEndpoint\":\"https://lee-aad-v2-cbn04-401.servicebus.windows.net:443/\",\"provisioningState\":\"Failed\",\"status\":\"Failed\",\"createdAt\":\"2024-04-19T22:47:30.3251289Z\",\"updatedAt\":\"2024-04-30T05:15:59.1938281Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/anqyan-rg/providers/Microsoft.ServiceBus/namespaces/anqyan-std-test2\",\"name\":\"anqyan-std-test2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:anqyan-std-test2\",\"serviceBusEndpoint\":\"https://anqyan-std-test2.servicebus.windows.net:443/\",\"alternateName\":\"anqyan-std-test2-post\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-09-07T17:16:33.2416593Z\",\"updatedAt\":\"2023-10-09T18:35:59.3834614Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ServiceBus-MalaysiaSouth/providers/Microsoft.ServiceBus/namespaces/ardsouza-malaysia-sb-standard\",\"name\":\"ardsouza-malaysia-sb-standard\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"malaysiasouth\",\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-malaysia-sb-standard\",\"serviceBusEndpoint\":\"https://ardsouza-malaysia-sb-standard.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-11T01:48:41.817911Z\",\"updatedAt\":\"2023-05-11T01:49:29.4588125Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-test/providers/Microsoft.ServiceBus/namespaces/ardsouza-namespace1\",\"name\":\"ardsouza-namespace1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"norwaywest\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-namespace1\",\"serviceBusEndpoint\":\"https://ardsouza-namespace1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-07-07T23:26:38.6873569Z\",\"updatedAt\":\"2023-07-07T23:27:26.908384Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/alitest/providers/Microsoft.ServiceBus/namespaces/ali-test-namespace\",\"name\":\"ali-test-namespace\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"norwaywest\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ali-test-namespace\",\"serviceBusEndpoint\":\"https://ali-test-namespace.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-07T02:11:12.5101481Z\",\"updatedAt\":\"2024-02-07T02:11:16.7446581Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-test/providers/Microsoft.ServiceBus/namespaces/ardsouza-namespace3\",\"name\":\"ardsouza-namespace3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"norwaywest\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-namespace3\",\"serviceBusEndpoint\":\"https://ardsouza-namespace3.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-07-07T23:29:10.2224787Z\",\"updatedAt\":\"2023-07-07T23:29:57.9580329Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.ServiceBus/namespaces/framborg-esc-sbs-nzr\",\"name\":\"framborg-esc-sbs-nzr\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"spaincentral\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:framborg-esc-sbs-nzr\",\"serviceBusEndpoint\":\"https://framborg-esc-sbs-nzr.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-20T18:43:39.4107667Z\",\"updatedAt\":\"2023-10-20T18:43:51.3800786Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.ServiceBus/namespaces/framborg-twn-sbs\",\"name\":\"framborg-twn-sbs\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"taiwannorth\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:framborg-twn-sbs\",\"serviceBusEndpoint\":\"https://framborg-twn-sbs.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-12T06:48:50.320969Z\",\"updatedAt\":\"2023-12-12T06:49:02.0997663Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kevx-rg/providers/Microsoft.ServiceBus/namespaces/kevxsbpremns-taiwannorth-2\",\"name\":\"kevxsbpremns-taiwannorth-2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"taiwannorth\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kevxsbpremns-taiwannorth-2\",\"serviceBusEndpoint\":\"https://kevxsbpremns-taiwannorth-2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-16T20:57:29.6597669Z\",\"updatedAt\":\"2024-04-16T21:12:52.4396336Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/a7861e0a-b024-45c8-bd2b-a584228a3f0a/resourcegroups/kevx-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kevxmi-wcus\":{\"clientId\":\"d07b99be-8faf-4798-b40d-343d7ef97ee6\",\"principalId\":\"54518d54-4fd1-4b2e-962a-5e800f38f33a\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kevx-rg/providers/Microsoft.ServiceBus/namespaces/kevxsbpremns-taiwannorth-1\",\"name\":\"kevxsbpremns-taiwannorth-1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"taiwannorth\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kevxsbpremns-taiwannorth-1\",\"serviceBusEndpoint\":\"https://kevxsbpremns-taiwannorth-1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-16T17:03:06.4510896Z\",\"updatedAt\":\"2024-04-16T20:44:53.7229271Z\"},\"identity\":{\"principalId\":\"a2a342cb-f5a0-4198-9f03-b576a6501faf\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kevx-rg/providers/Microsoft.ServiceBus/namespaces/kevxsbprem-taiwannw-2\",\"name\":\"kevxsbprem-taiwannw-2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"taiwannorthwest\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kevxsbprem-taiwannw-2\",\"serviceBusEndpoint\":\"https://kevxsbprem-taiwannw-2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-16T20:48:40.0399765Z\",\"updatedAt\":\"2024-04-16T21:12:59.0921568Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/a7861e0a-b024-45c8-bd2b-a584228a3f0a/resourcegroups/kevx-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kevxmi-wcus\":{\"clientId\":\"d07b99be-8faf-4798-b40d-343d7ef97ee6\",\"principalId\":\"54518d54-4fd1-4b2e-962a-5e800f38f33a\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kevx-rg/providers/Microsoft.ServiceBus/namespaces/kevxsbprem-taiwannw-1\",\"name\":\"kevxsbprem-taiwannw-1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"taiwannorthwest\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kevxsbprem-taiwannw-1\",\"serviceBusEndpoint\":\"https://kevxsbprem-taiwannw-1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-16T17:33:54.094836Z\",\"updatedAt\":\"2024-04-16T20:44:50.577241Z\"},\"identity\":{\"principalId\":\"30528c52-e6d7-4509-b71f-eaca0d1b399d\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.ServiceBus/namespaces/framborg-twnw-sbs\",\"name\":\"framborg-twnw-sbs\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"taiwannorthwest\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:framborg-twnw-sbs\",\"serviceBusEndpoint\":\"https://framborg-twnw-sbs.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-11T23:31:20.2732328Z\",\"updatedAt\":\"2023-12-11T23:31:29.6959922Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}]}", "isContentBase64": false } }, - "Get-AzServiceBusNamespaceV2+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusNamespaceV2+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "39" ], - "x-ms-client-request-id": [ "ee782287-f3e6-43b5-abfb-79e5ec5eb8a9" ], + "x-ms-unique-id": [ "35" ], + "x-ms-client-request-id": [ "548c2b76-c8e8-47d0-a62e-22955bc5d357" ], "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_Get" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -108,38 +66,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d986420c-ab0d-42b4-a8ab-88df7dd8a73d_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11937" ], - "x-ms-correlation-request-id": [ "7410c7fd-8509-4e0a-8f34-8d9d50931b8c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131519Z:7410c7fd-8509-4e0a-8f34-8d9d50931b8c" ], + "x-ms-correlation-request-id": [ "6f18e8fb-b1ee-4395-ad07-b1b34d7bd68a" ], + "x-ms-client-request-id": [ "548c2b76-c8e8-47d0-a62e-22955bc5d357_RP" ], + "x-ms-messaging-activity-id": [ "6c3941ed-f004-48c7-abb1-9b02868bcf3d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T05:16:49" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "6f18e8fb-b1ee-4395-ad07-b1b34d7bd68a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051649Z:6f18e8fb-b1ee-4395-ad07-b1b34d7bd68a" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:15:18 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E340130E9D3C49EF8AC042E84F864B40 Ref B: SEL221051504035 Ref C: 2024-04-30T05:16:47Z" ], + "Date": [ "Tue, 30 Apr 2024 05:16:48 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2158" ], + "Content-Length": [ "2175" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09\",\"name\":\"namespaceNamehjil09\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamehjil09\",\"createdAt\":\"2023-02-19T13:01:16.6Z\",\"updatedAt\":\"2023-02-19T13:02:26.58Z\",\"serviceBusEndpoint\":\"https://namespaceNamehjil09.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np\",\"name\":\"namespaceNameg2d9np\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameg2d9np\",\"serviceBusEndpoint\":\"https://namespaceNameg2d9np.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:44.8002388Z\",\"updatedAt\":\"2024-04-30T05:06:23.690171Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Get-AzServiceBusNamespaceV2+[NoContext]+List1+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusNamespaceV2+[NoContext]+List1+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "40" ], - "x-ms-client-request-id": [ "b69d531e-550a-4f74-aa8c-cc279c51550d" ], + "x-ms-unique-id": [ "36" ], + "x-ms-client-request-id": [ "efc5d80d-92f6-41bb-84ff-0882249f10d1" ], "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_List1" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_List1" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -150,38 +112,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a3fed18e-87d6-4f74-93d8-14dd8f3ffa8d_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11936" ], - "x-ms-correlation-request-id": [ "78d6655b-8c5c-44c8-ac9a-28ea91f1c0e9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131519Z:78d6655b-8c5c-44c8-ac9a-28ea91f1c0e9" ], + "x-ms-original-request-ids": [ "", "" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "a12b1142-7855-4292-a7d9-3931de2acf4a" ], + "x-ms-correlation-request-id": [ "a12b1142-7855-4292-a7d9-3931de2acf4a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051650Z:a12b1142-7855-4292-a7d9-3931de2acf4a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:15:18 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8AD02600DA3B464489867580BECB74BF Ref B: SEL221051504035 Ref C: 2024-04-30T05:16:49Z" ], + "Date": [ "Tue, 30 Apr 2024 05:16:50 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "6713" ], + "Content-Length": [ "5406" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq\",\"name\":\"namespaceNametkv0jq\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenametkv0jq\",\"createdAt\":\"2023-02-19T13:01:16.447Z\",\"updatedAt\":\"2023-02-19T13:01:58.797Z\",\"serviceBusEndpoint\":\"https://namespaceNametkv0jq.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09\",\"name\":\"namespaceNamehjil09\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamehjil09\",\"createdAt\":\"2023-02-19T13:01:16.6Z\",\"updatedAt\":\"2023-02-19T13:02:26.58Z\",\"serviceBusEndpoint\":\"https://namespaceNamehjil09.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T13:08:35.657Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"name\":\"secondaryNS5doyqa\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondaryns5doyqa\",\"createdAt\":\"2023-02-19T13:08:55.377Z\",\"updatedAt\":\"2023-02-19T13:10:09.897Z\",\"serviceBusEndpoint\":\"https://secondaryNS5doyqa.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"name\":\"secondaryNSjazpct\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynsjazpct\",\"createdAt\":\"2023-02-19T13:08:55.4Z\",\"updatedAt\":\"2023-02-19T13:10:39.913Z\",\"serviceBusEndpoint\":\"https://secondaryNSjazpct.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"name\":\"primaryNSd7oma3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsd7oma3\",\"createdAt\":\"2023-02-19T13:08:55.42Z\",\"updatedAt\":\"2023-02-19T13:10:12.177Z\",\"serviceBusEndpoint\":\"https://primaryNSd7oma3.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsp1xb3a\",\"createdAt\":\"2023-02-19T13:08:55.47Z\",\"updatedAt\":\"2023-02-19T13:09:38.503Z\",\"serviceBusEndpoint\":\"https://primaryNSp1xb3a.servicebus.windows.net:443/\",\"status\":\"Active\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T05:06:48.3082869Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"name\":\"primaryNSibt9vz\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsibt9vz\",\"serviceBusEndpoint\":\"https://primaryNSibt9vz.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:45.0033726Z\",\"updatedAt\":\"2024-04-30T05:06:28.1277631Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix\",\"name\":\"namespaceNamep0j7ix\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamep0j7ix\",\"serviceBusEndpoint\":\"https://namespaceNamep0j7ix.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:44.9721416Z\",\"updatedAt\":\"2024-04-30T05:05:47.8845766Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np\",\"name\":\"namespaceNameg2d9np\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameg2d9np\",\"serviceBusEndpoint\":\"https://namespaceNameg2d9np.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:44.8002388Z\",\"updatedAt\":\"2024-04-30T05:06:23.690171Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:primarynsqi3or6\",\"serviceBusEndpoint\":\"https://primaryNSqi3or6.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:44.9565151Z\",\"updatedAt\":\"2024-04-30T05:05:47.8063512Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"name\":\"secondaryNSuegwsb\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynsuegwsb\",\"serviceBusEndpoint\":\"https://secondaryNSuegwsb.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.870939Z\",\"updatedAt\":\"2024-04-30T05:06:39.073288Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"name\":\"secondaryNSkhnx2q\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:secondarynskhnx2q\",\"serviceBusEndpoint\":\"https://secondaryNSkhnx2q.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:44.8084059Z\",\"updatedAt\":\"2024-04-30T05:06:36.8856713Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}]}", "isContentBase64": false } }, - "Get-AzServiceBusNamespaceV2+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusNamespaceV2+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "41" ], - "x-ms-client-request-id": [ "7125bf7a-84ea-4f20-8c80-dc14658f5b02" ], + "x-ms-unique-id": [ "37" ], + "x-ms-client-request-id": [ "547c5e86-21d6-4cae-8b38-39f49850e1cb" ], "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_Get" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -192,38 +156,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c06f7197-22b4-4659-a31b-889b765f0c93_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11935" ], - "x-ms-correlation-request-id": [ "3e6ab5af-45e0-482a-a260-3af7bedfc975" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131520Z:3e6ab5af-45e0-482a-a260-3af7bedfc975" ], + "x-ms-correlation-request-id": [ "577aa5a3-a3cc-4dfe-b9a1-67f99eeb3b39" ], + "x-ms-client-request-id": [ "547c5e86-21d6-4cae-8b38-39f49850e1cb_RP" ], + "x-ms-messaging-activity-id": [ "75344a85-f13f-4fd7-bde0-dee7ae31fbc1" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:16:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "577aa5a3-a3cc-4dfe-b9a1-67f99eeb3b39" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051651Z:577aa5a3-a3cc-4dfe-b9a1-67f99eeb3b39" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:15:19 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5F017FA870774F7AB56B415290FC230C Ref B: SEL221051504035 Ref C: 2024-04-30T05:16:51Z" ], + "Date": [ "Tue, 30 Apr 2024 05:16:50 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2158" ], + "Content-Length": [ "2175" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09\",\"name\":\"namespaceNamehjil09\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamehjil09\",\"createdAt\":\"2023-02-19T13:01:16.6Z\",\"updatedAt\":\"2023-02-19T13:02:26.58Z\",\"serviceBusEndpoint\":\"https://namespaceNamehjil09.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np\",\"name\":\"namespaceNameg2d9np\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameg2d9np\",\"serviceBusEndpoint\":\"https://namespaceNameg2d9np.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:44.8002388Z\",\"updatedAt\":\"2024-04-30T05:06:23.690171Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Get-AzServiceBusNamespaceV2+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09?api-version=2022-10-01-preview+2": { + "Get-AzServiceBusNamespaceV2+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "42" ], - "x-ms-client-request-id": [ "e1deabef-4b8e-4a4f-9947-938dd665c092" ], + "x-ms-unique-id": [ "38" ], + "x-ms-client-request-id": [ "68c57082-f9f4-4d81-8e1d-50a82b230127" ], "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_GetViaIdentity" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -234,22 +202,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f0355481-cb73-46b8-a894-5a81e9804ef9_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11934" ], - "x-ms-correlation-request-id": [ "57c2061f-6ce8-405e-b752-f20118a3113a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131521Z:57c2061f-6ce8-405e-b752-f20118a3113a" ], + "x-ms-correlation-request-id": [ "b4048cce-1f75-4586-9ec7-26d1155c30b3" ], + "x-ms-client-request-id": [ "68c57082-f9f4-4d81-8e1d-50a82b230127_RP" ], + "x-ms-messaging-activity-id": [ "6bb3bfb1-f21e-4c12-a0ca-37584418bdab" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T05:16:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "b4048cce-1f75-4586-9ec7-26d1155c30b3" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051651Z:b4048cce-1f75-4586-9ec7-26d1155c30b3" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:15:20 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 348E441A81A340BEBE122078034FD43C Ref B: SEL221051504035 Ref C: 2024-04-30T05:16:51Z" ], + "Date": [ "Tue, 30 Apr 2024 05:16:51 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2158" ], + "Content-Length": [ "2175" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09\",\"name\":\"namespaceNamehjil09\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamehjil09\",\"createdAt\":\"2023-02-19T13:01:16.6Z\",\"updatedAt\":\"2023-02-19T13:02:26.58Z\",\"serviceBusEndpoint\":\"https://namespaceNamehjil09.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np\",\"name\":\"namespaceNameg2d9np\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameg2d9np\",\"serviceBusEndpoint\":\"https://namespaceNameg2d9np.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:44.8002388Z\",\"updatedAt\":\"2024-04-30T05:06:23.690171Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusNetworkRuleSet.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusNetworkRuleSet.Recording.json index e86c062a8061..43f929f35513 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusNetworkRuleSet.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusNetworkRuleSet.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzServiceBusNetworkRuleSet+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusNetworkRuleSet+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "43" ], - "x-ms-client-request-id": [ "49dd9d74-b0a3-4848-8d75-9ad4e3dbf470" ], + "x-ms-unique-id": [ "39" ], + "x-ms-client-request-id": [ "6d03bba8-1f6b-4732-a1b2-d42be844ae3f" ], "CommandName": [ "Get-AzServiceBusNetworkRuleSet" ], "FullCommandName": [ "Get-AzServiceBusNetworkRuleSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,22 +22,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "4fe22bc9-83d3-48db-8895-4ca67bd7a9f9_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11933" ], - "x-ms-correlation-request-id": [ "13e40128-084c-4b88-929e-aa700571e3f4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131535Z:13e40128-084c-4b88-929e-aa700571e3f4" ], + "x-ms-correlation-request-id": [ "727debe8-5d0a-4131-8ad7-67e3004f0e6d" ], + "x-ms-client-request-id": [ "6d03bba8-1f6b-4732-a1b2-d42be844ae3f_RP" ], + "x-ms-messaging-activity-id": [ "7554ca8e-c6b2-4d45-bf18-5eda46e26ba4" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T05:17:08" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "727debe8-5d0a-4131-8ad7-67e3004f0e6d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051708Z:727debe8-5d0a-4131-8ad7-67e3004f0e6d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:15:35 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 619803661FFD41969B7036042C9EFB7F Ref B: SEL221051504035 Ref C: 2024-04-30T05:17:06Z" ], + "Date": [ "Tue, 30 Apr 2024 05:17:07 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "393" ], + "Content-Length": [ "430" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"East US\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Allow\",\"virtualNetworkRules\":[],\"ipRules\":[]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Allow\",\"virtualNetworkRules\":[],\"ipRules\":[],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusNetworkRuleSet.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusNetworkRuleSet.Tests.ps1 index 553165f1209c..6289c807d511 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusNetworkRuleSet.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusNetworkRuleSet.Tests.ps1 @@ -18,7 +18,7 @@ Describe 'Get-AzServiceBusNetworkRuleSet' { It 'Get' { $networkRuleSet = Get-AzServiceBusNetworkRuleSet -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace $networkRuleSet.PublicNetworkAccess | Should -Be "Enabled" - $networkRuleSet.TrustedServiceAccessEnabled | Should -Be $null + $networkRuleSet.TrustedServiceAccessEnabled | Should -Be $false $networkRuleSet.VirtualNetworkRule.Count | Should -Be 0 $networkRuleSet.IPRule.Count | Should -Be 0 } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusPrivateEndpointConnection.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusPrivateEndpointConnection.Recording.json index d387c623168a..bbcba9947d2a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusPrivateEndpointConnection.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusPrivateEndpointConnection.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzServiceBusPrivateEndpointConnection+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusPrivateEndpointConnection+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "44" ], - "x-ms-client-request-id": [ "37c89a4e-0b5f-4e90-9303-9b56b1c6fa66" ], + "x-ms-unique-id": [ "40" ], + "x-ms-client-request-id": [ "1a73e9a9-377b-4980-b1d8-84489a1a42b3" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,38 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "db6b1439-9f79-4cc2-a2d9-c609ed709860_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11932" ], - "x-ms-correlation-request-id": [ "27cd960e-ebd0-4b9e-9a27-338fb5eb2e5d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131548Z:27cd960e-ebd0-4b9e-9a27-338fb5eb2e5d" ], + "x-ms-correlation-request-id": [ "1c7bb4c5-b644-4ba8-a689-1c75afeb5b50" ], + "x-ms-client-request-id": [ "1a73e9a9-377b-4980-b1d8-84489a1a42b3_RP" ], + "x-ms-messaging-activity-id": [ "5d78c66d-58ab-4c20-9d6b-cdd7f8e5d19f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:17:24" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "1c7bb4c5-b644-4ba8-a689-1c75afeb5b50" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051724Z:1c7bb4c5-b644-4ba8-a689-1c75afeb5b50" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:15:48 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3BC2D0C3D250466784B7FE9D2ACE7700 Ref B: SEL221051504035 Ref C: 2024-04-30T05:17:22Z" ], + "Date": [ "Tue, 30 Apr 2024 05:17:23 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1392" ], + "Content-Length": [ "1398" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}]}", "isContentBase64": false } }, - "Get-AzServiceBusPrivateEndpointConnection+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusPrivateEndpointConnection+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "45" ], - "x-ms-client-request-id": [ "6a367811-386b-470a-9505-686bec9c0c13" ], + "x-ms-unique-id": [ "41" ], + "x-ms-client-request-id": [ "02ceefa7-0803-43ee-84d7-c3f2b4688b69" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,38 +68,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2f48e053-53a7-4907-9302-c09d42da22f4_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11931" ], - "x-ms-correlation-request-id": [ "30ba02bc-f764-40b3-8950-7756c119465f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131549Z:30ba02bc-f764-40b3-8950-7756c119465f" ], + "x-ms-correlation-request-id": [ "adb8edbd-3096-4d35-b74c-249f9c25855d" ], + "x-ms-client-request-id": [ "02ceefa7-0803-43ee-84d7-c3f2b4688b69_RP" ], + "x-ms-messaging-activity-id": [ "22f90c7e-5915-4227-b722-2b8d9e0ef953" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T05:17:26" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "adb8edbd-3096-4d35-b74c-249f9c25855d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051726Z:adb8edbd-3096-4d35-b74c-249f9c25855d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:15:48 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4853CA519C5B45A8BB8942F013848D6E Ref B: SEL221051504035 Ref C: 2024-04-30T05:17:24Z" ], + "Date": [ "Tue, 30 Apr 2024 05:17:25 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "688" ], + "Content-Length": [ "691" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Get-AzServiceBusPrivateEndpointConnection+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusPrivateEndpointConnection+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "46" ], - "x-ms-client-request-id": [ "21bcac48-0e04-4517-b255-6ed7d17db7de" ], + "x-ms-unique-id": [ "42" ], + "x-ms-client-request-id": [ "7c62e799-d4db-42cf-b8e6-ed84de122a08" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -106,38 +114,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "bc0d5e03-aa49-4d47-bc33-984a7be48c9a_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11930" ], - "x-ms-correlation-request-id": [ "30781027-ebe2-43ed-a6b0-62d422921588" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131550Z:30781027-ebe2-43ed-a6b0-62d422921588" ], + "x-ms-correlation-request-id": [ "557ecf74-63a5-4349-8c90-5a7b54452924" ], + "x-ms-client-request-id": [ "7c62e799-d4db-42cf-b8e6-ed84de122a08_RP" ], + "x-ms-messaging-activity-id": [ "ea132b09-b4a1-4cb6-99e8-8ccd138766d2" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T05:17:27" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "557ecf74-63a5-4349-8c90-5a7b54452924" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051727Z:557ecf74-63a5-4349-8c90-5a7b54452924" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:15:49 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 012AA5F2B74B44909900D3CBA3B12A36 Ref B: SEL221051504035 Ref C: 2024-04-30T05:17:26Z" ], + "Date": [ "Tue, 30 Apr 2024 05:17:26 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "691" ], + "Content-Length": [ "694" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Get-AzServiceBusPrivateEndpointConnection+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview+2": { + "Get-AzServiceBusPrivateEndpointConnection+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "47" ], - "x-ms-client-request-id": [ "185e9302-7be4-44a5-a33a-bebd8e88e2a0" ], + "x-ms-unique-id": [ "43" ], + "x-ms-client-request-id": [ "a74f8f06-6476-49c4-b211-47d1d8bc9a4f" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -148,22 +160,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "8654c0d3-5bd0-4361-a6bc-d1b96b76d60a_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11929" ], - "x-ms-correlation-request-id": [ "e9db555c-9234-4047-a25d-54325841dfc9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131550Z:e9db555c-9234-4047-a25d-54325841dfc9" ], + "x-ms-correlation-request-id": [ "4682fb26-3002-4fd2-ad23-3ebd94a8c317" ], + "x-ms-client-request-id": [ "a74f8f06-6476-49c4-b211-47d1d8bc9a4f_RP" ], + "x-ms-messaging-activity-id": [ "1d8e8d7e-3564-43fd-84f9-33ae896adeab" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:17:29" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "4682fb26-3002-4fd2-ad23-3ebd94a8c317" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051729Z:4682fb26-3002-4fd2-ad23-3ebd94a8c317" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:15:50 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6B16FD8E233641EE9E39DC6418BD02E5 Ref B: SEL221051504035 Ref C: 2024-04-30T05:17:27Z" ], + "Date": [ "Tue, 30 Apr 2024 05:17:28 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "691" ], + "Content-Length": [ "694" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusPrivateLink.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusPrivateLink.Recording.json index 3824f13e58f3..afeb83ae0caa 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusPrivateLink.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusPrivateLink.Recording.json @@ -1,17 +1,63 @@ { - "Get-AzServiceBusPrivateLink+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateLinkResources?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusPrivateLink+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateLinkResources?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "48" ], - "x-ms-client-request-id": [ "f1c49c6c-e2ac-401a-90b0-df2fdbaf4685" ], + "x-ms-unique-id": [ "44" ], + "x-ms-client-request-id": [ "264480ea-1eec-47e2-afeb-22c394b10aa3" ], + "CommandName": [ "Get-AzServiceBusNamespaceV2" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-correlation-request-id": [ "60003863-b610-4cd8-9d57-0c1f0fbd8cb6" ], + "x-ms-client-request-id": [ "264480ea-1eec-47e2-afeb-22c394b10aa3_RP" ], + "x-ms-messaging-activity-id": [ "09129956-9bb7-45de-a6bc-7ba734d865aa" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T05:17:45" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "60003863-b610-4cd8-9d57-0c1f0fbd8cb6" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051745Z:60003863-b610-4cd8-9d57-0c1f0fbd8cb6" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2C4CDC1FA7EF4BABA33B4CA22DEF7F11 Ref B: SEL221051504035 Ref C: 2024-04-30T05:17:43Z" ], + "Date": [ "Tue, 30 Apr 2024 05:17:44 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2175" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np\",\"name\":\"namespaceNameg2d9np\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameg2d9np\",\"serviceBusEndpoint\":\"https://namespaceNameg2d9np.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:44.8002388Z\",\"updatedAt\":\"2024-04-30T05:06:23.690171Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", + "isContentBase64": false + } + }, + "Get-AzServiceBusPrivateLink+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateLinkResources?api-version=2022-10-01-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateLinkResources?api-version=2022-10-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "45" ], + "x-ms-client-request-id": [ "026e64b8-41bf-4bcb-8dcd-f8c2b1350191" ], "CommandName": [ "Get-AzServiceBusPrivateLink" ], "FullCommandName": [ "Get-AzServiceBusPrivateLink_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,22 +68,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1e33b49a-1205-4d09-a7e6-620ff12a593f_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11928" ], - "x-ms-correlation-request-id": [ "4db2cfd7-348e-4ca1-9858-d3b90a0363a7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131603Z:4db2cfd7-348e-4ca1-9858-d3b90a0363a7" ], + "x-ms-correlation-request-id": [ "2265516b-0b6b-4eec-beca-24c6ba086c0e" ], + "x-ms-client-request-id": [ "026e64b8-41bf-4bcb-8dcd-f8c2b1350191_RP" ], + "x-ms-messaging-activity-id": [ "9d4b3083-2f0a-4cad-bb99-a3f2811cb16b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T05:17:46" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-request-id": [ "2265516b-0b6b-4eec-beca-24c6ba086c0e" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051746Z:2265516b-0b6b-4eec-beca-24c6ba086c0e" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:16:02 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E9C281F4CA5A4C23BFB64B7FD5AB91C7 Ref B: SEL221051504035 Ref C: 2024-04-30T05:17:45Z" ], + "Date": [ "Tue, 30 Apr 2024 05:17:45 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "416" ], + "Content-Length": [ "418" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateLinkResources/namespace\",\"name\":\"namespace\",\"type\":\"Microsoft.ServiceBus/namespaces/privateLinkResources\",\"properties\":{\"groupId\":\"namespace\",\"requiredMembers\":[\"namespace\"],\"requiredZoneNames\":[\"privatelink.servicebus.windows.net\"]}}]}", + "Content": "{\"value\":[{\"id\":\"subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateLinkResources/namespace\",\"name\":\"namespace\",\"type\":\"Microsoft.ServiceBus/namespaces/privateLinkResources\",\"properties\":{\"groupId\":\"namespace\",\"requiredMembers\":[\"namespace\"],\"requiredZoneNames\":[\"privatelink.servicebus.windows.net\"]}}]}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusPrivateLink.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusPrivateLink.Tests.ps1 index 3ea0ac024b08..0f32f5cdaf18 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusPrivateLink.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusPrivateLink.Tests.ps1 @@ -16,10 +16,11 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzServiceBusPrivateLink') Describe 'Get-AzServiceBusPrivateLink' { It 'Get' { + $namespace = Get-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespace $privateLink = Get-AzServiceBusPrivateLink -NamespaceName $env.namespace -ResourceGroupName $env.resourceGroup $privateLink.Name | Should -Be "namespace" $privateLink.GroupId | Should -Be "namespace" $privateLink.RequiredMember[0] | Should -Be "namespace" - $privateLink.RequiredZoneName[0] | Should -Be "privatelink.servicebus.windows.net" + $privateLink.RequiredZoneName[0] | Should -Be $([System.Uri]$namespace.ServiceBusEndpoint).Host.ToLower().Replace($env.namespace.ToLower(), 'privatelink') } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusQueue.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusQueue.Recording.json index e7f250adc856..dfecb9028c39 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusQueue.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusQueue.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzServiceBusQueue+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusQueue+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "49" ], - "x-ms-client-request-id": [ "65a2deb7-e881-470e-9062-62914f1591d8" ], + "x-ms-unique-id": [ "46" ], + "x-ms-client-request-id": [ "f80378a4-f43b-4744-9c4b-0fe6dcf33398" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,37 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11927" ], - "x-ms-request-id": [ "e6c29e29-3e55-4745-8bdc-10ea134a38de" ], - "x-ms-correlation-request-id": [ "e6c29e29-3e55-4745-8bdc-10ea134a38de" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131617Z:e6c29e29-3e55-4745-8bdc-10ea134a38de" ], + "x-ms-correlation-request-id": [ "5b7109c3-b4aa-43fc-913e-3cce0c4bc401" ], + "x-ms-client-request-id": [ "f80378a4-f43b-4744-9c4b-0fe6dcf33398_RP" ], + "x-ms-messaging-activity-id": [ "fcb5d75e-8f72-4fee-8c45-d6c39261c199" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:18:02" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "5b7109c3-b4aa-43fc-913e-3cce0c4bc401" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051802Z:5b7109c3-b4aa-43fc-913e-3cce0c4bc401" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:16:17 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D9EE3906A155445BAABE3D1EA8727F5E Ref B: SEL221051504035 Ref C: 2024-04-30T05:18:01Z" ], + "Date": [ "Tue, 30 Apr 2024 05:18:01 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1037" ], + "Content-Length": [ "1039" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:02:41.6727523Z\",\"updatedAt\":\"2023-02-19T13:07:32.0500292Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:06:34.7488153Z\",\"updatedAt\":\"2024-04-30T05:10:24.1373543Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", "isContentBase64": false } }, - "Get-AzServiceBusQueue+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusQueue+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "50" ], - "x-ms-client-request-id": [ "464b358d-030f-43a9-80bc-9d60227e979f" ], + "x-ms-unique-id": [ "47" ], + "x-ms-client-request-id": [ "9663ded2-256f-4dfb-9209-db4cbbe174d3" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,37 +69,42 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-inline-count": [ "" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11926" ], - "x-ms-request-id": [ "720e25d0-cdbf-40f2-92c2-2d76e4da67d8" ], - "x-ms-correlation-request-id": [ "720e25d0-cdbf-40f2-92c2-2d76e4da67d8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131618Z:720e25d0-cdbf-40f2-92c2-2d76e4da67d8" ], + "x-ms-correlation-request-id": [ "c0c8393b-424c-4301-b73d-5872cbc9229e" ], + "x-ms-client-request-id": [ "9663ded2-256f-4dfb-9209-db4cbbe174d3_RP" ], + "x-ms-messaging-activity-id": [ "fd07734a-1c8e-4713-8c81-1173e61566d4" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:18:04" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "c0c8393b-424c-4301-b73d-5872cbc9229e" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051804Z:c0c8393b-424c-4301-b73d-5872cbc9229e" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:16:17 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5223B0D287D74F1B8ECD5B6E0E54D8A0 Ref B: SEL221051504035 Ref C: 2024-04-30T05:18:02Z" ], + "Date": [ "Tue, 30 Apr 2024 05:18:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1049" ], + "Content-Length": [ "1051" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:02:41.6727523Z\",\"updatedAt\":\"2023-02-19T13:07:32.0500292Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:06:34.7488153Z\",\"updatedAt\":\"2024-04-30T05:10:24.1373543Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}]}", "isContentBase64": false } }, - "Get-AzServiceBusQueue+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusQueue+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "51" ], - "x-ms-client-request-id": [ "21e61015-7477-4d8a-a437-71f25aaa70c1" ], + "x-ms-unique-id": [ "48" ], + "x-ms-client-request-id": [ "f12ee5a6-951f-488a-8ee6-510f92150dcc" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -105,21 +115,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11925" ], - "x-ms-request-id": [ "ef515ce7-85d8-476f-8c9e-5b2a34bb8be4" ], - "x-ms-correlation-request-id": [ "ef515ce7-85d8-476f-8c9e-5b2a34bb8be4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131618Z:ef515ce7-85d8-476f-8c9e-5b2a34bb8be4" ], + "x-ms-correlation-request-id": [ "e75325f7-08c0-4d2a-8623-73322ea71e37" ], + "x-ms-client-request-id": [ "f12ee5a6-951f-488a-8ee6-510f92150dcc_RP" ], + "x-ms-messaging-activity-id": [ "0d61e648-4057-454d-82af-51731a6ac342" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:18:06" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "e75325f7-08c0-4d2a-8623-73322ea71e37" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T051806Z:e75325f7-08c0-4d2a-8623-73322ea71e37" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:16:18 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 54C29468614448B89DD1D78BF2691BE8 Ref B: SEL221051504035 Ref C: 2024-04-30T05:18:05Z" ], + "Date": [ "Tue, 30 Apr 2024 05:18:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1037" ], + "Content-Length": [ "1039" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:02:41.6727523Z\",\"updatedAt\":\"2023-02-19T13:07:32.0500292Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:06:34.7488153Z\",\"updatedAt\":\"2024-04-30T05:10:24.1373543Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusRule.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusRule.Recording.json index 400efdbe7c25..4026f3834eef 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusRule.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusRule.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzServiceBusRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRule1?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRule1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "52" ], - "x-ms-client-request-id": [ "fdda6202-649b-460f-a887-a5295fc27a00" ], + "x-ms-unique-id": [ "49" ], + "x-ms-client-request-id": [ "132fb37c-3f01-4479-a32b-b77f3fb85fad" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,37 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11924" ], - "x-ms-request-id": [ "273a346d-da68-452c-b6e7-7b7c3d08df6d" ], - "x-ms-correlation-request-id": [ "273a346d-da68-452c-b6e7-7b7c3d08df6d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131632Z:273a346d-da68-452c-b6e7-7b7c3d08df6d" ], + "x-ms-correlation-request-id": [ "f55f117f-428b-41fb-b5b0-960b95420811" ], + "x-ms-client-request-id": [ "132fb37c-3f01-4479-a32b-b77f3fb85fad_RP" ], + "x-ms-messaging-activity-id": [ "127da670-9a10-4bb8-8906-8f85d55f42a5" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T05:18:22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "f55f117f-428b-41fb-b5b0-960b95420811" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051822Z:f55f117f-428b-41fb-b5b0-960b95420811" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:16:31 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2F4CB279DE1C44F1A89D03CF6E874DF6 Ref B: SEL221051504035 Ref C: 2024-04-30T05:18:20Z" ], + "Date": [ "Tue, 30 Apr 2024 05:18:21 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "456" ], + "Content-Length": [ "458" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRule1\",\"name\":\"sqlRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"SqlFilter\",\"sqlFilter\":{\"sqlExpression\":\"1=2\",\"compatibilityLevel\":20,\"parameters\":{}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRule1\",\"name\":\"sqlRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"SqlFilter\",\"sqlFilter\":{\"sqlExpression\":\"1=2\",\"compatibilityLevel\":20,\"parameters\":{}}}}", "isContentBase64": false } }, - "Get-AzServiceBusRule+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusRule+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "53" ], - "x-ms-client-request-id": [ "9f02978a-c1c7-4bee-aa2f-a96d36de7ddf" ], + "x-ms-unique-id": [ "50" ], + "x-ms-client-request-id": [ "5f6bb1a2-8f40-453e-b4cd-fb594a9eb149" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,37 +69,42 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-inline-count": [ "" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11923" ], - "x-ms-request-id": [ "5d25a3ef-49e0-4183-b9f5-d940d4cea1d7" ], - "x-ms-correlation-request-id": [ "5d25a3ef-49e0-4183-b9f5-d940d4cea1d7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131632Z:5d25a3ef-49e0-4183-b9f5-d940d4cea1d7" ], + "x-ms-correlation-request-id": [ "edbf0f86-1d09-4488-a778-b3350c337e7b" ], + "x-ms-client-request-id": [ "5f6bb1a2-8f40-453e-b4cd-fb594a9eb149_RP" ], + "x-ms-messaging-activity-id": [ "b6c0d116-f222-4281-9e00-b8941b7c47c4" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:18:24" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "edbf0f86-1d09-4488-a778-b3350c337e7b" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051824Z:edbf0f86-1d09-4488-a778-b3350c337e7b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:16:32 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 09E5956926A9409A8AC2DD72B1EC821C Ref B: SEL221051504035 Ref C: 2024-04-30T05:18:22Z" ], + "Date": [ "Tue, 30 Apr 2024 05:18:23 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "468" ], + "Content-Length": [ "470" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRule1\",\"name\":\"sqlRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"SqlFilter\",\"sqlFilter\":{\"sqlExpression\":\"1=2\",\"compatibilityLevel\":20,\"parameters\":{}}}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRule1\",\"name\":\"sqlRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"SqlFilter\",\"sqlFilter\":{\"sqlExpression\":\"1=2\",\"compatibilityLevel\":20,\"parameters\":{}}}}]}", "isContentBase64": false } }, - "Get-AzServiceBusRule+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRule1?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusRule+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRule1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "54" ], - "x-ms-client-request-id": [ "4041e66b-ec54-4577-b1ef-f78f922359f3" ], + "x-ms-unique-id": [ "51" ], + "x-ms-client-request-id": [ "2ad2b1d5-f70d-4fb4-9558-358a5a1c3191" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -105,21 +115,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11922" ], - "x-ms-request-id": [ "76cd8179-d149-4f85-b1b0-7b87f852ffbc" ], - "x-ms-correlation-request-id": [ "76cd8179-d149-4f85-b1b0-7b87f852ffbc" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131633Z:76cd8179-d149-4f85-b1b0-7b87f852ffbc" ], + "x-ms-correlation-request-id": [ "84937811-afcc-48e4-abe2-f525cb9e3ed3" ], + "x-ms-client-request-id": [ "2ad2b1d5-f70d-4fb4-9558-358a5a1c3191_RP" ], + "x-ms-messaging-activity-id": [ "5c89b663-5a63-4dae-9e8e-9e2a4f93b035" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:18:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "84937811-afcc-48e4-abe2-f525cb9e3ed3" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051825Z:84937811-afcc-48e4-abe2-f525cb9e3ed3" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:16:33 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 25F4985700BD447084312B9A7CE04E46 Ref B: SEL221051504035 Ref C: 2024-04-30T05:18:24Z" ], + "Date": [ "Tue, 30 Apr 2024 05:18:24 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "456" ], + "Content-Length": [ "458" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRule1\",\"name\":\"sqlRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"SqlFilter\",\"sqlFilter\":{\"sqlExpression\":\"1=2\",\"compatibilityLevel\":20,\"parameters\":{}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRule1\",\"name\":\"sqlRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"SqlFilter\",\"sqlFilter\":{\"sqlExpression\":\"1=2\",\"compatibilityLevel\":20,\"parameters\":{}}}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusSubscription.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusSubscription.Recording.json index 3360819796d8..9d0f079695e0 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusSubscription.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusSubscription.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzServiceBusSubscription+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusSubscription+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "55" ], - "x-ms-client-request-id": [ "e522f591-ef3f-40de-a397-b0528188cdff" ], + "x-ms-unique-id": [ "52" ], + "x-ms-client-request-id": [ "ba760d6a-8da9-4e84-91ec-f1c2b3873fe6" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,37 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11921" ], - "x-ms-request-id": [ "8faaafdd-fead-4d8f-a14d-c01cedb4d49b" ], - "x-ms-correlation-request-id": [ "8faaafdd-fead-4d8f-a14d-c01cedb4d49b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131648Z:8faaafdd-fead-4d8f-a14d-c01cedb4d49b" ], + "x-ms-correlation-request-id": [ "142795b5-a17f-4808-b071-d7e5555576ca" ], + "x-ms-client-request-id": [ "ba760d6a-8da9-4e84-91ec-f1c2b3873fe6_RP" ], + "x-ms-messaging-activity-id": [ "440028bc-d7a1-4f27-9d41-c8e4b81dd8d9" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T05:18:41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "142795b5-a17f-4808-b071-d7e5555576ca" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T051841Z:142795b5-a17f-4808-b071-d7e5555576ca" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:16:47 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 85A32DF0D55D4BB0ACFF7982E297C148 Ref B: SEL221051504035 Ref C: 2024-04-30T05:18:39Z" ], + "Date": [ "Tue, 30 Apr 2024 05:18:40 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "957" ], + "Content-Length": [ "959" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1\",\"name\":\"subscription1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T13:02:44.2354247Z\",\"updatedAt\":\"2023-02-19T13:02:44.2354247Z\",\"accessedAt\":\"2023-02-19T13:02:44.235Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1\",\"name\":\"subscription1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T05:06:37.7332631Z\",\"updatedAt\":\"2024-04-30T05:06:37.7332631Z\",\"accessedAt\":\"2024-04-30T05:06:37.733Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", "isContentBase64": false } }, - "Get-AzServiceBusSubscription+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusSubscription+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "56" ], - "x-ms-client-request-id": [ "9dc8f82b-f0fb-4030-bef2-a6111193b79a" ], + "x-ms-unique-id": [ "53" ], + "x-ms-client-request-id": [ "828bdb4b-c794-4c4b-b299-6e2e83f10ba2" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,37 +69,42 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-inline-count": [ "" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11920" ], - "x-ms-request-id": [ "0123d3c6-a799-4fa7-874b-9c5c93248cfe" ], - "x-ms-correlation-request-id": [ "0123d3c6-a799-4fa7-874b-9c5c93248cfe" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131649Z:0123d3c6-a799-4fa7-874b-9c5c93248cfe" ], + "x-ms-correlation-request-id": [ "0358cd47-5d33-447f-ab37-d08a6b520533" ], + "x-ms-client-request-id": [ "828bdb4b-c794-4c4b-b299-6e2e83f10ba2_RP" ], + "x-ms-messaging-activity-id": [ "c55b38ac-d26b-454d-a772-2990e2693c20" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:18:42" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "0358cd47-5d33-447f-ab37-d08a6b520533" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051842Z:0358cd47-5d33-447f-ab37-d08a6b520533" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:16:48 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D4E332A84DF9493580E93847A8A821F8 Ref B: SEL221051504035 Ref C: 2024-04-30T05:18:41Z" ], + "Date": [ "Tue, 30 Apr 2024 05:18:41 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "969" ], + "Content-Length": [ "971" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1\",\"name\":\"subscription1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T13:02:44.2354247Z\",\"updatedAt\":\"2023-02-19T13:02:44.2354247Z\",\"accessedAt\":\"2023-02-19T13:02:44.235Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1\",\"name\":\"subscription1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T05:06:37.7332631Z\",\"updatedAt\":\"2024-04-30T05:06:37.7332631Z\",\"accessedAt\":\"2024-04-30T05:06:37.733Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}]}", "isContentBase64": false } }, - "Get-AzServiceBusSubscription+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusSubscription+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "57" ], - "x-ms-client-request-id": [ "51920ce6-5505-4c7c-a630-99c6c69f847c" ], + "x-ms-unique-id": [ "54" ], + "x-ms-client-request-id": [ "6c28bf4f-06da-47f9-88c1-6f45bfb15a14" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -105,21 +115,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11919" ], - "x-ms-request-id": [ "b11fcee9-2949-4b07-b7bb-04e077a1753c" ], - "x-ms-correlation-request-id": [ "b11fcee9-2949-4b07-b7bb-04e077a1753c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131649Z:b11fcee9-2949-4b07-b7bb-04e077a1753c" ], + "x-ms-correlation-request-id": [ "ea66aa05-f3f3-43d3-b78a-4ebb52e17174" ], + "x-ms-client-request-id": [ "6c28bf4f-06da-47f9-88c1-6f45bfb15a14_RP" ], + "x-ms-messaging-activity-id": [ "94b3f00d-3b4e-45ef-82bb-80348c454158" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:18:43" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "ea66aa05-f3f3-43d3-b78a-4ebb52e17174" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051843Z:ea66aa05-f3f3-43d3-b78a-4ebb52e17174" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:16:48 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 67F8DD29CACC49D5B9876622642C2F1D Ref B: SEL221051504035 Ref C: 2024-04-30T05:18:42Z" ], + "Date": [ "Tue, 30 Apr 2024 05:18:42 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "957" ], + "Content-Length": [ "959" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1\",\"name\":\"subscription1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T13:02:44.2354247Z\",\"updatedAt\":\"2023-02-19T13:02:44.2354247Z\",\"accessedAt\":\"2023-02-19T13:02:44.235Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1\",\"name\":\"subscription1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T05:06:37.7332631Z\",\"updatedAt\":\"2024-04-30T05:06:37.7332631Z\",\"accessedAt\":\"2024-04-30T05:06:37.733Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusTopic.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusTopic.Recording.json index a14c533cbb1c..bde354163605 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusTopic.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Get-AzServiceBusTopic.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzServiceBusTopic+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusTopic+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "58" ], - "x-ms-client-request-id": [ "d042aadf-f589-4644-bc33-92a05ef8445e" ], + "x-ms-unique-id": [ "55" ], + "x-ms-client-request-id": [ "6fdfd3f0-a68a-45f2-9579-3117388e41d5" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,37 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11918" ], - "x-ms-request-id": [ "fe7d1843-e381-492e-a769-2825481f258d" ], - "x-ms-correlation-request-id": [ "fe7d1843-e381-492e-a769-2825481f258d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131703Z:fe7d1843-e381-492e-a769-2825481f258d" ], + "x-ms-correlation-request-id": [ "782f3ce5-2c03-4192-89bd-1518c479657f" ], + "x-ms-client-request-id": [ "6fdfd3f0-a68a-45f2-9579-3117388e41d5_RP" ], + "x-ms-messaging-activity-id": [ "a57e5314-ccd4-4a04-9faf-799d7ca2b997" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:19:01" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "782f3ce5-2c03-4192-89bd-1518c479657f" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051901Z:782f3ce5-2c03-4192-89bd-1518c479657f" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:17:03 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4F41D0216D6F47C782BE944585EC5158 Ref B: SEL221051504035 Ref C: 2024-04-30T05:18:59Z" ], + "Date": [ "Tue, 30 Apr 2024 05:19:00 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "960" ], + "Content-Length": [ "962" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T13:02:41.6883314Z\",\"updatedAt\":\"2023-02-19T13:06:12.9556032Z\",\"accessedAt\":\"2023-02-19T13:02:44.235Z\",\"subscriptionCount\":1,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T05:06:34.7644423Z\",\"updatedAt\":\"2024-04-30T05:11:26.9591592Z\",\"accessedAt\":\"2024-04-30T05:06:37.733Z\",\"subscriptionCount\":1,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Get-AzServiceBusTopic+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusTopic+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "59" ], - "x-ms-client-request-id": [ "4d2b3be9-e11e-4266-8ec0-e60f9da52528" ], + "x-ms-unique-id": [ "56" ], + "x-ms-client-request-id": [ "33ce4e6c-3802-444a-bc1b-b2e7677e6b4a" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,37 +69,42 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-inline-count": [ "" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11917" ], - "x-ms-request-id": [ "4164f867-e56d-4f72-8480-82906abe4b70" ], - "x-ms-correlation-request-id": [ "4164f867-e56d-4f72-8480-82906abe4b70" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131704Z:4164f867-e56d-4f72-8480-82906abe4b70" ], + "x-ms-correlation-request-id": [ "7c69f863-6e9d-4b07-8597-4a648f0ed2d9" ], + "x-ms-client-request-id": [ "33ce4e6c-3802-444a-bc1b-b2e7677e6b4a_RP" ], + "x-ms-messaging-activity-id": [ "13e9dc1a-579f-4ca2-afae-b11a42237cca" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T05:19:02" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "7c69f863-6e9d-4b07-8597-4a648f0ed2d9" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051902Z:7c69f863-6e9d-4b07-8597-4a648f0ed2d9" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:17:04 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 17C0D7270AA045BE815CCFB5F12A695E Ref B: SEL221051504035 Ref C: 2024-04-30T05:19:01Z" ], + "Date": [ "Tue, 30 Apr 2024 05:19:02 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "972" ], + "Content-Length": [ "974" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T13:02:41.6883314Z\",\"updatedAt\":\"2023-02-19T13:06:12.9556032Z\",\"accessedAt\":\"2023-02-19T13:02:44.235Z\",\"subscriptionCount\":1,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T05:06:34.7644423Z\",\"updatedAt\":\"2024-04-30T05:11:26.9591592Z\",\"accessedAt\":\"2024-04-30T05:06:37.733Z\",\"subscriptionCount\":1,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}]}", "isContentBase64": false } }, - "Get-AzServiceBusTopic+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1?api-version=2022-10-01-preview+1": { + "Get-AzServiceBusTopic+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "60" ], - "x-ms-client-request-id": [ "c8495f04-4d06-45f5-99ac-98edb23279cd" ], + "x-ms-unique-id": [ "57" ], + "x-ms-client-request-id": [ "ddde2c06-8007-4673-974b-75f96705a835" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -105,21 +115,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11916" ], - "x-ms-request-id": [ "1e8da0eb-d3f2-4901-9e40-3b97503f65b3" ], - "x-ms-correlation-request-id": [ "1e8da0eb-d3f2-4901-9e40-3b97503f65b3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131705Z:1e8da0eb-d3f2-4901-9e40-3b97503f65b3" ], + "x-ms-correlation-request-id": [ "172f8ba5-9af9-411b-9def-c44d3eb2f512" ], + "x-ms-client-request-id": [ "ddde2c06-8007-4673-974b-75f96705a835_RP" ], + "x-ms-messaging-activity-id": [ "f398f783-e8c1-4c63-ba76-09df9d77867e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T05:19:03" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "172f8ba5-9af9-411b-9def-c44d3eb2f512" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T051903Z:172f8ba5-9af9-411b-9def-c44d3eb2f512" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:17:04 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 16031C38AB184F369F4A96E53E6F3626 Ref B: SEL221051504035 Ref C: 2024-04-30T05:19:03Z" ], + "Date": [ "Tue, 30 Apr 2024 05:19:02 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "960" ], + "Content-Length": [ "962" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T13:02:41.6883314Z\",\"updatedAt\":\"2023-02-19T13:06:12.9556032Z\",\"accessedAt\":\"2023-02-19T13:02:44.235Z\",\"subscriptionCount\":1,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T05:06:34.7644423Z\",\"updatedAt\":\"2024-04-30T05:11:26.9591592Z\",\"accessedAt\":\"2024-04-30T05:06:37.733Z\",\"subscriptionCount\":1,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/New-AzEventHubKeyVaultPropertiesObject.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/New-AzEventHubKeyVaultPropertiesObject.Tests.ps1 new file mode 100644 index 000000000000..5ff41ff35df1 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/test/New-AzEventHubKeyVaultPropertiesObject.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzEventHubKeyVaultPropertiesObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzEventHubKeyVaultPropertiesObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzEventHubKeyVaultPropertiesObject' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusAuthorizationRule.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusAuthorizationRule.Recording.json index 7a0258c0cf1e..3b39ade36183 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusAuthorizationRule.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusAuthorizationRule.Recording.json @@ -1,8 +1,8 @@ { - "New-AzServiceBusAuthorizationRule+[NoContext]+NewExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule3?api-version=2022-10-01-preview+1": { + "New-AzServiceBusAuthorizationRule+[NoContext]+NewExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule3?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule3?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Send\", \"Manage\", \"Listen\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -17,37 +17,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], - "x-ms-request-id": [ "9b303b4d-f6bc-48e4-81d9-affc676c14ed" ], - "x-ms-correlation-request-id": [ "9b303b4d-f6bc-48e4-81d9-affc676c14ed" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131737Z:9b303b4d-f6bc-48e4-81d9-affc676c14ed" ], + "x-ms-correlation-request-id": [ "59664303-936a-415c-9c34-7cb84698fb32" ], + "x-ms-client-request-id": [ "3679133a-25a2-4b40-9cc8-755f58e6b01a_RP" ], + "x-ms-messaging-activity-id": [ "7f588498-519e-47eb-a6ee-e9e7d63dea70" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T05:19:58" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "59664303-936a-415c-9c34-7cb84698fb32" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T051958Z:59664303-936a-415c-9c34-7cb84698fb32" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:17:37 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BCF42697A9B641EFB6AB51995E37B8B3 Ref B: SEL221051504035 Ref C: 2024-04-30T05:19:50Z" ], + "Date": [ "Tue, 30 Apr 2024 05:19:57 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "362" ], + "Content-Length": [ "364" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule3\",\"name\":\"namespaceAuthRule3\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\",\"Manage\",\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule3\",\"name\":\"namespaceAuthRule3\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\",\"Manage\",\"Listen\"]}}", "isContentBase64": false } }, - "New-AzServiceBusAuthorizationRule+[NoContext]+NewExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules?api-version=2022-10-01-preview+2": { + "New-AzServiceBusAuthorizationRule+[NoContext]+NewExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "62" ], - "x-ms-client-request-id": [ "f5e2e58e-1e23-4f62-870e-f5d49a781405" ], + "x-ms-unique-id": [ "59" ], + "x-ms-client-request-id": [ "1233cbc0-82ba-49bf-8b71-ad75890b7689" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusNamespaceAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -58,28 +63,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11915" ], - "x-ms-request-id": [ "2108298f-2954-45f5-ae3a-40307e7c731c" ], - "x-ms-correlation-request-id": [ "2108298f-2954-45f5-ae3a-40307e7c731c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131738Z:2108298f-2954-45f5-ae3a-40307e7c731c" ], + "x-ms-correlation-request-id": [ "7bbb4239-265f-4e9d-83b2-610f8040be5a" ], + "x-ms-client-request-id": [ "1233cbc0-82ba-49bf-8b71-ad75890b7689_RP" ], + "x-ms-messaging-activity-id": [ "dba61754-3631-4860-9e56-7f16799e04a1" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:20:00" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "7bbb4239-265f-4e9d-83b2-610f8040be5a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052000Z:7bbb4239-265f-4e9d-83b2-610f8040be5a" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:17:38 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 771DA98441144FC08D199C1F43DB898F Ref B: SEL221051504035 Ref C: 2024-04-30T05:19:58Z" ], + "Date": [ "Tue, 30 Apr 2024 05:19:59 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1459" ], + "Content-Length": [ "1467" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule2\",\"name\":\"namespaceAuthRule2\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule3\",\"name\":\"namespaceAuthRule3\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\",\"Manage\",\"Listen\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule2\",\"name\":\"namespaceAuthRule2\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule3\",\"name\":\"namespaceAuthRule3\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\",\"Manage\",\"Listen\"]}}]}", "isContentBase64": false } }, - "New-AzServiceBusAuthorizationRule+[NoContext]+NewExpandedQueue+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule3?api-version=2022-10-01-preview+1": { + "New-AzServiceBusAuthorizationRule+[NoContext]+NewExpandedQueue+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule3?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule3?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Listen\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -94,37 +104,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], - "x-ms-request-id": [ "11ae5e01-00da-41f4-860e-e7b392166c0d" ], - "x-ms-correlation-request-id": [ "11ae5e01-00da-41f4-860e-e7b392166c0d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131739Z:11ae5e01-00da-41f4-860e-e7b392166c0d" ], + "x-ms-correlation-request-id": [ "ac5cd129-8903-46c5-9a3d-849b402afefa" ], + "x-ms-client-request-id": [ "faf5e051-bad4-4806-9c72-c89d3bb5f528_RP" ], + "x-ms-messaging-activity-id": [ "5e1a41f5-730c-44da-b124-1bba5af2b72c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:20:03" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "ac5cd129-8903-46c5-9a3d-849b402afefa" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052003Z:ac5cd129-8903-46c5-9a3d-849b402afefa" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:17:39 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 64AB7E54F3414C9B83A40635DB1686A9 Ref B: SEL221051504035 Ref C: 2024-04-30T05:20:00Z" ], + "Date": [ "Tue, 30 Apr 2024 05:20:02 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "339" ], + "Content-Length": [ "341" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule3\",\"name\":\"queueAuthRule3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"properties\":{\"rights\":[\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule3\",\"name\":\"queueAuthRule3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"properties\":{\"rights\":[\"Listen\"]}}", "isContentBase64": false } }, - "New-AzServiceBusAuthorizationRule+[NoContext]+NewExpandedQueue+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules?api-version=2022-10-01-preview+2": { + "New-AzServiceBusAuthorizationRule+[NoContext]+NewExpandedQueue+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "64" ], - "x-ms-client-request-id": [ "76011012-4d54-45dd-b515-3e02106678aa" ], + "x-ms-unique-id": [ "61" ], + "x-ms-client-request-id": [ "cce636c9-30f6-4c9e-a9cf-8d088f289aa0" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusQueueAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusQueueAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -135,28 +150,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11914" ], - "x-ms-request-id": [ "bfd893e8-5dca-4afe-812c-35f76d31e7e2" ], - "x-ms-correlation-request-id": [ "bfd893e8-5dca-4afe-812c-35f76d31e7e2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131740Z:bfd893e8-5dca-4afe-812c-35f76d31e7e2" ], + "x-ms-correlation-request-id": [ "fb6db424-ec8c-4da5-b0b9-f0c734e49503" ], + "x-ms-client-request-id": [ "cce636c9-30f6-4c9e-a9cf-8d088f289aa0_RP" ], + "x-ms-messaging-activity-id": [ "b2932573-d73d-4b19-b26e-160b43681e52" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T05:20:05" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "fb6db424-ec8c-4da5-b0b9-f0c734e49503" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052005Z:fb6db424-ec8c-4da5-b0b9-f0c734e49503" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:17:40 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 597A4E29B243463F965E0911425F6983 Ref B: SEL221051504035 Ref C: 2024-04-30T05:20:03Z" ], + "Date": [ "Tue, 30 Apr 2024 05:20:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1123" ], + "Content-Length": [ "1129" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule2\",\"name\":\"queueAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule3\",\"name\":\"queueAuthRule3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule2\",\"name\":\"queueAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule3\",\"name\":\"queueAuthRule3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}}]}", "isContentBase64": false } }, - "New-AzServiceBusAuthorizationRule+[NoContext]+NewExpandedTopic+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule3?api-version=2022-10-01-preview+1": { + "New-AzServiceBusAuthorizationRule+[NoContext]+NewExpandedTopic+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule3?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule3?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Send\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -171,37 +191,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1192" ], - "x-ms-request-id": [ "9846b6a7-1eb9-4b64-af5e-148e831554a5" ], - "x-ms-correlation-request-id": [ "9846b6a7-1eb9-4b64-af5e-148e831554a5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131741Z:9846b6a7-1eb9-4b64-af5e-148e831554a5" ], + "x-ms-correlation-request-id": [ "4694f4d3-51a7-4455-b2fb-603f648655c2" ], + "x-ms-client-request-id": [ "d4e60d39-dbc9-4cdb-a6c1-ee3a30009d4e_RP" ], + "x-ms-messaging-activity-id": [ "1b245aca-239a-43be-9f63-0ac4c126e0a6" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:20:07" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "4694f4d3-51a7-4455-b2fb-603f648655c2" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052007Z:4694f4d3-51a7-4455-b2fb-603f648655c2" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:17:41 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 37B1D2D6E4E54017A31B1A11A59398B8 Ref B: SEL221051504035 Ref C: 2024-04-30T05:20:05Z" ], + "Date": [ "Tue, 30 Apr 2024 05:20:06 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "337" ], + "Content-Length": [ "339" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule3\",\"name\":\"topicAuthRule3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"properties\":{\"rights\":[\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule3\",\"name\":\"topicAuthRule3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"properties\":{\"rights\":[\"Send\"]}}", "isContentBase64": false } }, - "New-AzServiceBusAuthorizationRule+[NoContext]+NewExpandedTopic+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules?api-version=2022-10-01-preview+2": { + "New-AzServiceBusAuthorizationRule+[NoContext]+NewExpandedTopic+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "66" ], - "x-ms-client-request-id": [ "337742e3-4875-4c29-8a05-802a34547956" ], + "x-ms-unique-id": [ "63" ], + "x-ms-client-request-id": [ "cbb6ff0b-8d16-47f5-ad83-5849f81bda60" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusTopicAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusTopicAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -212,21 +237,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11913" ], - "x-ms-request-id": [ "c70fd9f6-12b4-44de-a3ab-dd875856fd7f" ], - "x-ms-correlation-request-id": [ "c70fd9f6-12b4-44de-a3ab-dd875856fd7f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131742Z:c70fd9f6-12b4-44de-a3ab-dd875856fd7f" ], + "x-ms-correlation-request-id": [ "a7413bc6-c67e-48b3-9af1-9bf125faeed6" ], + "x-ms-client-request-id": [ "cbb6ff0b-8d16-47f5-ad83-5849f81bda60_RP" ], + "x-ms-messaging-activity-id": [ "1d16ef15-b3a3-4fe9-abd6-822049657bb7" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:20:09" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "a7413bc6-c67e-48b3-9af1-9bf125faeed6" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052009Z:a7413bc6-c67e-48b3-9af1-9bf125faeed6" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:17:41 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: ADB55EAAE52A4A2DAAD2F3B8925568E3 Ref B: SEL221051504035 Ref C: 2024-04-30T05:20:07Z" ], + "Date": [ "Tue, 30 Apr 2024 05:20:08 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1105" ], + "Content-Length": [ "1111" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule2\",\"name\":\"topicAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule3\",\"name\":\"topicAuthRule3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule2\",\"name\":\"topicAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule3\",\"name\":\"topicAuthRule3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusGeoDRConfiguration.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusGeoDRConfiguration.Recording.json index a7e8f49312b2..702086d8cfd6 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusGeoDRConfiguration.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusGeoDRConfiguration.Recording.json @@ -1,15 +1,15 @@ { - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+1": { + "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"partnerNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"partnerNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "206" ] + "Content-Length": [ "208" ] } }, "Response": { @@ -17,80 +17,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fd14596c-f5f3-4c64-9169-9533ffa9be90_M0SN1_M0SN1" ], + "x-ms-request-id": [ "2e9a6b77-46c4-479c-826e-80cc9b3aed0a_M8SN1_M8SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1191" ], - "x-ms-correlation-request-id": [ "176301af-5a8f-4f7b-a2df-4e8c61221b1b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131800Z:176301af-5a8f-4f7b-a2df-4e8c61221b1b" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "c95e27a4-f9d9-43fd-be16-9ed07d6e0eae" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052035Z:c95e27a4-f9d9-43fd-be16-9ed07d6e0eae" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:18:00 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E3262E2675144B99805E5FDF56FFF665 Ref B: SEL221051504035 Ref C: 2024-04-30T05:20:24Z" ], + "Date": [ "Tue, 30 Apr 2024 05:20:34 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+2": { + "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "68" ], - "x-ms-client-request-id": [ "a12a9531-e957-43c3-a0d6-35a9f08ff48d" ], - "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], - "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d6c13ac4-bad6-4538-be28-bcfa62caa4d1_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11912" ], - "x-ms-correlation-request-id": [ "e29dea9e-ccc2-4b5a-a3f6-43c720a56bb8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131801Z:e29dea9e-ccc2-4b5a-a3f6-43c720a56bb8" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:18:00 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "551" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+3": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "69" ], - "x-ms-client-request-id": [ "ab394bab-213a-4b20-a021-c74d3fd0b87e" ], + "x-ms-unique-id": [ "65" ], + "x-ms-client-request-id": [ "69f86b36-27f1-4102-a069-79d3fa992e23" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -101,38 +61,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "75228768-96f3-401a-9f0b-cdad2c54cf3d_M0SN1_M0SN1" ], + "x-ms-request-id": [ "47403cf8-62b3-4a30-9786-24c02d4b2e99_M4SN1_M4SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11911" ], - "x-ms-correlation-request-id": [ "f92ad0b2-7508-4daf-b0ec-202e4d8797d7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131812Z:f92ad0b2-7508-4daf-b0ec-202e4d8797d7" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "fe6ae9cb-e09b-4b05-bb64-1659fddf4dda" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T052037Z:fe6ae9cb-e09b-4b05-bb64-1659fddf4dda" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:18:12 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EF9BB557D8FB4A96A8993F2252C59A63 Ref B: SEL221051504035 Ref C: 2024-04-30T05:20:35Z" ], + "Date": [ "Tue, 30 Apr 2024 05:20:36 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+4": { + "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "70" ], - "x-ms-client-request-id": [ "2fd230e3-3f96-40c0-9215-3059f23b906c" ], + "x-ms-unique-id": [ "66" ], + "x-ms-client-request-id": [ "5564677c-2034-4516-8c51-9939512b0cf4" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -143,38 +105,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "42452986-2c18-427d-ab9d-00e42c601658_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11910" ], - "x-ms-correlation-request-id": [ "3939ef5e-06cc-4756-9dd2-7385fbbf8502" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131823Z:3939ef5e-06cc-4756-9dd2-7385fbbf8502" ], + "x-ms-request-id": [ "bd1403b1-4ad8-4360-b801-d28caec1509c_M2CH3_M2CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "c2b8c5e3-3e15-4bc9-887f-13b78807c96c" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052049Z:c2b8c5e3-3e15-4bc9-887f-13b78807c96c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:18:22 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 51E17AD2BFC840A7A631A2EB00990404 Ref B: SEL221051504035 Ref C: 2024-04-30T05:20:47Z" ], + "Date": [ "Tue, 30 Apr 2024 05:20:49 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+5": { + "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "71" ], - "x-ms-client-request-id": [ "7761b180-6d0d-427b-a7d4-55e040c95813" ], + "x-ms-unique-id": [ "67" ], + "x-ms-client-request-id": [ "7cc7e818-9637-4d26-a6f0-e9505672f1b8" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -185,38 +149,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b667d6ee-2074-416e-ab23-e7c0af7cf9fa_M0SN1_M0SN1" ], + "x-ms-request-id": [ "b198817b-d288-4079-b822-e121541448b1_M5SN1_M5SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11909" ], - "x-ms-correlation-request-id": [ "3329ac3e-e513-4353-af3f-7b7aabaf2c94" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131833Z:3329ac3e-e513-4353-af3f-7b7aabaf2c94" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "48f5a494-8949-45ea-b975-f3978bbe9a06" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052100Z:48f5a494-8949-45ea-b975-f3978bbe9a06" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:18:33 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C405C1F6E3824024A003AAAAD435A6AF Ref B: SEL221051504035 Ref C: 2024-04-30T05:20:59Z" ], + "Date": [ "Tue, 30 Apr 2024 05:21:00 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+6": { + "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "72" ], - "x-ms-client-request-id": [ "84b5196a-ee8b-4eb6-9b3d-ed0347c9ac58" ], + "x-ms-unique-id": [ "68" ], + "x-ms-client-request-id": [ "c1aa9254-8229-4742-9d3c-3a7b8e899e56" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -227,38 +193,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b0f90b84-3912-4a9e-a3e1-f7a85256e352_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11908" ], - "x-ms-correlation-request-id": [ "f460f0cb-acce-4737-aea1-31c3ae20aaaf" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131844Z:f460f0cb-acce-4737-aea1-31c3ae20aaaf" ], + "x-ms-request-id": [ "40d146b9-4f14-48fa-93a3-f8e320d6437c_M6CH3_M6CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "3b1888e1-b99c-419a-a716-e38f03afe181" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052112Z:3b1888e1-b99c-419a-a716-e38f03afe181" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:18:43 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 88A8AAFF7D4F4FD7936F1D89BD0C1564 Ref B: SEL221051504035 Ref C: 2024-04-30T05:21:10Z" ], + "Date": [ "Tue, 30 Apr 2024 05:21:12 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+7": { + "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "73" ], - "x-ms-client-request-id": [ "556b9a12-4881-432d-a0ff-716c9f67140d" ], + "x-ms-unique-id": [ "69" ], + "x-ms-client-request-id": [ "a48c5757-14c6-46db-81f8-509af7265d77" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -269,38 +237,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3e2fc7a0-704c-473b-a8e8-78304906a874_M0SN1_M0SN1" ], + "x-ms-request-id": [ "58562974-ab96-4a88-8f26-b2cb603182f4_M5SN1_M5SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11907" ], - "x-ms-correlation-request-id": [ "66c092a0-edb4-4e20-8285-18bfcf3ae9c6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131855Z:66c092a0-edb4-4e20-8285-18bfcf3ae9c6" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "d5c6a8ca-8a38-459c-9e94-0ee7c87540e2" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T052125Z:d5c6a8ca-8a38-459c-9e94-0ee7c87540e2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:18:55 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4FB111898FAB4DE7B1DF21495DC31A12 Ref B: SEL221051504035 Ref C: 2024-04-30T05:21:22Z" ], + "Date": [ "Tue, 30 Apr 2024 05:21:25 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+8": { + "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "74" ], - "x-ms-client-request-id": [ "cf249e32-a8d6-4313-bf8a-1daf734d7446" ], + "x-ms-unique-id": [ "70" ], + "x-ms-client-request-id": [ "b9c02a7c-74ca-45b7-8ed5-264a29bff8d9" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -311,38 +281,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "23f41620-6003-4756-ab9d-a71810a267ba_M0SN1_M0SN1" ], + "x-ms-request-id": [ "17c1811a-d7eb-4092-af7f-8dca6f2e16f7_M5SN1_M5SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11906" ], - "x-ms-correlation-request-id": [ "c002898a-197b-4ba3-9aa3-16d2143f72e0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131906Z:c002898a-197b-4ba3-9aa3-16d2143f72e0" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-correlation-request-id": [ "3338d8cc-667f-48b8-a8e4-ba19356ffd5d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052135Z:3338d8cc-667f-48b8-a8e4-ba19356ffd5d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:19:05 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 313771DB26F048D0884F272A9B726ADB Ref B: SEL221051504035 Ref C: 2024-04-30T05:21:35Z" ], + "Date": [ "Tue, 30 Apr 2024 05:21:35 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+9": { + "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "75" ], - "x-ms-client-request-id": [ "fb056b4b-0658-4bf4-bce1-736a24b02efb" ], + "x-ms-unique-id": [ "71" ], + "x-ms-client-request-id": [ "2ba5cb5f-e101-4505-bd68-c4dff8517717" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -353,38 +325,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d1552f85-5213-41fd-99aa-465b271ac399_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11905" ], - "x-ms-correlation-request-id": [ "1be2d1f4-7243-4bba-81a9-0f02f6c052fd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131916Z:1be2d1f4-7243-4bba-81a9-0f02f6c052fd" ], + "x-ms-request-id": [ "ae4029cb-8202-4dbd-b67f-18e7dd7b7e33_M1CH3_M1CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "d5b53195-1814-4a91-94a3-c6429ec2ec90" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052147Z:d5b53195-1814-4a91-94a3-c6429ec2ec90" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:19:15 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 62C305D417B4499587A214CC6DFC449C Ref B: SEL221051504035 Ref C: 2024-04-30T05:21:46Z" ], + "Date": [ "Tue, 30 Apr 2024 05:21:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+10": { + "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "76" ], - "x-ms-client-request-id": [ "c42fdf8d-2c3d-4177-93e4-dc1470567a87" ], + "x-ms-unique-id": [ "72" ], + "x-ms-client-request-id": [ "07f322d5-e694-46d9-a148-b92c786c000b" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -395,38 +369,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "22a1d3c0-0a6a-43bf-bdd4-c4c65d67943a_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11904" ], - "x-ms-correlation-request-id": [ "44736492-2cec-4db1-9782-8e25a1312053" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131927Z:44736492-2cec-4db1-9782-8e25a1312053" ], + "x-ms-request-id": [ "86d211f0-1c2b-41de-bb16-7c5ec95bf528_M7CH3_M7CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "397c516f-f5e6-43dc-a404-d04a9926ae6a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052200Z:397c516f-f5e6-43dc-a404-d04a9926ae6a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:19:26 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9E2617D029974C05971A400C1B8E1941 Ref B: SEL221051504035 Ref C: 2024-04-30T05:21:57Z" ], + "Date": [ "Tue, 30 Apr 2024 05:21:59 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+11": { + "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "77" ], - "x-ms-client-request-id": [ "47e758e7-6315-408b-bf44-3bff66c242b0" ], + "x-ms-unique-id": [ "73" ], + "x-ms-client-request-id": [ "1c7ff8a6-d214-4f32-8c95-ac889862d755" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -437,38 +413,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9e06da20-27f1-47ad-8841-e0095b4c7c9e_M0SN1_M0SN1" ], + "x-ms-request-id": [ "4e697890-421b-4258-81ba-89e64eb55a30_M8SN1_M8SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11903" ], - "x-ms-correlation-request-id": [ "2e71f7b5-ca44-41da-852c-54c110cf7998" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131938Z:2e71f7b5-ca44-41da-852c-54c110cf7998" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "e6904897-183d-4b54-a4c2-abb5df4e3fb3" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052213Z:e6904897-183d-4b54-a4c2-abb5df4e3fb3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:19:38 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8C23E0B942F44FADBFCD426E94765B97 Ref B: SEL221051504035 Ref C: 2024-04-30T05:22:10Z" ], + "Date": [ "Tue, 30 Apr 2024 05:22:13 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "590" ], + "Content-Length": [ "594" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", "isContentBase64": false } }, - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+12": { + "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+11": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "78" ], - "x-ms-client-request-id": [ "f874e2e1-cf1c-4845-aa10-2ee69a30bb41" ], + "x-ms-unique-id": [ "74" ], + "x-ms-client-request-id": [ "ed74c45b-58ed-4766-b7ec-5f75e239b010" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -479,38 +457,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "65141664-c9b0-4d79-9d72-8a80d360351c_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11902" ], - "x-ms-correlation-request-id": [ "30f8487c-fa96-4f1e-b120-c510070262b1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131949Z:30f8487c-fa96-4f1e-b120-c510070262b1" ], + "x-ms-request-id": [ "ee9034ab-0d2d-4f36-b7a0-462b438f7b92_M0CH3_M0CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "9546f691-712f-49ab-875b-f16a9ecd5d34" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052224Z:9546f691-712f-49ab-875b-f16a9ecd5d34" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:19:49 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 07D85759859C429BAC3D0A5D7493AFD5 Ref B: SEL221051504035 Ref C: 2024-04-30T05:22:23Z" ], + "Date": [ "Tue, 30 Apr 2024 05:22:24 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "554" ], + "Content-Length": [ "558" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/AuthorizationRules?api-version=2022-10-01-preview+13": { + "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/AuthorizationRules?api-version=2022-10-01-preview+12": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/AuthorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/AuthorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "79" ], - "x-ms-client-request-id": [ "414bb73f-b807-48bc-a403-ce89c6e4a6eb" ], + "x-ms-unique-id": [ "75" ], + "x-ms-client-request-id": [ "d3e7d1bc-35a4-4d4c-a86a-f11c6359a253" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusNamespaceAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -521,37 +501,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11901" ], - "x-ms-request-id": [ "2d42ed21-f660-4c29-9135-0459f985ba82" ], - "x-ms-correlation-request-id": [ "2d42ed21-f660-4c29-9135-0459f985ba82" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131951Z:2d42ed21-f660-4c29-9135-0459f985ba82" ], + "x-ms-correlation-request-id": [ "2f7450b9-06d3-425a-8095-684dcaaeef08" ], + "x-ms-client-request-id": [ "d3e7d1bc-35a4-4d4c-a86a-f11c6359a253_RP" ], + "x-ms-messaging-activity-id": [ "9061592f-6fe2-495d-ab67-c5ba1bee8937" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T05:22:26" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-request-id": [ "2f7450b9-06d3-425a-8095-684dcaaeef08" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052226Z:2f7450b9-06d3-425a-8095-684dcaaeef08" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:19:51 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CA0CD39506CC4C6887A27E8E3F51449B Ref B: SEL221051504035 Ref C: 2024-04-30T05:22:24Z" ], + "Date": [ "Tue, 30 Apr 2024 05:22:26 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "384" ], + "Content-Length": [ "386" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}]}", "isContentBase64": false } }, - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1/authorizationRules?api-version=2022-10-01-preview+14": { + "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm/authorizationRules?api-version=2022-10-01-preview+13": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1/authorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm/authorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "80" ], - "x-ms-client-request-id": [ "253f3537-00c0-4841-8552-c75c95ed993a" ], + "x-ms-unique-id": [ "76" ], + "x-ms-client-request-id": [ "7c9066ff-fdba-41a3-90d8-0b58bd27df50" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -562,38 +547,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c1f9a8a1-3ee3-4681-9b6b-25475cabd227_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11900" ], - "x-ms-correlation-request-id": [ "d9284f98-f02c-4d73-9c7f-d0e0f378c1c9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131952Z:d9284f98-f02c-4d73-9c7f-d0e0f378c1c9" ], + "x-ms-request-id": [ "09c0befb-b86d-48e6-b8eb-f6f0a6cccc41_M5CH3_M5CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "0b12f9a7-7c94-40a5-8d9f-dad58857b94f" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052228Z:0b12f9a7-7c94-40a5-8d9f-dad58857b94f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:19:52 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EB3A6CA911B14F38A58FF2F8B24E1159 Ref B: SEL221051504035 Ref C: 2024-04-30T05:22:26Z" ], + "Date": [ "Tue, 30 Apr 2024 05:22:28 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "421" ], + "Content-Length": [ "423" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1/authorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm/authorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}]}", "isContentBase64": false } }, - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1/authorizationRules/RootManageSharedAccessKey?api-version=2022-10-01-preview+15": { + "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm/authorizationRules/RootManageSharedAccessKey?api-version=2022-10-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1/authorizationRules/RootManageSharedAccessKey?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm/authorizationRules/RootManageSharedAccessKey?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "81" ], - "x-ms-client-request-id": [ "8c7211b5-1b2e-4f2c-add2-01cc1e098ae8" ], + "x-ms-unique-id": [ "77" ], + "x-ms-client-request-id": [ "e23601b7-0b9c-415a-97f6-414ace7711a4" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzServiceBusDisasterRecoveryConfigAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -604,38 +591,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1a37bfbf-e965-4d8c-8178-55bc89a336ec_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11899" ], - "x-ms-correlation-request-id": [ "46afbb52-42a0-41b8-ba06-c8f6cda60ac2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131954Z:46afbb52-42a0-41b8-ba06-c8f6cda60ac2" ], + "x-ms-request-id": [ "91a4faa1-b1d6-4e3c-9204-331b5de3b729_M8CH3_M8CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "12e801a4-6345-4591-9118-d809f519f38c" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052230Z:12e801a4-6345-4591-9118-d809f519f38c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:19:53 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 42F19523BF804DCB818F11603F25B386 Ref B: SEL221051504035 Ref C: 2024-04-30T05:22:28Z" ], + "Date": [ "Tue, 30 Apr 2024 05:22:30 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "409" ], + "Content-Length": [ "411" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1/authorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm/authorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}", "isContentBase64": false } }, - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2022-10-01-preview+16": { + "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2022-10-01-preview+15": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "82" ], - "x-ms-client-request-id": [ "7b831e84-c0b0-4921-aecf-acfb91af6527" ], + "x-ms-unique-id": [ "78" ], + "x-ms-client-request-id": [ "6b834c6e-829c-4407-a4e5-41b5c694a73d" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusDisasterRecoveryConfigKey_List" ], "FullCommandName": [ "Get-AzServiceBusDisasterRecoveryConfigKey_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -646,38 +635,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0e33c707-da92-49e2-9f2c-42ae242502b9_M0SN1_M0SN1" ], + "x-ms-request-id": [ "b8d60441-8b89-43f2-9b1f-22acadb76d9a_M0SN1_M0SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], - "x-ms-correlation-request-id": [ "5cd65285-59fc-4ee0-8e2b-449b3e7f4a14" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131955Z:5cd65285-59fc-4ee0-8e2b-449b3e7f4a14" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "c22a9d55-154c-46cb-a7e3-dcc9109c1919" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052232Z:c22a9d55-154c-46cb-a7e3-dcc9109c1919" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:19:54 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 562F10F4F8FD43CA8CB745A63B3FB3EF Ref B: SEL221051504035 Ref C: 2024-04-30T05:22:30Z" ], + "Date": [ "Tue, 30 Apr 2024 05:22:32 GMT" ] }, "ContentHeaders": { "Content-Length": [ "543" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"aliasPrimaryConnectionString\":\"Endpoint=sb://aliasq6x0t1.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=HNrXc7IiHxxeHD7x5iYDiyLfLpkRP0sBk+ASbFD8bYQ=\",\"aliasSecondaryConnectionString\":\"Endpoint=sb://aliasq6x0t1.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=VAu5g+N3k3O7rGlhPzDXU+PXo9ISCsNs3+ASbNbJzmA=\",\"primaryKey\":\"HNrXc7IiHxxeHD7x5iYDiyLfLpkRP0sBk+ASbFD8bYQ=\",\"secondaryKey\":\"VAu5g+N3k3O7rGlhPzDXU+PXo9ISCsNs3+ASbNbJzmA=\",\"keyName\":\"RootManageSharedAccessKey\"}", + "Content": "{\"aliasPrimaryConnectionString\":\"Endpoint=sb://aliastkildm.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=cGUrsVDURvxEYYP7L6SzKsvdn23zjmvYH+ASbLJEjOY=\",\"aliasSecondaryConnectionString\":\"Endpoint=sb://aliastkildm.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=6wmpxjYivCvbS3ZNnzy/zC/6k+6byrtTz+ASbKBDuWw=\",\"primaryKey\":\"cGUrsVDURvxEYYP7L6SzKsvdn23zjmvYH+ASbLJEjOY=\",\"secondaryKey\":\"6wmpxjYivCvbS3ZNnzy/zC/6k+6byrtTz+ASbKBDuWw=\",\"keyName\":\"RootManageSharedAccessKey\"}", "isContentBase64": false } }, - "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/AuthorizationRules/RootManageSharedAccessKey/listKeys?api-version=2022-10-01-preview+17": { + "New-AzServiceBusGeoDRConfiguration+[NoContext]+CreateExpanded+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/AuthorizationRules/RootManageSharedAccessKey/listKeys?api-version=2022-10-01-preview+16": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/AuthorizationRules/RootManageSharedAccessKey/listKeys?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/AuthorizationRules/RootManageSharedAccessKey/listKeys?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "83" ], - "x-ms-client-request-id": [ "b61d71ae-b4e7-41db-a26b-1946ce079991" ], + "x-ms-unique-id": [ "79" ], + "x-ms-client-request-id": [ "56f63473-430f-48b6-8222-e8ab6e2862a2" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceKey_List" ], "FullCommandName": [ "Get-AzServiceBusNamespaceKey_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -688,21 +679,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], - "x-ms-request-id": [ "26543899-893c-439d-8dcb-99601c1187e8" ], - "x-ms-correlation-request-id": [ "26543899-893c-439d-8dcb-99601c1187e8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T131956Z:26543899-893c-439d-8dcb-99601c1187e8" ], + "x-ms-correlation-request-id": [ "65f94e3a-5d07-4249-a77e-81bd340d10e9" ], + "x-ms-client-request-id": [ "56f63473-430f-48b6-8222-e8ab6e2862a2_RP" ], + "x-ms-messaging-activity-id": [ "e213b297-7fe7-4217-a4f9-b711e9195ff7" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:22:34" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "65f94e3a-5d07-4249-a77e-81bd340d10e9" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052234Z:65f94e3a-5d07-4249-a77e-81bd340d10e9" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:19:55 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DFF2EC95061A48A69B4C45B0DB621620 Ref B: SEL221051504035 Ref C: 2024-04-30T05:22:32Z" ], + "Date": [ "Tue, 30 Apr 2024 05:22:34 GMT" ] }, "ContentHeaders": { "Content-Length": [ "923" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://primarynsd7oma3.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=HNrXc7IiHxxeHD7x5iYDiyLfLpkRP0sBk+ASbFD8bYQ=\",\"secondaryConnectionString\":\"Endpoint=sb://primarynsd7oma3.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=VAu5g+N3k3O7rGlhPzDXU+PXo9ISCsNs3+ASbNbJzmA=\",\"primaryKey\":\"HNrXc7IiHxxeHD7x5iYDiyLfLpkRP0sBk+ASbFD8bYQ=\",\"secondaryKey\":\"VAu5g+N3k3O7rGlhPzDXU+PXo9ISCsNs3+ASbNbJzmA=\",\"keyName\":\"RootManageSharedAccessKey\",\"aliasPrimaryConnectionString\":\"Endpoint=sb://aliasq6x0t1.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=HNrXc7IiHxxeHD7x5iYDiyLfLpkRP0sBk+ASbFD8bYQ=\",\"aliasSecondaryConnectionString\":\"Endpoint=sb://aliasq6x0t1.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=VAu5g+N3k3O7rGlhPzDXU+PXo9ISCsNs3+ASbNbJzmA=\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://primarynsibt9vz.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=cGUrsVDURvxEYYP7L6SzKsvdn23zjmvYH+ASbLJEjOY=\",\"secondaryConnectionString\":\"Endpoint=sb://primarynsibt9vz.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=6wmpxjYivCvbS3ZNnzy/zC/6k+6byrtTz+ASbKBDuWw=\",\"primaryKey\":\"cGUrsVDURvxEYYP7L6SzKsvdn23zjmvYH+ASbLJEjOY=\",\"secondaryKey\":\"6wmpxjYivCvbS3ZNnzy/zC/6k+6byrtTz+ASbKBDuWw=\",\"keyName\":\"RootManageSharedAccessKey\",\"aliasPrimaryConnectionString\":\"Endpoint=sb://aliastkildm.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=cGUrsVDURvxEYYP7L6SzKsvdn23zjmvYH+ASbLJEjOY=\",\"aliasSecondaryConnectionString\":\"Endpoint=sb://aliastkildm.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=6wmpxjYivCvbS3ZNnzy/zC/6k+6byrtTz+ASbKBDuWw=\"}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusGeoDRConfiguration.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusGeoDRConfiguration.Tests.ps1 index 89d7e6c041bd..d522bdabf7e3 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusGeoDRConfiguration.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusGeoDRConfiguration.Tests.ps1 @@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzServiceBusGeoDRConfigur } Describe 'New-AzServiceBusGeoDRConfiguration' { - It 'CreateExpanded' { + It 'CreateExpanded' -skip:$($env.secondaryLocation -eq '') { $drConfig = New-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace -PartnerNamespace $env.secondaryNamespaceResourceId $drConfig.ResourceGroupName | Should -Be $env.resourceGroup $drConfig.Name | Should -Be $env.alias @@ -24,7 +24,7 @@ Describe 'New-AzServiceBusGeoDRConfiguration' { while($drConfig.ProvisioningState -ne "Succeeded"){ $drConfig = Get-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace - Start-TestSleep 10 + Start-Sleep 10 } $drConfig = Get-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.secondaryNamespace diff --git a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusKey.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusKey.Recording.json index aca64d313b6b..260332342a07 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusKey.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusKey.Recording.json @@ -1,17 +1,17 @@ { - "New-AzServiceBusKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1/listKeys?api-version=2022-10-01-preview+1": { + "New-AzServiceBusKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1/listKeys?api-version=2022-10-01-preview+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1/listKeys?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1/listKeys?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "84" ], - "x-ms-client-request-id": [ "9d9fddbb-1c75-4ce4-a4f7-ffc71a6bbe76" ], + "x-ms-unique-id": [ "80" ], + "x-ms-client-request-id": [ "ba88da38-cb68-40c8-b818-34a54471daf2" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceKey_List" ], "FullCommandName": [ "Get-AzServiceBusNamespaceKey_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,28 +22,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], - "x-ms-request-id": [ "57f98227-a25c-4a12-afc8-a8eb6f5891bb" ], - "x-ms-correlation-request-id": [ "57f98227-a25c-4a12-afc8-a8eb6f5891bb" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132022Z:57f98227-a25c-4a12-afc8-a8eb6f5891bb" ], + "x-ms-correlation-request-id": [ "3122e1be-9080-4767-a3af-76c672102afb" ], + "x-ms-client-request-id": [ "ba88da38-cb68-40c8-b818-34a54471daf2_RP" ], + "x-ms-messaging-activity-id": [ "dfd775ab-2140-4792-9ada-bdc55af1aaa9" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:23:08" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "3122e1be-9080-4767-a3af-76c672102afb" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052308Z:3122e1be-9080-4767-a3af-76c672102afb" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:20:21 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3323D36A080345D4ADCE2407632BF7AA Ref B: SEL221051504035 Ref C: 2024-04-30T05:23:06Z" ], + "Date": [ "Tue, 30 Apr 2024 05:23:08 GMT" ] }, "ContentHeaders": { "Content-Length": [ "528" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=x6oIGJ4kG+21Tg8d8Q68Hz3nnygn5ebHy+ASbCB3YvE=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=XVfSwAW8/2zZ0gMmpeE5sRx3ern/rKCv7+ASbGdJ0is=\",\"primaryKey\":\"x6oIGJ4kG+21Tg8d8Q68Hz3nnygn5ebHy+ASbCB3YvE=\",\"secondaryKey\":\"XVfSwAW8/2zZ0gMmpeE5sRx3ern/rKCv7+ASbGdJ0is=\",\"keyName\":\"namespaceAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=KvozQe/8xX2EZwk1Cz844VOcsVqfeN0YH+ASbFHvObI=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=6dkAPQE1hphI851Z5NK4h96TybT+gTPio+ASbACZH14=\",\"primaryKey\":\"KvozQe/8xX2EZwk1Cz844VOcsVqfeN0YH+ASbFHvObI=\",\"secondaryKey\":\"6dkAPQE1hphI851Z5NK4h96TybT+gTPio+ASbACZH14=\",\"keyName\":\"namespaceAuthRule1\"}", "isContentBase64": false } }, - "New-AzServiceBusKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1/regenerateKeys?api-version=2022-10-01-preview+2": { + "New-AzServiceBusKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1/regenerateKeys?api-version=2022-10-01-preview+2": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1/regenerateKeys?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1/regenerateKeys?api-version=2022-10-01-preview", "Content": "{\n \"keyType\": \"PrimaryKey\"\n}", "isContentBase64": false, "Headers": { @@ -58,28 +63,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1192" ], - "x-ms-request-id": [ "096733ab-f188-43a2-aeb1-ebadf2ad605f" ], - "x-ms-correlation-request-id": [ "096733ab-f188-43a2-aeb1-ebadf2ad605f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132028Z:096733ab-f188-43a2-aeb1-ebadf2ad605f" ], + "x-ms-correlation-request-id": [ "d3e5176a-3cf0-44ce-8442-727a11e841dc" ], + "x-ms-client-request-id": [ "9406504d-faad-4b20-833f-56cf910738c9_RP" ], + "x-ms-messaging-activity-id": [ "a07c805f-00d9-486d-bf84-864c20c1e705" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:23:15" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "d3e5176a-3cf0-44ce-8442-727a11e841dc" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052315Z:d3e5176a-3cf0-44ce-8442-727a11e841dc" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:20:27 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F307B07E242B419A9E62B6E86B80FB0B Ref B: SEL221051504035 Ref C: 2024-04-30T05:23:08Z" ], + "Date": [ "Tue, 30 Apr 2024 05:23:15 GMT" ] }, "ContentHeaders": { "Content-Length": [ "528" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=0Z3rjRhrkqqfBptc4wqxkJjK7oZqiU3xD+ASbIB4lfA=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=XVfSwAW8/2zZ0gMmpeE5sRx3ern/rKCv7+ASbGdJ0is=\",\"primaryKey\":\"0Z3rjRhrkqqfBptc4wqxkJjK7oZqiU3xD+ASbIB4lfA=\",\"secondaryKey\":\"XVfSwAW8/2zZ0gMmpeE5sRx3ern/rKCv7+ASbGdJ0is=\",\"keyName\":\"namespaceAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=4N2lyCCdHxeBXU0lP1OnN4zHVpVIhr8x2+ASbAMYsWU=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=6dkAPQE1hphI851Z5NK4h96TybT+gTPio+ASbACZH14=\",\"primaryKey\":\"4N2lyCCdHxeBXU0lP1OnN4zHVpVIhr8x2+ASbAMYsWU=\",\"secondaryKey\":\"6dkAPQE1hphI851Z5NK4h96TybT+gTPio+ASbACZH14=\",\"keyName\":\"namespaceAuthRule1\"}", "isContentBase64": false } }, - "New-AzServiceBusKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1/regenerateKeys?api-version=2022-10-01-preview+3": { + "New-AzServiceBusKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1/regenerateKeys?api-version=2022-10-01-preview+3": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1/regenerateKeys?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1/regenerateKeys?api-version=2022-10-01-preview", "Content": "{\n \"keyType\": \"SecondaryKey\"\n}", "isContentBase64": false, "Headers": { @@ -94,29 +104,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1191" ], - "x-ms-request-id": [ "853b3f55-462f-4ad0-85bf-815718269baa" ], - "x-ms-correlation-request-id": [ "853b3f55-462f-4ad0-85bf-815718269baa" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132035Z:853b3f55-462f-4ad0-85bf-815718269baa" ], + "x-ms-correlation-request-id": [ "83aa6d75-1adc-4d68-859d-b76829808176" ], + "x-ms-client-request-id": [ "1fb34c3d-f0e3-4e8a-997d-1c7adc695d0a_RP" ], + "x-ms-messaging-activity-id": [ "7f015126-e560-4892-9338-cac4076746bb" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:23:22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "83aa6d75-1adc-4d68-859d-b76829808176" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052322Z:83aa6d75-1adc-4d68-859d-b76829808176" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:20:35 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 901E87A4988D42B199FC9FBDCA3F4E6B Ref B: SEL221051504035 Ref C: 2024-04-30T05:23:16Z" ], + "Date": [ "Tue, 30 Apr 2024 05:23:22 GMT" ] }, "ContentHeaders": { "Content-Length": [ "528" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=0Z3rjRhrkqqfBptc4wqxkJjK7oZqiU3xD+ASbIB4lfA=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=l3sDYEXJv+msVJF8RLObbbrFYCnEjxsJC+ASbK1HKTA=\",\"primaryKey\":\"0Z3rjRhrkqqfBptc4wqxkJjK7oZqiU3xD+ASbIB4lfA=\",\"secondaryKey\":\"l3sDYEXJv+msVJF8RLObbbrFYCnEjxsJC+ASbK1HKTA=\",\"keyName\":\"namespaceAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=4N2lyCCdHxeBXU0lP1OnN4zHVpVIhr8x2+ASbAMYsWU=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=CwL3Q2mUDd1zBs7TcV8oPkpw1tzRjak6e+ASbDnct2U=\",\"primaryKey\":\"4N2lyCCdHxeBXU0lP1OnN4zHVpVIhr8x2+ASbAMYsWU=\",\"secondaryKey\":\"CwL3Q2mUDd1zBs7TcV8oPkpw1tzRjak6e+ASbDnct2U=\",\"keyName\":\"namespaceAuthRule1\"}", "isContentBase64": false } }, - "New-AzServiceBusKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1/regenerateKeys?api-version=2022-10-01-preview+4": { + "New-AzServiceBusKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1/regenerateKeys?api-version=2022-10-01-preview+4": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1/regenerateKeys?api-version=2022-10-01-preview", - "Content": "{\n \"keyType\": \"PrimaryKey\",\n \"key\": \"0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1/regenerateKeys?api-version=2022-10-01-preview", + "Content": "{\n \"keyType\": \"PrimaryKey\",\n \"key\": \"Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\"\n}", "isContentBase64": false, "Headers": { }, @@ -130,29 +145,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1190" ], - "x-ms-request-id": [ "3d6e49e7-f244-49d9-8683-5ba8ce8f16a8" ], - "x-ms-correlation-request-id": [ "3d6e49e7-f244-49d9-8683-5ba8ce8f16a8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132042Z:3d6e49e7-f244-49d9-8683-5ba8ce8f16a8" ], + "x-ms-correlation-request-id": [ "12352f71-cf47-48b8-a9c5-f0d2854fac9a" ], + "x-ms-client-request-id": [ "4f170e77-a8ff-48d1-8c77-b31eeb8c306f_RP" ], + "x-ms-messaging-activity-id": [ "d3a2d8e1-db9e-40ba-9343-60108efc7296" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T05:23:30" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "12352f71-cf47-48b8-a9c5-f0d2854fac9a" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052330Z:12352f71-cf47-48b8-a9c5-f0d2854fac9a" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:20:42 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EF6BE7D1331F41118785F2DFFE378A99 Ref B: SEL221051504035 Ref C: 2024-04-30T05:23:22Z" ], + "Date": [ "Tue, 30 Apr 2024 05:23:30 GMT" ] }, "ContentHeaders": { "Content-Length": [ "528" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=l3sDYEXJv+msVJF8RLObbbrFYCnEjxsJC+ASbK1HKTA=\",\"primaryKey\":\"0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\",\"secondaryKey\":\"l3sDYEXJv+msVJF8RLObbbrFYCnEjxsJC+ASbK1HKTA=\",\"keyName\":\"namespaceAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=CwL3Q2mUDd1zBs7TcV8oPkpw1tzRjak6e+ASbDnct2U=\",\"primaryKey\":\"Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\",\"secondaryKey\":\"CwL3Q2mUDd1zBs7TcV8oPkpw1tzRjak6e+ASbDnct2U=\",\"keyName\":\"namespaceAuthRule1\"}", "isContentBase64": false } }, - "New-AzServiceBusKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1/regenerateKeys?api-version=2022-10-01-preview+5": { + "New-AzServiceBusKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1/regenerateKeys?api-version=2022-10-01-preview+5": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1/regenerateKeys?api-version=2022-10-01-preview", - "Content": "{\n \"keyType\": \"SecondaryKey\",\n \"key\": \"0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1/regenerateKeys?api-version=2022-10-01-preview", + "Content": "{\n \"keyType\": \"SecondaryKey\",\n \"key\": \"Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\"\n}", "isContentBase64": false, "Headers": { }, @@ -166,37 +186,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1189" ], - "x-ms-request-id": [ "cd34eed1-80b8-4dbe-b2b7-173f1e8c0f3d" ], - "x-ms-correlation-request-id": [ "cd34eed1-80b8-4dbe-b2b7-173f1e8c0f3d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132049Z:cd34eed1-80b8-4dbe-b2b7-173f1e8c0f3d" ], + "x-ms-correlation-request-id": [ "e8d1a04e-5966-425c-9fee-ab7915992666" ], + "x-ms-client-request-id": [ "c3dbc60c-de7d-4dd7-b80c-0638ff5d1417_RP" ], + "x-ms-messaging-activity-id": [ "6de0213d-ef45-47c3-a72a-c9d8a0cfc442" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T05:23:38" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "e8d1a04e-5966-425c-9fee-ab7915992666" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052338Z:e8d1a04e-5966-425c-9fee-ab7915992666" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:20:49 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E91FD064300048A282C310055BA26E22 Ref B: SEL221051504035 Ref C: 2024-04-30T05:23:30Z" ], + "Date": [ "Tue, 30 Apr 2024 05:23:38 GMT" ] }, "ContentHeaders": { "Content-Length": [ "528" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\",\"primaryKey\":\"0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\",\"secondaryKey\":\"0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\",\"keyName\":\"namespaceAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=namespaceAuthRule1;SharedAccessKey=Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\",\"primaryKey\":\"Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\",\"secondaryKey\":\"Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\",\"keyName\":\"namespaceAuthRule1\"}", "isContentBase64": false } }, - "New-AzServiceBusKey+[NoContext]+NewExpandedQueue+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1/ListKeys?api-version=2022-10-01-preview+1": { + "New-AzServiceBusKey+[NoContext]+NewExpandedQueue+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1/ListKeys?api-version=2022-10-01-preview+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1/ListKeys?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1/ListKeys?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "89" ], - "x-ms-client-request-id": [ "d15cfed2-3574-45ca-b694-b3ea327281e0" ], + "x-ms-unique-id": [ "85" ], + "x-ms-client-request-id": [ "cbc6b2a2-75e4-44a3-920b-fae5305f09d1" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusQueueKey_List" ], "FullCommandName": [ "Get-AzServiceBusQueueKey_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -207,28 +232,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1188" ], - "x-ms-request-id": [ "d5e4888f-331f-4805-9057-4d3db8d1ef6d" ], - "x-ms-correlation-request-id": [ "d5e4888f-331f-4805-9057-4d3db8d1ef6d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132050Z:d5e4888f-331f-4805-9057-4d3db8d1ef6d" ], + "x-ms-correlation-request-id": [ "7720d352-85c5-4371-98af-533bf2b1ed16" ], + "x-ms-client-request-id": [ "cbc6b2a2-75e4-44a3-920b-fae5305f09d1_RP" ], + "x-ms-messaging-activity-id": [ "136145b0-92f5-4897-a595-68f9dc60f8cd" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T05:23:40" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "7720d352-85c5-4371-98af-533bf2b1ed16" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052340Z:7720d352-85c5-4371-98af-533bf2b1ed16" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:20:50 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C491C6C69F4B415B84043149DC796A79 Ref B: SEL221051504035 Ref C: 2024-04-30T05:23:38Z" ], + "Date": [ "Tue, 30 Apr 2024 05:23:40 GMT" ] }, "ContentHeaders": { "Content-Length": [ "552" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=TuGK3T3dv9NQC1Ga7KezLgzpV5x/3NCRs+ASbNm52ok=;EntityPath=queue1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=jzpzNASrPw8MizwCbMpQLXBEbFaTGgyjo+ASbI+BS5c=;EntityPath=queue1\",\"primaryKey\":\"TuGK3T3dv9NQC1Ga7KezLgzpV5x/3NCRs+ASbNm52ok=\",\"secondaryKey\":\"jzpzNASrPw8MizwCbMpQLXBEbFaTGgyjo+ASbI+BS5c=\",\"keyName\":\"queueAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=aBRueSXKnb7h0bQ2nL8XyXxPtrX2IDRAR+ASbArnvSg=;EntityPath=queue1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=QxWXHNqZqpE2JNQPm6CL7rerm8KSGsTL9+ASbPJD/sc=;EntityPath=queue1\",\"primaryKey\":\"aBRueSXKnb7h0bQ2nL8XyXxPtrX2IDRAR+ASbArnvSg=\",\"secondaryKey\":\"QxWXHNqZqpE2JNQPm6CL7rerm8KSGsTL9+ASbPJD/sc=\",\"keyName\":\"queueAuthRule1\"}", "isContentBase64": false } }, - "New-AzServiceBusKey+[NoContext]+NewExpandedQueue+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1/regenerateKeys?api-version=2022-10-01-preview+2": { + "New-AzServiceBusKey+[NoContext]+NewExpandedQueue+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1/regenerateKeys?api-version=2022-10-01-preview+2": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1/regenerateKeys?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1/regenerateKeys?api-version=2022-10-01-preview", "Content": "{\n \"keyType\": \"PrimaryKey\"\n}", "isContentBase64": false, "Headers": { @@ -243,28 +273,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1187" ], - "x-ms-request-id": [ "8224fbe0-7dbb-4f06-9690-1ccbf6abf5c9" ], - "x-ms-correlation-request-id": [ "8224fbe0-7dbb-4f06-9690-1ccbf6abf5c9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132051Z:8224fbe0-7dbb-4f06-9690-1ccbf6abf5c9" ], + "x-ms-correlation-request-id": [ "73c5630b-e7e2-4525-8c79-b9a0f1550713" ], + "x-ms-client-request-id": [ "6ae40320-e5d1-4217-815a-a1d2eab369d1_RP" ], + "x-ms-messaging-activity-id": [ "2f66c6b9-c470-4a8c-bccf-b9a1d6c48262" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T05:23:42" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "73c5630b-e7e2-4525-8c79-b9a0f1550713" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052342Z:73c5630b-e7e2-4525-8c79-b9a0f1550713" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:20:51 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6BB2D0D5CB7046F3B27020C4574E7CB8 Ref B: SEL221051504035 Ref C: 2024-04-30T05:23:40Z" ], + "Date": [ "Tue, 30 Apr 2024 05:23:42 GMT" ] }, "ContentHeaders": { "Content-Length": [ "552" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=s1hNR5vPOkICdO9HlN5u+LOeJK2amMUXh+ASbIbFpIM=;EntityPath=queue1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=jzpzNASrPw8MizwCbMpQLXBEbFaTGgyjo+ASbI+BS5c=;EntityPath=queue1\",\"primaryKey\":\"s1hNR5vPOkICdO9HlN5u+LOeJK2amMUXh+ASbIbFpIM=\",\"secondaryKey\":\"jzpzNASrPw8MizwCbMpQLXBEbFaTGgyjo+ASbI+BS5c=\",\"keyName\":\"queueAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=sHAO5uGhr+QeegEWcKfZKqkEOFtdEnLlL+ASbOcct9Y=;EntityPath=queue1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=QxWXHNqZqpE2JNQPm6CL7rerm8KSGsTL9+ASbPJD/sc=;EntityPath=queue1\",\"primaryKey\":\"sHAO5uGhr+QeegEWcKfZKqkEOFtdEnLlL+ASbOcct9Y=\",\"secondaryKey\":\"QxWXHNqZqpE2JNQPm6CL7rerm8KSGsTL9+ASbPJD/sc=\",\"keyName\":\"queueAuthRule1\"}", "isContentBase64": false } }, - "New-AzServiceBusKey+[NoContext]+NewExpandedQueue+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1/regenerateKeys?api-version=2022-10-01-preview+3": { + "New-AzServiceBusKey+[NoContext]+NewExpandedQueue+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1/regenerateKeys?api-version=2022-10-01-preview+3": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1/regenerateKeys?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1/regenerateKeys?api-version=2022-10-01-preview", "Content": "{\n \"keyType\": \"SecondaryKey\"\n}", "isContentBase64": false, "Headers": { @@ -279,29 +314,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1186" ], - "x-ms-request-id": [ "01aebe66-6699-435b-9073-727650467a96" ], - "x-ms-correlation-request-id": [ "01aebe66-6699-435b-9073-727650467a96" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132052Z:01aebe66-6699-435b-9073-727650467a96" ], + "x-ms-correlation-request-id": [ "b6464d94-ad9d-4990-a2b6-11e38d59f062" ], + "x-ms-client-request-id": [ "1f269846-c7cf-4984-b1b4-3891243e88b2_RP" ], + "x-ms-messaging-activity-id": [ "63bd0915-e4da-4613-a491-d2da323cbf8f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:23:44" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "b6464d94-ad9d-4990-a2b6-11e38d59f062" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052344Z:b6464d94-ad9d-4990-a2b6-11e38d59f062" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:20:52 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: ABA2F858196E4A88B6F1CD75E2E2555E Ref B: SEL221051504035 Ref C: 2024-04-30T05:23:42Z" ], + "Date": [ "Tue, 30 Apr 2024 05:23:44 GMT" ] }, "ContentHeaders": { "Content-Length": [ "552" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=s1hNR5vPOkICdO9HlN5u+LOeJK2amMUXh+ASbIbFpIM=;EntityPath=queue1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=WWjX8zt0DuD5bHWeBU0Uh8TqV4E20akN6+ASbMgUU4I=;EntityPath=queue1\",\"primaryKey\":\"s1hNR5vPOkICdO9HlN5u+LOeJK2amMUXh+ASbIbFpIM=\",\"secondaryKey\":\"WWjX8zt0DuD5bHWeBU0Uh8TqV4E20akN6+ASbMgUU4I=\",\"keyName\":\"queueAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=sHAO5uGhr+QeegEWcKfZKqkEOFtdEnLlL+ASbOcct9Y=;EntityPath=queue1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=8Cn/iZoh9iuJ5bF1LynFkKfsEOGsqYaqP+ASbPe2Ts8=;EntityPath=queue1\",\"primaryKey\":\"sHAO5uGhr+QeegEWcKfZKqkEOFtdEnLlL+ASbOcct9Y=\",\"secondaryKey\":\"8Cn/iZoh9iuJ5bF1LynFkKfsEOGsqYaqP+ASbPe2Ts8=\",\"keyName\":\"queueAuthRule1\"}", "isContentBase64": false } }, - "New-AzServiceBusKey+[NoContext]+NewExpandedQueue+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1/regenerateKeys?api-version=2022-10-01-preview+4": { + "New-AzServiceBusKey+[NoContext]+NewExpandedQueue+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1/regenerateKeys?api-version=2022-10-01-preview+4": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1/regenerateKeys?api-version=2022-10-01-preview", - "Content": "{\n \"keyType\": \"PrimaryKey\",\n \"key\": \"0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1/regenerateKeys?api-version=2022-10-01-preview", + "Content": "{\n \"keyType\": \"PrimaryKey\",\n \"key\": \"Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\"\n}", "isContentBase64": false, "Headers": { }, @@ -315,29 +355,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1185" ], - "x-ms-request-id": [ "3b5669a3-f4a4-4ee3-a948-bbedcc6b672f" ], - "x-ms-correlation-request-id": [ "3b5669a3-f4a4-4ee3-a948-bbedcc6b672f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132053Z:3b5669a3-f4a4-4ee3-a948-bbedcc6b672f" ], + "x-ms-correlation-request-id": [ "ab30d42e-14f0-4bcd-8f6b-a92974c4f7f3" ], + "x-ms-client-request-id": [ "c7ff146d-57b6-459e-82b4-38bbb3acb3dc_RP" ], + "x-ms-messaging-activity-id": [ "54c72de9-bed0-47e8-a711-d9f944780bb5" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:23:46" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "ab30d42e-14f0-4bcd-8f6b-a92974c4f7f3" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052346Z:ab30d42e-14f0-4bcd-8f6b-a92974c4f7f3" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:20:53 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C19991586D084481AF89591BA1B21300 Ref B: SEL221051504035 Ref C: 2024-04-30T05:23:44Z" ], + "Date": [ "Tue, 30 Apr 2024 05:23:46 GMT" ] }, "ContentHeaders": { "Content-Length": [ "552" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=;EntityPath=queue1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=WWjX8zt0DuD5bHWeBU0Uh8TqV4E20akN6+ASbMgUU4I=;EntityPath=queue1\",\"primaryKey\":\"0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\",\"secondaryKey\":\"WWjX8zt0DuD5bHWeBU0Uh8TqV4E20akN6+ASbMgUU4I=\",\"keyName\":\"queueAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=;EntityPath=queue1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=8Cn/iZoh9iuJ5bF1LynFkKfsEOGsqYaqP+ASbPe2Ts8=;EntityPath=queue1\",\"primaryKey\":\"Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\",\"secondaryKey\":\"8Cn/iZoh9iuJ5bF1LynFkKfsEOGsqYaqP+ASbPe2Ts8=\",\"keyName\":\"queueAuthRule1\"}", "isContentBase64": false } }, - "New-AzServiceBusKey+[NoContext]+NewExpandedQueue+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1/regenerateKeys?api-version=2022-10-01-preview+5": { + "New-AzServiceBusKey+[NoContext]+NewExpandedQueue+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1/regenerateKeys?api-version=2022-10-01-preview+5": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1/regenerateKeys?api-version=2022-10-01-preview", - "Content": "{\n \"keyType\": \"SecondaryKey\",\n \"key\": \"0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1/regenerateKeys?api-version=2022-10-01-preview", + "Content": "{\n \"keyType\": \"SecondaryKey\",\n \"key\": \"Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\"\n}", "isContentBase64": false, "Headers": { }, @@ -351,37 +396,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1184" ], - "x-ms-request-id": [ "b7c4021f-4843-4272-8868-a9b06b196936" ], - "x-ms-correlation-request-id": [ "b7c4021f-4843-4272-8868-a9b06b196936" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132054Z:b7c4021f-4843-4272-8868-a9b06b196936" ], + "x-ms-correlation-request-id": [ "43716c1e-3d0e-45e5-bb0b-9a5c6c5a965d" ], + "x-ms-client-request-id": [ "60fd916a-2b52-436e-97aa-d551fb0c3f58_RP" ], + "x-ms-messaging-activity-id": [ "4d3455eb-dbfe-4ff8-86d1-d3328792b770" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:23:48" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "43716c1e-3d0e-45e5-bb0b-9a5c6c5a965d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052348Z:43716c1e-3d0e-45e5-bb0b-9a5c6c5a965d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:20:53 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E1754DFB3F56431EA4A47DB6C0F1EF69 Ref B: SEL221051504035 Ref C: 2024-04-30T05:23:46Z" ], + "Date": [ "Tue, 30 Apr 2024 05:23:48 GMT" ] }, "ContentHeaders": { "Content-Length": [ "552" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=;EntityPath=queue1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=;EntityPath=queue1\",\"primaryKey\":\"0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\",\"secondaryKey\":\"0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\",\"keyName\":\"queueAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=;EntityPath=queue1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=queueAuthRule1;SharedAccessKey=Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=;EntityPath=queue1\",\"primaryKey\":\"Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\",\"secondaryKey\":\"Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\",\"keyName\":\"queueAuthRule1\"}", "isContentBase64": false } }, - "New-AzServiceBusKey+[NoContext]+NewExpandedTopic+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1/ListKeys?api-version=2022-10-01-preview+1": { + "New-AzServiceBusKey+[NoContext]+NewExpandedTopic+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1/ListKeys?api-version=2022-10-01-preview+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1/ListKeys?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1/ListKeys?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "94" ], - "x-ms-client-request-id": [ "0d642ba4-4229-4b80-87c6-7c5163b6dc94" ], + "x-ms-unique-id": [ "90" ], + "x-ms-client-request-id": [ "0175d7e5-04cf-47f5-9246-b4e6bb0cb141" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusTopicKey_List" ], "FullCommandName": [ "Get-AzServiceBusTopicKey_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -392,28 +442,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1183" ], - "x-ms-request-id": [ "f3020133-655c-4f88-8eaf-d5e213a1744a" ], - "x-ms-correlation-request-id": [ "f3020133-655c-4f88-8eaf-d5e213a1744a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132055Z:f3020133-655c-4f88-8eaf-d5e213a1744a" ], + "x-ms-correlation-request-id": [ "04edccf6-e389-4cf5-930f-20fc6036c326" ], + "x-ms-client-request-id": [ "0175d7e5-04cf-47f5-9246-b4e6bb0cb141_RP" ], + "x-ms-messaging-activity-id": [ "3f179f27-631d-4572-99f2-5155ba6b7cb1" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:23:49" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "04edccf6-e389-4cf5-930f-20fc6036c326" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052349Z:04edccf6-e389-4cf5-930f-20fc6036c326" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:20:55 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 75F060CC99914171B459F32AD5517802 Ref B: SEL221051504035 Ref C: 2024-04-30T05:23:48Z" ], + "Date": [ "Tue, 30 Apr 2024 05:23:49 GMT" ] }, "ContentHeaders": { "Content-Length": [ "552" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=f33rSyiL7n/z1Z6G+y3HdBjHEXVeZAboF+ASbHaw1ug=;EntityPath=topic1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=mpNbl3j14kx4+D5cH636PArtxDhUG6iNP+ASbP/FPQk=;EntityPath=topic1\",\"primaryKey\":\"f33rSyiL7n/z1Z6G+y3HdBjHEXVeZAboF+ASbHaw1ug=\",\"secondaryKey\":\"mpNbl3j14kx4+D5cH636PArtxDhUG6iNP+ASbP/FPQk=\",\"keyName\":\"topicAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=BmOBGX0/5mZ8fkWwefjO83mHWktV6GljU+ASbAw57Nk=;EntityPath=topic1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=kX0eNC21jNPirto1pp89dkzXJwgvkIgzF+ASbPQ95L0=;EntityPath=topic1\",\"primaryKey\":\"BmOBGX0/5mZ8fkWwefjO83mHWktV6GljU+ASbAw57Nk=\",\"secondaryKey\":\"kX0eNC21jNPirto1pp89dkzXJwgvkIgzF+ASbPQ95L0=\",\"keyName\":\"topicAuthRule1\"}", "isContentBase64": false } }, - "New-AzServiceBusKey+[NoContext]+NewExpandedTopic+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1/regenerateKeys?api-version=2022-10-01-preview+2": { + "New-AzServiceBusKey+[NoContext]+NewExpandedTopic+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1/regenerateKeys?api-version=2022-10-01-preview+2": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1/regenerateKeys?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1/regenerateKeys?api-version=2022-10-01-preview", "Content": "{\n \"keyType\": \"PrimaryKey\"\n}", "isContentBase64": false, "Headers": { @@ -428,28 +483,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1182" ], - "x-ms-request-id": [ "539be0d6-ec52-4eed-b64c-1581d435b7fb" ], - "x-ms-correlation-request-id": [ "539be0d6-ec52-4eed-b64c-1581d435b7fb" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132056Z:539be0d6-ec52-4eed-b64c-1581d435b7fb" ], + "x-ms-correlation-request-id": [ "de695878-fd63-429e-8771-640e3a3a6a52" ], + "x-ms-client-request-id": [ "526b4906-baca-4c9e-8599-33136468bcf3_RP" ], + "x-ms-messaging-activity-id": [ "412afa77-da07-42b9-81eb-f4b5afac2bba" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:23:50" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-request-id": [ "de695878-fd63-429e-8771-640e3a3a6a52" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052350Z:de695878-fd63-429e-8771-640e3a3a6a52" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:20:55 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 05DD964A9D8841AB9E88E7587B279B92 Ref B: SEL221051504035 Ref C: 2024-04-30T05:23:49Z" ], + "Date": [ "Tue, 30 Apr 2024 05:23:50 GMT" ] }, "ContentHeaders": { "Content-Length": [ "552" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=ymhvl4Pcm/+NwNbMy5DdKBkLwifstAUlN+ASbBany2s=;EntityPath=topic1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=mpNbl3j14kx4+D5cH636PArtxDhUG6iNP+ASbP/FPQk=;EntityPath=topic1\",\"primaryKey\":\"ymhvl4Pcm/+NwNbMy5DdKBkLwifstAUlN+ASbBany2s=\",\"secondaryKey\":\"mpNbl3j14kx4+D5cH636PArtxDhUG6iNP+ASbP/FPQk=\",\"keyName\":\"topicAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=y5kwFxaXRtMHFFFtLBm/BXL7RG3ZH2fdz+ASbFdQ/Uw=;EntityPath=topic1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=kX0eNC21jNPirto1pp89dkzXJwgvkIgzF+ASbPQ95L0=;EntityPath=topic1\",\"primaryKey\":\"y5kwFxaXRtMHFFFtLBm/BXL7RG3ZH2fdz+ASbFdQ/Uw=\",\"secondaryKey\":\"kX0eNC21jNPirto1pp89dkzXJwgvkIgzF+ASbPQ95L0=\",\"keyName\":\"topicAuthRule1\"}", "isContentBase64": false } }, - "New-AzServiceBusKey+[NoContext]+NewExpandedTopic+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1/regenerateKeys?api-version=2022-10-01-preview+3": { + "New-AzServiceBusKey+[NoContext]+NewExpandedTopic+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1/regenerateKeys?api-version=2022-10-01-preview+3": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1/regenerateKeys?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1/regenerateKeys?api-version=2022-10-01-preview", "Content": "{\n \"keyType\": \"SecondaryKey\"\n}", "isContentBase64": false, "Headers": { @@ -464,29 +524,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1181" ], - "x-ms-request-id": [ "d4cfa497-f862-4dbc-9882-6239b6562d37" ], - "x-ms-correlation-request-id": [ "d4cfa497-f862-4dbc-9882-6239b6562d37" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132057Z:d4cfa497-f862-4dbc-9882-6239b6562d37" ], + "x-ms-correlation-request-id": [ "7f9dd05d-3d8a-41c4-aed1-d8d4bb05808f" ], + "x-ms-client-request-id": [ "7f3a62e6-7b5a-48f4-9b30-875319012d25_RP" ], + "x-ms-messaging-activity-id": [ "747d21c8-2c30-48ee-9faf-e1da6488050e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:23:52" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "7f9dd05d-3d8a-41c4-aed1-d8d4bb05808f" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052352Z:7f9dd05d-3d8a-41c4-aed1-d8d4bb05808f" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:20:56 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E885D1AA4F3F40ED8378B3F4EFEBBC9F Ref B: SEL221051504035 Ref C: 2024-04-30T05:23:50Z" ], + "Date": [ "Tue, 30 Apr 2024 05:23:52 GMT" ] }, "ContentHeaders": { "Content-Length": [ "552" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=ymhvl4Pcm/+NwNbMy5DdKBkLwifstAUlN+ASbBany2s=;EntityPath=topic1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=sLmza7WIitVxVpqY5vVcw2wdu1weZAgOD+ASbEmPzZk=;EntityPath=topic1\",\"primaryKey\":\"ymhvl4Pcm/+NwNbMy5DdKBkLwifstAUlN+ASbBany2s=\",\"secondaryKey\":\"sLmza7WIitVxVpqY5vVcw2wdu1weZAgOD+ASbEmPzZk=\",\"keyName\":\"topicAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=y5kwFxaXRtMHFFFtLBm/BXL7RG3ZH2fdz+ASbFdQ/Uw=;EntityPath=topic1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=FjhPAT/1ft6zEavAUt324s2xTxhzcemnL+ASbEy0XLs=;EntityPath=topic1\",\"primaryKey\":\"y5kwFxaXRtMHFFFtLBm/BXL7RG3ZH2fdz+ASbFdQ/Uw=\",\"secondaryKey\":\"FjhPAT/1ft6zEavAUt324s2xTxhzcemnL+ASbEy0XLs=\",\"keyName\":\"topicAuthRule1\"}", "isContentBase64": false } }, - "New-AzServiceBusKey+[NoContext]+NewExpandedTopic+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1/regenerateKeys?api-version=2022-10-01-preview+4": { + "New-AzServiceBusKey+[NoContext]+NewExpandedTopic+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1/regenerateKeys?api-version=2022-10-01-preview+4": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1/regenerateKeys?api-version=2022-10-01-preview", - "Content": "{\n \"keyType\": \"PrimaryKey\",\n \"key\": \"0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1/regenerateKeys?api-version=2022-10-01-preview", + "Content": "{\n \"keyType\": \"PrimaryKey\",\n \"key\": \"Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\"\n}", "isContentBase64": false, "Headers": { }, @@ -500,29 +565,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1180" ], - "x-ms-request-id": [ "0a91d2fe-3f5b-4572-bdb9-729ca9c37bb9" ], - "x-ms-correlation-request-id": [ "0a91d2fe-3f5b-4572-bdb9-729ca9c37bb9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132058Z:0a91d2fe-3f5b-4572-bdb9-729ca9c37bb9" ], + "x-ms-correlation-request-id": [ "e80dbf24-c514-40e7-b4e7-06b791a59c4c" ], + "x-ms-client-request-id": [ "f0600f9a-2774-4a42-9fee-a72bf8a0e3f9_RP" ], + "x-ms-messaging-activity-id": [ "bad66fad-92b5-497c-9c8f-dd5830eeb6ba" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:23:54" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "e80dbf24-c514-40e7-b4e7-06b791a59c4c" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052354Z:e80dbf24-c514-40e7-b4e7-06b791a59c4c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:20:57 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EBD0754470D24AFA82ECECEB35392703 Ref B: SEL221051504035 Ref C: 2024-04-30T05:23:52Z" ], + "Date": [ "Tue, 30 Apr 2024 05:23:54 GMT" ] }, "ContentHeaders": { "Content-Length": [ "552" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=;EntityPath=topic1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=sLmza7WIitVxVpqY5vVcw2wdu1weZAgOD+ASbEmPzZk=;EntityPath=topic1\",\"primaryKey\":\"0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\",\"secondaryKey\":\"sLmza7WIitVxVpqY5vVcw2wdu1weZAgOD+ASbEmPzZk=\",\"keyName\":\"topicAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=;EntityPath=topic1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=FjhPAT/1ft6zEavAUt324s2xTxhzcemnL+ASbEy0XLs=;EntityPath=topic1\",\"primaryKey\":\"Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\",\"secondaryKey\":\"FjhPAT/1ft6zEavAUt324s2xTxhzcemnL+ASbEy0XLs=\",\"keyName\":\"topicAuthRule1\"}", "isContentBase64": false } }, - "New-AzServiceBusKey+[NoContext]+NewExpandedTopic+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1/regenerateKeys?api-version=2022-10-01-preview+5": { + "New-AzServiceBusKey+[NoContext]+NewExpandedTopic+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1/regenerateKeys?api-version=2022-10-01-preview+5": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1/regenerateKeys?api-version=2022-10-01-preview", - "Content": "{\n \"keyType\": \"SecondaryKey\",\n \"key\": \"0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1/regenerateKeys?api-version=2022-10-01-preview", + "Content": "{\n \"keyType\": \"SecondaryKey\",\n \"key\": \"Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\"\n}", "isContentBase64": false, "Headers": { }, @@ -536,21 +606,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1179" ], - "x-ms-request-id": [ "24135dd0-8506-4160-931e-4b311151c344" ], - "x-ms-correlation-request-id": [ "24135dd0-8506-4160-931e-4b311151c344" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132058Z:24135dd0-8506-4160-931e-4b311151c344" ], + "x-ms-correlation-request-id": [ "8a310b4f-e0d2-4102-a03f-787f0063d760" ], + "x-ms-client-request-id": [ "fccbd1dc-ce60-419f-8f0a-d490ca0daaf2_RP" ], + "x-ms-messaging-activity-id": [ "a7605cc2-d6cc-41da-84af-5c809a3b8fb8" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T05:23:56" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "8a310b4f-e0d2-4102-a03f-787f0063d760" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052356Z:8a310b4f-e0d2-4102-a03f-787f0063d760" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:20:58 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C72419062D5140799A14CEAAA5152BAD Ref B: SEL221051504035 Ref C: 2024-04-30T05:23:54Z" ], + "Date": [ "Tue, 30 Apr 2024 05:23:56 GMT" ] }, "ContentHeaders": { "Content-Length": [ "552" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=;EntityPath=topic1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamehjil09.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=;EntityPath=topic1\",\"primaryKey\":\"0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\",\"secondaryKey\":\"0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=\",\"keyName\":\"topicAuthRule1\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=;EntityPath=topic1\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameg2d9np.servicebus.windows.net/;SharedAccessKeyName=topicAuthRule1;SharedAccessKey=Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=;EntityPath=topic1\",\"primaryKey\":\"Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\",\"secondaryKey\":\"Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=\",\"keyName\":\"topicAuthRule1\"}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusNamespaceV2.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusNamespaceV2.Recording.json index 4f895ccc78c6..b38ae0702fb2 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusNamespaceV2.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusNamespaceV2.Recording.json @@ -1,8 +1,8 @@ { - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV26ovc29?api-version=2022-10-01-preview+1": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV2rxp7v1?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV26ovc29?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV2rxp7v1?api-version=2022-10-01-preview", "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n }\n}", "isContentBase64": false, "Headers": { @@ -13,85 +13,47 @@ } }, "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f36b01ae-ca72-4cd9-a029-9cac5747c10c_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1190" ], - "x-ms-correlation-request-id": [ "29064617-9db1-4faf-8570-758b5bfd242e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132130Z:29064617-9db1-4faf-8570-758b5bfd242e" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:21:29 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "732" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV26ovc29\",\"name\":\"namespaceV26ovc29\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev26ovc29\",\"createdAt\":\"2023-02-19T13:21:29.033Z\",\"updatedAt\":\"2023-02-19T13:21:29.033Z\",\"serviceBusEndpoint\":\"https://namespaceV26ovc29.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV26ovc29?api-version=2022-10-01-preview+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV26ovc29?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "100" ], - "x-ms-client-request-id": [ "e7a5f3d8-95c3-4e44-9137-ecd29ef18861" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0ca9ba9f-2b4b-422b-be4c-7af28df47bbd_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11898" ], - "x-ms-correlation-request-id": [ "29334bf2-91f1-47ee-93dc-eb421741ce2e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132200Z:29334bf2-91f1-47ee-93dc-eb421741ce2e" ], + "x-ms-correlation-request-id": [ "575b5285-daf0-40da-8ffe-cb712be7d884" ], + "x-ms-client-request-id": [ "3199b246-cce6-477d-af55-ecf2c5712c4b_RP" ], + "x-ms-messaging-activity-id": [ "87773f4f-2806-4907-82ed-fe61e6f4bd6e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:24:48" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "575b5285-daf0-40da-8ffe-cb712be7d884" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052448Z:575b5285-daf0-40da-8ffe-cb712be7d884" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:22:00 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C039562D76324B5688F97B0566DC57C0 Ref B: SEL221051504035 Ref C: 2024-04-30T05:24:44Z" ], + "Date": [ "Tue, 30 Apr 2024 05:24:48 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "732" ], + "Content-Length": [ "740" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV26ovc29\",\"name\":\"namespaceV26ovc29\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev26ovc29\",\"createdAt\":\"2023-02-19T13:21:29.033Z\",\"updatedAt\":\"2023-02-19T13:21:29.033Z\",\"serviceBusEndpoint\":\"https://namespaceV26ovc29.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV2rxp7v1\",\"name\":\"namespaceV2rxp7v1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2rxp7v1\",\"serviceBusEndpoint\":\"https://namespaceV2rxp7v1.servicebus.windows.net:443/\",\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-30T05:24:48.4436974Z\",\"updatedAt\":\"2024-04-30T05:24:48.4436974Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV26ovc29?api-version=2022-10-01-preview+3": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV2rxp7v1?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV26ovc29?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV2rxp7v1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "101" ], - "x-ms-client-request-id": [ "e7a5f3d8-95c3-4e44-9137-ecd29ef18861" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "96" ], + "x-ms-client-request-id": [ "3199b246-cce6-477d-af55-ecf2c5712c4b" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -101,39 +63,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9242c4b9-c23b-4bb1-9d1e-1cfdae5814d5_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11897" ], - "x-ms-correlation-request-id": [ "f6b851c6-66ac-409b-a44c-32fcb99f50bc" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132231Z:f6b851c6-66ac-409b-a44c-32fcb99f50bc" ], + "x-ms-correlation-request-id": [ "d460501a-590e-4580-b203-88fb274fb071" ], + "x-ms-client-request-id": [ "3199b246-cce6-477d-af55-ecf2c5712c4b_RP" ], + "x-ms-messaging-activity-id": [ "9c7bd94f-178c-4b61-8cfd-c6c7a5ef300e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:25:19" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "d460501a-590e-4580-b203-88fb274fb071" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052519Z:d460501a-590e-4580-b203-88fb274fb071" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:22:31 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0EB6965144104633B9E4F22E127DAF6C Ref B: SEL221051504035 Ref C: 2024-04-30T05:25:18Z" ], + "Date": [ "Tue, 30 Apr 2024 05:25:19 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "728" ], + "Content-Length": [ "771" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV26ovc29\",\"name\":\"namespaceV26ovc29\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev26ovc29\",\"createdAt\":\"2023-02-19T13:21:29.033Z\",\"updatedAt\":\"2023-02-19T13:22:12.2Z\",\"serviceBusEndpoint\":\"https://namespaceV26ovc29.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV2rxp7v1\",\"name\":\"namespaceV2rxp7v1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2rxp7v1\",\"serviceBusEndpoint\":\"https://namespaceV2rxp7v1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:24:48.4436974Z\",\"updatedAt\":\"2024-04-30T05:24:51.2875025Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV26ovc29?api-version=2022-10-01-preview+4": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV2rxp7v1?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV26ovc29?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV2rxp7v1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "102" ], - "x-ms-client-request-id": [ "e7a5f3d8-95c3-4e44-9137-ecd29ef18861" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "97" ], + "x-ms-client-request-id": [ "3199b246-cce6-477d-af55-ecf2c5712c4b" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -143,118 +109,84 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e83d29b7-2921-48f8-94e7-7f7f8bb43fe7_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11896" ], - "x-ms-correlation-request-id": [ "b4008ad1-a478-41e7-bb3a-fb0a85be46f3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132232Z:b4008ad1-a478-41e7-bb3a-fb0a85be46f3" ], + "x-ms-correlation-request-id": [ "9823a261-bcb0-41e8-9c61-eb35492dd2e6" ], + "x-ms-client-request-id": [ "3199b246-cce6-477d-af55-ecf2c5712c4b_RP" ], + "x-ms-messaging-activity-id": [ "0d1aef40-a00c-468c-8b9c-e615086996a1" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T05:25:20" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "9823a261-bcb0-41e8-9c61-eb35492dd2e6" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052520Z:9823a261-bcb0-41e8-9c61-eb35492dd2e6" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:22:32 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D104F6C6EC9D4801B17E4C2CA3572F1B Ref B: SEL221051504035 Ref C: 2024-04-30T05:25:19Z" ], + "Date": [ "Tue, 30 Apr 2024 05:25:20 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "728" ], + "Content-Length": [ "771" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV26ovc29\",\"name\":\"namespaceV26ovc29\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev26ovc29\",\"createdAt\":\"2023-02-19T13:21:29.033Z\",\"updatedAt\":\"2023-02-19T13:22:12.2Z\",\"serviceBusEndpoint\":\"https://namespaceV26ovc29.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV2rxp7v1\",\"name\":\"namespaceV2rxp7v1\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2rxp7v1\",\"serviceBusEndpoint\":\"https://namespaceV2rxp7v1.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:24:48.4436974Z\",\"updatedAt\":\"2024-04-30T05:24:51.2875025Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+5": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+4": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"southcentralus\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.1\",\n \"disableLocalAuth\": true\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.1\",\n \"disableLocalAuth\": true\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "229" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "687ba696-4443-4e49-8f81-3df1fafcba01_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1189" ], - "x-ms-correlation-request-id": [ "d98a4d4b-aa97-4ce1-892c-f464c858b2db" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132238Z:d98a4d4b-aa97-4ce1-892c-f464c858b2db" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:22:38 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "757" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T13:22:36.43Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+6": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "104" ], - "x-ms-client-request-id": [ "43e03a08-d68c-4720-9d68-d80412711d52" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { + "Content-Length": [ "221" ] } }, "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3436bc8d-7d31-43f6-ae96-358f775f44de_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11895" ], - "x-ms-correlation-request-id": [ "503bda2b-182d-4a0e-9204-40392d1eaeda" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132308Z:503bda2b-182d-4a0e-9204-40392d1eaeda" ], + "x-ms-correlation-request-id": [ "c3d8aa8c-c72a-44e4-a75f-08e8263f5ba5" ], + "x-ms-client-request-id": [ "0502bc89-a068-4762-ab99-f0afbf7e2903_RP" ], + "x-ms-messaging-activity-id": [ "3e307a0e-beae-4749-924c-dc2a2f5bb682" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:25:24" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "c3d8aa8c-c72a-44e4-a75f-08e8263f5ba5" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052525Z:c3d8aa8c-c72a-44e4-a75f-08e8263f5ba5" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:23:08 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0B94B0996CD444299346F7D15430E40F Ref B: SEL221051504035 Ref C: 2024-04-30T05:25:21Z" ], + "Date": [ "Tue, 30 Apr 2024 05:25:25 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "757" ], + "Content-Length": [ "758" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T13:22:36.43Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T05:25:24.8554069Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+7": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "105" ], - "x-ms-client-request-id": [ "43e03a08-d68c-4720-9d68-d80412711d52" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "99" ], + "x-ms-client-request-id": [ "0502bc89-a068-4762-ab99-f0afbf7e2903" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -264,39 +196,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "bd3238dd-fdf2-4dfa-a65a-0243f22b722a_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11894" ], - "x-ms-correlation-request-id": [ "f6aa074b-888c-4074-96da-dd428b7fe4a0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132339Z:f6aa074b-888c-4074-96da-dd428b7fe4a0" ], + "x-ms-correlation-request-id": [ "3427ea7a-7612-413b-8e7b-dbec0a0886bb" ], + "x-ms-client-request-id": [ "0502bc89-a068-4762-ab99-f0afbf7e2903_RP" ], + "x-ms-messaging-activity-id": [ "6a38082b-7833-4fb7-b7df-6fe2d6dabf45" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:25:57" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "3427ea7a-7612-413b-8e7b-dbec0a0886bb" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052557Z:3427ea7a-7612-413b-8e7b-dbec0a0886bb" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:23:39 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CB8DEAFC7D19478597F2FC2788CD7DA9 Ref B: SEL221051504035 Ref C: 2024-04-30T05:25:55Z" ], + "Date": [ "Tue, 30 Apr 2024 05:25:57 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "756" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T13:23:20.603Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T05:25:27.5897739Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+8": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "106" ], - "x-ms-client-request-id": [ "43e03a08-d68c-4720-9d68-d80412711d52" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "100" ], + "x-ms-client-request-id": [ "0502bc89-a068-4762-ab99-f0afbf7e2903" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -306,328 +242,84 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "60f05030-ffa7-44ab-9396-ef2f1d37d1b0_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11893" ], - "x-ms-correlation-request-id": [ "eba1f98b-6615-465a-bf8c-bbe5eb6c8dec" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132339Z:eba1f98b-6615-465a-bf8c-bbe5eb6c8dec" ], + "x-ms-correlation-request-id": [ "92d69c81-eecf-4972-ab02-e6965cb1321d" ], + "x-ms-client-request-id": [ "0502bc89-a068-4762-ab99-f0afbf7e2903_RP" ], + "x-ms-messaging-activity-id": [ "63f10e6a-edc7-47ed-8c0b-e6e22c5ec37b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T05:25:58" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "92d69c81-eecf-4972-ab02-e6965cb1321d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052559Z:92d69c81-eecf-4972-ab02-e6965cb1321d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:23:39 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4E68CDE9E3A340FC9F13EFDC00300B9E Ref B: SEL221051504035 Ref C: 2024-04-30T05:25:57Z" ], + "Date": [ "Tue, 30 Apr 2024 05:25:58 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "756" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T13:23:20.603Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T05:25:27.5897739Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+9": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview+7": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 2\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\n },\n \"properties\": {\n \"zoneRedundant\": true,\n \"premiumMessagingPartitions\": 2\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 2\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\n },\n \"properties\": {\n \"zoneRedundant\": true\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "242" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9cb33e36-170e-44c1-81cd-9c6e112f71b2_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1188" ], - "x-ms-correlation-request-id": [ "ae88e24b-969d-4511-885d-cab115d93d33" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132346Z:ae88e24b-969d-4511-885d-cab115d93d33" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:23:45 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "893" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:23:44.963Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+10": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "108" ], - "x-ms-client-request-id": [ "d30ede55-b065-4477-837b-069146ec6db6" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1909f2fa-61a7-4149-9321-04ed664589fd_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11892" ], - "x-ms-correlation-request-id": [ "c5828384-5cd0-4787-a839-eca5e1be2c2a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132416Z:c5828384-5cd0-4787-a839-eca5e1be2c2a" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:24:16 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "893" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:23:44.963Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+11": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "109" ], - "x-ms-client-request-id": [ "d30ede55-b065-4477-837b-069146ec6db6" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9376b4d3-72ae-4471-918f-e808513e2ce7_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11891" ], - "x-ms-correlation-request-id": [ "541a5173-4856-4e59-a3e8-6cfeca0eb012" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132447Z:541a5173-4856-4e59-a3e8-6cfeca0eb012" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:24:46 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "893" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:23:44.963Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+12": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "110" ], - "x-ms-client-request-id": [ "d30ede55-b065-4477-837b-069146ec6db6" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "98cc9fac-8be2-411d-8144-1f0e1a97663f_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11890" ], - "x-ms-correlation-request-id": [ "832bce11-ca53-4101-8fc7-e6982efb9eaf" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132517Z:832bce11-ca53-4101-8fc7-e6982efb9eaf" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:25:16 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "889" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:25:07.497Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+13": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "111" ], - "x-ms-client-request-id": [ "d30ede55-b065-4477-837b-069146ec6db6" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6c41a204-d876-4436-8f6f-2e62560fe440_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11889" ], - "x-ms-correlation-request-id": [ "68569303-93cf-43bd-be0c-cf96ee747fb8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132547Z:68569303-93cf-43bd-be0c-cf96ee747fb8" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:25:47 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "889" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:25:07.497Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+14": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "112" ], - "x-ms-client-request-id": [ "d30ede55-b065-4477-837b-069146ec6db6" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "467874d7-289d-4d52-9e6f-aa14a8dccbc4_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11888" ], - "x-ms-correlation-request-id": [ "929346db-0b85-48a3-b3b9-1a3b1ed4a9fb" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132618Z:929346db-0b85-48a3-b3b9-1a3b1ed4a9fb" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:26:17 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "889" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:25:07.497Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+15": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "113" ], - "x-ms-client-request-id": [ "d30ede55-b065-4477-837b-069146ec6db6" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { + "Content-Length": [ "205" ] } }, "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d076d473-239d-4bab-90a1-cb89174384ff_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11887" ], - "x-ms-correlation-request-id": [ "5cf82e68-18ad-4d9b-a2cd-e97287fbc0d0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132648Z:5cf82e68-18ad-4d9b-a2cd-e97287fbc0d0" ], + "x-ms-correlation-request-id": [ "27c2348f-8ea6-4751-a3ca-4f8bb9ac5876" ], + "x-ms-client-request-id": [ "5cecb741-1ccf-46ef-8c11-a6a307ed4e64_RP" ], + "x-ms-messaging-activity-id": [ "3162fded-32cd-45d1-b2fd-56528d68a6e8" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:26:04" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "27c2348f-8ea6-4751-a3ca-4f8bb9ac5876" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052604Z:27c2348f-8ea6-4751-a3ca-4f8bb9ac5876" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:26:48 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 14D624FF36124267A577879A2BBB31A0 Ref B: SEL221051504035 Ref C: 2024-04-30T05:25:59Z" ], + "Date": [ "Tue, 30 Apr 2024 05:26:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "889" ], + "Content-Length": [ "890" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:25:07.497Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt\",\"name\":\"namespaceV4jslnwt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4jslnwt\",\"serviceBusEndpoint\":\"https://namespaceV4jslnwt.servicebus.windows.net:443/\",\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-30T05:26:03.9933506Z\",\"updatedAt\":\"2024-04-30T05:26:03.9933506Z\"},\"identity\":{\"principalId\":\"0f6a0174-efe3-4dac-b6e0-c4618ec34b73\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+16": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "114" ], - "x-ms-client-request-id": [ "d30ede55-b065-4477-837b-069146ec6db6" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "102" ], + "x-ms-client-request-id": [ "5cecb741-1ccf-46ef-8c11-a6a307ed4e64" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -637,39 +329,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "40ee00fb-71f4-43e0-80d1-a689426cf60e_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11886" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "651e4f6e-d9e6-4761-b846-f1ab95e0b5a9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132719Z:651e4f6e-d9e6-4761-b846-f1ab95e0b5a9" ], + "x-ms-correlation-request-id": [ "fe353f69-19e6-4141-a1d5-77ae1084a9a6" ], + "x-ms-client-request-id": [ "5cecb741-1ccf-46ef-8c11-a6a307ed4e64_RP" ], + "x-ms-messaging-activity-id": [ "4956e479-2091-4631-a677-a1eace6036ed" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:26:34" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "fe353f69-19e6-4141-a1d5-77ae1084a9a6" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052634Z:fe353f69-19e6-4141-a1d5-77ae1084a9a6" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:27:18 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3FB81D14B29E44E58647BC8D4990D77C Ref B: SEL221051504035 Ref C: 2024-04-30T05:26:34Z" ], + "Date": [ "Tue, 30 Apr 2024 05:26:34 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "889" ], + "Content-Length": [ "922" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:25:07.497Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt\",\"name\":\"namespaceV4jslnwt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4jslnwt\",\"serviceBusEndpoint\":\"https://namespaceV4jslnwt.servicebus.windows.net:443/\",\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-30T05:26:03.9933506Z\",\"updatedAt\":\"2024-04-30T05:26:03.9933506Z\"},\"identity\":{\"principalId\":\"0f6a0174-efe3-4dac-b6e0-c4618ec34b73\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+17": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "115" ], - "x-ms-client-request-id": [ "d30ede55-b065-4477-837b-069146ec6db6" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "103" ], + "x-ms-client-request-id": [ "5cecb741-1ccf-46ef-8c11-a6a307ed4e64" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -679,39 +375,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "57314b6c-6991-4116-8c66-ee52b429d87b_M1CH3_M1CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11885" ], - "x-ms-correlation-request-id": [ "629dd864-498e-4cff-bfe5-d990e911c756" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132750Z:629dd864-498e-4cff-bfe5-d990e911c756" ], + "x-ms-correlation-request-id": [ "c8fc2ce0-1958-4682-a585-cfe4aa989901" ], + "x-ms-client-request-id": [ "5cecb741-1ccf-46ef-8c11-a6a307ed4e64_RP" ], + "x-ms-messaging-activity-id": [ "f7519197-7e1e-4242-bd6c-bc4fe220962d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:27:06" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "c8fc2ce0-1958-4682-a585-cfe4aa989901" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052706Z:c8fc2ce0-1958-4682-a585-cfe4aa989901" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:27:49 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0B5E8EB696C54CA4A6BF580D40D67CF6 Ref B: SEL221051504035 Ref C: 2024-04-30T05:27:04Z" ], + "Date": [ "Tue, 30 Apr 2024 05:27:06 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "889" ], + "Content-Length": [ "922" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:25:07.497Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt\",\"name\":\"namespaceV4jslnwt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4jslnwt\",\"serviceBusEndpoint\":\"https://namespaceV4jslnwt.servicebus.windows.net:443/\",\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-30T05:26:03.9933506Z\",\"updatedAt\":\"2024-04-30T05:26:03.9933506Z\"},\"identity\":{\"principalId\":\"0f6a0174-efe3-4dac-b6e0-c4618ec34b73\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+18": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "116" ], - "x-ms-client-request-id": [ "d30ede55-b065-4477-837b-069146ec6db6" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "104" ], + "x-ms-client-request-id": [ "5cecb741-1ccf-46ef-8c11-a6a307ed4e64" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -721,39 +421,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9e3baf7d-a8ef-4235-9b16-0200213dfb7a_M1CH3_M1CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11884" ], - "x-ms-correlation-request-id": [ "f37a0048-f37e-42c9-bbb3-9b9279ee8b1c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132821Z:f37a0048-f37e-42c9-bbb3-9b9279ee8b1c" ], + "x-ms-correlation-request-id": [ "eed3ae1d-ddb7-4755-91b7-f42066a70caf" ], + "x-ms-client-request-id": [ "5cecb741-1ccf-46ef-8c11-a6a307ed4e64_RP" ], + "x-ms-messaging-activity-id": [ "c485037c-741d-4b6f-9bb6-1657a7ab7070" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T05:27:38" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "eed3ae1d-ddb7-4755-91b7-f42066a70caf" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052738Z:eed3ae1d-ddb7-4755-91b7-f42066a70caf" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:28:20 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A5603D8EA9A74E28A4A3ECA37B0DE94B Ref B: SEL221051504035 Ref C: 2024-04-30T05:27:36Z" ], + "Date": [ "Tue, 30 Apr 2024 05:27:37 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "889" ], + "Content-Length": [ "920" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:25:07.497Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt\",\"name\":\"namespaceV4jslnwt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4jslnwt\",\"serviceBusEndpoint\":\"https://namespaceV4jslnwt.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:26:03.9933506Z\",\"updatedAt\":\"2024-04-30T05:27:11.024851Z\"},\"identity\":{\"principalId\":\"0f6a0174-efe3-4dac-b6e0-c4618ec34b73\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+19": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview+11": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "117" ], - "x-ms-client-request-id": [ "d30ede55-b065-4477-837b-069146ec6db6" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "105" ], + "x-ms-client-request-id": [ "5cecb741-1ccf-46ef-8c11-a6a307ed4e64" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -763,81 +467,84 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6bbc5de6-225a-411f-aa79-9df89956c850_M1CH3_M1CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11883" ], - "x-ms-correlation-request-id": [ "792e3aea-188e-4754-8b72-8004c0f21729" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132851Z:792e3aea-188e-4754-8b72-8004c0f21729" ], + "x-ms-correlation-request-id": [ "7ca7f9f4-f085-485b-9909-d4764269bd3d" ], + "x-ms-client-request-id": [ "5cecb741-1ccf-46ef-8c11-a6a307ed4e64_RP" ], + "x-ms-messaging-activity-id": [ "6c6181a7-ea37-405e-861c-35ba1b9c4964" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T05:27:39" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "7ca7f9f4-f085-485b-9909-d4764269bd3d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052739Z:7ca7f9f4-f085-485b-9909-d4764269bd3d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:28:51 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 38EF37D73D4B4D39AA1DD6EC21EDA828 Ref B: SEL221051504035 Ref C: 2024-04-30T05:27:38Z" ], + "Date": [ "Tue, 30 Apr 2024 05:27:39 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "889" ], + "Content-Length": [ "920" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:25:07.497Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt\",\"name\":\"namespaceV4jslnwt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4jslnwt\",\"serviceBusEndpoint\":\"https://namespaceV4jslnwt.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:26:03.9933506Z\",\"updatedAt\":\"2024-04-30T05:27:11.024851Z\"},\"identity\":{\"principalId\":\"0f6a0174-efe3-4dac-b6e0-c4618ec34b73\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+20": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview+12": { "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", - "Content": null, + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\"\n },\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\": {\n },\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"\n },\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n },\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"\n },\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\"\n }\n }\n}", "isContentBase64": false, "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "118" ], - "x-ms-client-request-id": [ "d30ede55-b065-4477-837b-069146ec6db6" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "1424" ] } }, "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9aeba76b-9396-4522-a4e1-f88a2c1e8b07_M1CH3_M1CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11882" ], - "x-ms-correlation-request-id": [ "cf8cb7ca-9984-4a42-8e85-125629d27810" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132922Z:cf8cb7ca-9984-4a42-8e85-125629d27810" ], + "x-ms-correlation-request-id": [ "d97cb1ab-b49c-42e1-958f-8b96e9af3829" ], + "x-ms-client-request-id": [ "2363d101-3689-4a8b-956c-4b41511bcd1f_RP" ], + "x-ms-messaging-activity-id": [ "9dcbec70-78f4-4e18-90b6-1be4146fa616" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T05:27:45" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "d97cb1ab-b49c-42e1-958f-8b96e9af3829" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052745Z:d97cb1ab-b49c-42e1-958f-8b96e9af3829" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:29:21 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EE3D6C051BA64AB3ACC28DB126C7F228 Ref B: SEL221051504035 Ref C: 2024-04-30T05:27:39Z" ], + "Date": [ "Tue, 30 Apr 2024 05:27:45 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "889" ], + "Content-Length": [ "2064" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:25:07.497Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki\",\"name\":\"namespaceV5x9bvki\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5x9bvki\",\"serviceBusEndpoint\":\"https://namespaceV5x9bvki.servicebus.windows.net:443/\",\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-30T05:27:45.0047748Z\",\"updatedAt\":\"2024-04-30T05:27:45.0047748Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+21": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview+13": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "119" ], - "x-ms-client-request-id": [ "d30ede55-b065-4477-837b-069146ec6db6" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "107" ], + "x-ms-client-request-id": [ "2363d101-3689-4a8b-956c-4b41511bcd1f" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -847,39 +554,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6b650258-4c5a-402a-9836-0cd3b88ae0c7_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11881" ], - "x-ms-correlation-request-id": [ "ac9f1d1b-d596-444b-982e-22d0deed4b80" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T132953Z:ac9f1d1b-d596-444b-982e-22d0deed4b80" ], + "x-ms-correlation-request-id": [ "ad83f05d-7c7e-4ce3-b863-d843f49f6fef" ], + "x-ms-client-request-id": [ "2363d101-3689-4a8b-956c-4b41511bcd1f_RP" ], + "x-ms-messaging-activity-id": [ "ab6a2a7f-9b75-4899-86bd-6206f7f35635" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:28:16" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "ad83f05d-7c7e-4ce3-b863-d843f49f6fef" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052817Z:ad83f05d-7c7e-4ce3-b863-d843f49f6fef" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:29:52 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6129C7E13E164E24BD9B102C7F9D1D8B Ref B: SEL221051504035 Ref C: 2024-04-30T05:28:15Z" ], + "Date": [ "Tue, 30 Apr 2024 05:28:16 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "889" ], + "Content-Length": [ "2096" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:25:07.497Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki\",\"name\":\"namespaceV5x9bvki\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5x9bvki\",\"serviceBusEndpoint\":\"https://namespaceV5x9bvki.servicebus.windows.net:443/\",\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-30T05:27:45.0047748Z\",\"updatedAt\":\"2024-04-30T05:27:45.0047748Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+22": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "120" ], - "x-ms-client-request-id": [ "d30ede55-b065-4477-837b-069146ec6db6" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "108" ], + "x-ms-client-request-id": [ "2363d101-3689-4a8b-956c-4b41511bcd1f" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -889,39 +600,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "380070ff-266a-4cae-9c4e-217cf1caff6c_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11880" ], - "x-ms-correlation-request-id": [ "77872402-a441-486f-a0d2-4349c2cb7f9b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133023Z:77872402-a441-486f-a0d2-4349c2cb7f9b" ], + "x-ms-correlation-request-id": [ "b1dab0a7-cfbb-4a60-9ff0-382859acc38f" ], + "x-ms-client-request-id": [ "2363d101-3689-4a8b-956c-4b41511bcd1f_RP" ], + "x-ms-messaging-activity-id": [ "67801f2d-b895-4caf-bce9-f49476b23911" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:28:48" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "b1dab0a7-cfbb-4a60-9ff0-382859acc38f" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052848Z:b1dab0a7-cfbb-4a60-9ff0-382859acc38f" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:30:23 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CDB599CCE644414BB26A69A03AD085EC Ref B: SEL221051504035 Ref C: 2024-04-30T05:28:47Z" ], + "Date": [ "Tue, 30 Apr 2024 05:28:48 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "889" ], + "Content-Length": [ "2096" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:25:07.497Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki\",\"name\":\"namespaceV5x9bvki\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5x9bvki\",\"serviceBusEndpoint\":\"https://namespaceV5x9bvki.servicebus.windows.net:443/\",\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-30T05:27:45.0047748Z\",\"updatedAt\":\"2024-04-30T05:27:45.0047748Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+23": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview+15": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "121" ], - "x-ms-client-request-id": [ "d30ede55-b065-4477-837b-069146ec6db6" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "109" ], + "x-ms-client-request-id": [ "2363d101-3689-4a8b-956c-4b41511bcd1f" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -931,39 +646,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ba8247e6-f34f-4855-9520-5b55c4e94c66_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11879" ], - "x-ms-correlation-request-id": [ "cc47d052-aee0-4081-af21-9a52661c99ec" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133054Z:cc47d052-aee0-4081-af21-9a52661c99ec" ], + "x-ms-correlation-request-id": [ "37c7d5d5-703f-4362-988a-649e519b6cae" ], + "x-ms-client-request-id": [ "2363d101-3689-4a8b-956c-4b41511bcd1f_RP" ], + "x-ms-messaging-activity-id": [ "1131e88a-0a84-4060-837e-d0b28fea8d66" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T05:29:20" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "37c7d5d5-703f-4362-988a-649e519b6cae" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T052920Z:37c7d5d5-703f-4362-988a-649e519b6cae" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:30:53 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E2A94AB2608B45608DC08CE11F2202D4 Ref B: SEL221051504035 Ref C: 2024-04-30T05:29:18Z" ], + "Date": [ "Tue, 30 Apr 2024 05:29:19 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "880" ], + "Content-Length": [ "2094" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:30:52.143Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki\",\"name\":\"namespaceV5x9bvki\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5x9bvki\",\"serviceBusEndpoint\":\"https://namespaceV5x9bvki.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:27:45.0047748Z\",\"updatedAt\":\"2024-04-30T05:28:49.072472Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+24": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview+16": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "122" ], - "x-ms-client-request-id": [ "d30ede55-b065-4477-837b-069146ec6db6" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "110" ], + "x-ms-client-request-id": [ "2363d101-3689-4a8b-956c-4b41511bcd1f" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -973,76 +692,84 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7992b9d8-9141-4d8a-b226-17fd997614c4_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11878" ], - "x-ms-correlation-request-id": [ "029629be-96b9-42ff-b038-7a69371a30db" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133054Z:029629be-96b9-42ff-b038-7a69371a30db" ], + "x-ms-correlation-request-id": [ "5e16228a-38e0-4252-8eab-cbe4884de30f" ], + "x-ms-client-request-id": [ "2363d101-3689-4a8b-956c-4b41511bcd1f_RP" ], + "x-ms-messaging-activity-id": [ "9009a7b6-8d77-4bff-9822-16f71e998016" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T05:29:21" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "5e16228a-38e0-4252-8eab-cbe4884de30f" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T052921Z:5e16228a-38e0-4252-8eab-cbe4884de30f" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:30:53 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 311622438A6941169CBAD5B7E1B79C7A Ref B: SEL221051504035 Ref C: 2024-04-30T05:29:20Z" ], + "Date": [ "Tue, 30 Apr 2024 05:29:21 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "880" ], + "Content-Length": [ "2094" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:30:52.143Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki\",\"name\":\"namespaceV5x9bvki\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5x9bvki\",\"serviceBusEndpoint\":\"https://namespaceV5x9bvki.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:27:45.0047748Z\",\"updatedAt\":\"2024-04-30T05:28:49.072472Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+25": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV9efv5ht?api-version=2022-10-01-preview+17": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"northeurope\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\"\n },\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\": {\n },\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"\n },\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://keyVaultNamedur8ab.vault.azure.net/\"\n },\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"\n },\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://keyVaultNamedur8ab.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\"\n }\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV9efv5ht?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\"\n },\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\": {\n },\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"\n },\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n },\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"\n },\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": true\n }\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1349" ] + "Content-Length": [ "1471" ] } }, "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7f7cf727-e751-43b4-a480-bfc69c9a04cc_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1187" ], - "x-ms-correlation-request-id": [ "59d25d6c-9ce0-43ca-ad03-58ed6843a4ca" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133103Z:59d25d6c-9ce0-43ca-ad03-58ed6843a4ca" ], + "x-ms-correlation-request-id": [ "a56c622a-7659-4a39-bea1-cfa9c835189d" ], + "x-ms-client-request-id": [ "8c134ebc-1c09-4b08-90f9-18ef328843db_RP" ], + "x-ms-messaging-activity-id": [ "0c7943f3-ad3e-4e22-abc3-003c652ae38a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T05:29:26" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "a56c622a-7659-4a39-bea1-cfa9c835189d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052927Z:a56c622a-7659-4a39-bea1-cfa9c835189d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:31:03 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EC6881BD0E544A78A0D5182154F69F47 Ref B: SEL221051504035 Ref C: 2024-04-30T05:29:21Z" ], + "Date": [ "Tue, 30 Apr 2024 05:29:26 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1818" ], + "Content-Length": [ "2063" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:31:01.857Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV9efv5ht\",\"name\":\"namespaceV9efv5ht\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}}],\"requireInfrastructureEncryption\":true},\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev9efv5ht\",\"serviceBusEndpoint\":\"https://namespaceV9efv5ht.servicebus.windows.net:443/\",\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-30T05:29:26.7762709Z\",\"updatedAt\":\"2024-04-30T05:29:26.7762709Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+26": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV9efv5ht?api-version=2022-10-01-preview+18": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV9efv5ht?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "124" ], - "x-ms-client-request-id": [ "5d2d4d4c-ab4b-4f2f-999f-feef083042f9" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "112" ], + "x-ms-client-request-id": [ "8c134ebc-1c09-4b08-90f9-18ef328843db" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -1052,39 +779,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d71d21b1-e8f9-4af1-a2b2-cfea0319a73b_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11877" ], - "x-ms-correlation-request-id": [ "94e3c278-911d-499b-ad6c-b5f910cf3645" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133134Z:94e3c278-911d-499b-ad6c-b5f910cf3645" ], + "x-ms-correlation-request-id": [ "fcffc8c2-ab7c-4920-a780-6d0324b9483f" ], + "x-ms-client-request-id": [ "8c134ebc-1c09-4b08-90f9-18ef328843db_RP" ], + "x-ms-messaging-activity-id": [ "07ff1015-9ab1-45b1-b1cc-bb019e75fbe4" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T05:29:58" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "fcffc8c2-ab7c-4920-a780-6d0324b9483f" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T052958Z:fcffc8c2-ab7c-4920-a780-6d0324b9483f" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:31:33 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0A223D4D8BF048B9821FD97897A2A400 Ref B: SEL221051504035 Ref C: 2024-04-30T05:29:57Z" ], + "Date": [ "Tue, 30 Apr 2024 05:29:58 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1818" ], + "Content-Length": [ "2095" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:31:01.857Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV9efv5ht\",\"name\":\"namespaceV9efv5ht\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}}],\"requireInfrastructureEncryption\":true},\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev9efv5ht\",\"serviceBusEndpoint\":\"https://namespaceV9efv5ht.servicebus.windows.net:443/\",\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-30T05:29:26.7762709Z\",\"updatedAt\":\"2024-04-30T05:29:26.7762709Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+27": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV9efv5ht?api-version=2022-10-01-preview+19": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV9efv5ht?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "125" ], - "x-ms-client-request-id": [ "5d2d4d4c-ab4b-4f2f-999f-feef083042f9" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "113" ], + "x-ms-client-request-id": [ "8c134ebc-1c09-4b08-90f9-18ef328843db" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -1094,1294 +825,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "801783fd-dd7d-489e-93c5-4bc5dcd7eceb_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11876" ], - "x-ms-correlation-request-id": [ "73bb59a0-1cd2-4ba0-a6bc-3667088f4fd3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133204Z:73bb59a0-1cd2-4ba0-a6bc-3667088f4fd3" ], + "x-ms-correlation-request-id": [ "e8273096-41e2-43f3-b843-119cdcd81ddb" ], + "x-ms-client-request-id": [ "8c134ebc-1c09-4b08-90f9-18ef328843db_RP" ], + "x-ms-messaging-activity-id": [ "52b3f891-e05b-4e45-9b24-d73e2be2ac09" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:30:30" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "e8273096-41e2-43f3-b843-119cdcd81ddb" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053030Z:e8273096-41e2-43f3-b843-119cdcd81ddb" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:32:03 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B22EB99D3EB54030A66195AE6CBE7038 Ref B: SEL221051504035 Ref C: 2024-04-30T05:30:28Z" ], + "Date": [ "Tue, 30 Apr 2024 05:30:30 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1818" ], + "Content-Length": [ "2094" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:31:01.857Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV9efv5ht\",\"name\":\"namespaceV9efv5ht\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}}],\"requireInfrastructureEncryption\":true},\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev9efv5ht\",\"serviceBusEndpoint\":\"https://namespaceV9efv5ht.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:29:26.7762709Z\",\"updatedAt\":\"2024-04-30T05:30:27.3312497Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+28": { + "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV9efv5ht?api-version=2022-10-01-preview+20": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV9efv5ht?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "126" ], - "x-ms-client-request-id": [ "5d2d4d4c-ab4b-4f2f-999f-feef083042f9" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "eac0abbc-d9df-4679-901e-b99c81128f16_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11875" ], - "x-ms-correlation-request-id": [ "663b3d81-5da8-4c92-b52f-32c1c8ad4ff4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133235Z:663b3d81-5da8-4c92-b52f-32c1c8ad4ff4" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:32:35 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1814" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:32:17.537Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+29": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "127" ], - "x-ms-client-request-id": [ "5d2d4d4c-ab4b-4f2f-999f-feef083042f9" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ce2079ff-de59-4de7-af63-fbe3fb45229b_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11874" ], - "x-ms-correlation-request-id": [ "c18bdb38-0c0a-44e2-af60-b84e5a11da7e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133306Z:c18bdb38-0c0a-44e2-af60-b84e5a11da7e" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:33:06 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1814" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:32:17.537Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+30": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "128" ], - "x-ms-client-request-id": [ "5d2d4d4c-ab4b-4f2f-999f-feef083042f9" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b6bba916-521c-4802-a866-d7f8b7291870_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11873" ], - "x-ms-correlation-request-id": [ "fe3344fe-0f70-43d5-9514-792b2ed2cb87" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133336Z:fe3344fe-0f70-43d5-9514-792b2ed2cb87" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:33:36 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1814" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:32:17.537Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+31": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "129" ], - "x-ms-client-request-id": [ "5d2d4d4c-ab4b-4f2f-999f-feef083042f9" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ec5d38f0-61ce-4b15-a58c-f655ffeb736d_M10SN1_M10SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11872" ], - "x-ms-correlation-request-id": [ "1703791e-e799-4ae1-88a2-dac8e09552a9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133408Z:1703791e-e799-4ae1-88a2-dac8e09552a9" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:34:07 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1814" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:32:17.537Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+32": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "130" ], - "x-ms-client-request-id": [ "5d2d4d4c-ab4b-4f2f-999f-feef083042f9" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0b2854d4-7a5d-46eb-aad8-a9887077c395_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11871" ], - "x-ms-correlation-request-id": [ "3cf539d1-380e-4814-8d91-7ab9ec68e448" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133438Z:3cf539d1-380e-4814-8d91-7ab9ec68e448" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:34:38 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1814" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:32:17.537Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+33": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "131" ], - "x-ms-client-request-id": [ "5d2d4d4c-ab4b-4f2f-999f-feef083042f9" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "586512c4-ee28-4369-97f3-5ee180630516_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11870" ], - "x-ms-correlation-request-id": [ "f529308c-0fdf-4b51-938b-70902f3b58d0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133510Z:f529308c-0fdf-4b51-938b-70902f3b58d0" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:35:10 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1814" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:32:17.537Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+34": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "132" ], - "x-ms-client-request-id": [ "5d2d4d4c-ab4b-4f2f-999f-feef083042f9" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e3f038cc-c1e1-44c2-95d6-4bb5193865c2_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11869" ], - "x-ms-correlation-request-id": [ "c5d9cd79-f51e-453f-95bd-5a8aba911573" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133541Z:c5d9cd79-f51e-453f-95bd-5a8aba911573" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:35:40 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1814" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:32:17.537Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+35": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "133" ], - "x-ms-client-request-id": [ "5d2d4d4c-ab4b-4f2f-999f-feef083042f9" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7ac6f917-62d2-4135-8a08-12c68777a783_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11868" ], - "x-ms-correlation-request-id": [ "30401ed0-52c0-4b0d-9671-f0a692c92bdc" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133611Z:30401ed0-52c0-4b0d-9671-f0a692c92bdc" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:36:11 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1814" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:32:17.537Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+36": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "134" ], - "x-ms-client-request-id": [ "5d2d4d4c-ab4b-4f2f-999f-feef083042f9" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "afea7238-c3fc-498e-a63b-f2650dbc8f1b_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11867" ], - "x-ms-correlation-request-id": [ "9700cfe1-3ec6-4672-93cc-67b4173c0633" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133642Z:9700cfe1-3ec6-4672-93cc-67b4173c0633" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:36:42 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1814" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:32:17.537Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+37": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "135" ], - "x-ms-client-request-id": [ "5d2d4d4c-ab4b-4f2f-999f-feef083042f9" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fcd1ee92-9bcd-4aed-8ec9-0415a810030a_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11866" ], - "x-ms-correlation-request-id": [ "d8690780-17f7-465e-8a3c-bd396361f77d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133712Z:d8690780-17f7-465e-8a3c-bd396361f77d" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:37:12 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1814" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:32:17.537Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+38": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "136" ], - "x-ms-client-request-id": [ "5d2d4d4c-ab4b-4f2f-999f-feef083042f9" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "de6f2a13-52a0-4f9b-8be2-1e33c3952764_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11865" ], - "x-ms-correlation-request-id": [ "8a52098b-3651-4294-868a-e581f11776c2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133743Z:8a52098b-3651-4294-868a-e581f11776c2" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:37:43 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1814" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:32:17.537Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+39": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "137" ], - "x-ms-client-request-id": [ "5d2d4d4c-ab4b-4f2f-999f-feef083042f9" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1541d943-a790-4b42-be65-ffcf6e5b009f_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11864" ], - "x-ms-correlation-request-id": [ "09beae28-21dc-491d-ba0b-f976a559df36" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133814Z:09beae28-21dc-491d-ba0b-f976a559df36" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:38:14 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1916" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:38:11.273Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+40": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "138" ], - "x-ms-client-request-id": [ "5d2d4d4c-ab4b-4f2f-999f-feef083042f9" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fdfeb7b0-49f4-4302-a776-20ec3ac5c72a_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11863" ], - "x-ms-correlation-request-id": [ "b9840a3c-63ed-4f1a-a265-f1d184296139" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133844Z:b9840a3c-63ed-4f1a-a265-f1d184296139" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:38:43 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "2009" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:38:24.377Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+41": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "139" ], - "x-ms-client-request-id": [ "5d2d4d4c-ab4b-4f2f-999f-feef083042f9" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b7227484-c4c2-4dd8-812e-f44271603df0_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11862" ], - "x-ms-correlation-request-id": [ "6a7eaf2e-9aeb-410c-9ec8-258b31c911d2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133845Z:6a7eaf2e-9aeb-410c-9ec8-258b31c911d2" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:38:44 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "2009" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:38:24.377Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+42": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"northeurope\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\"\n },\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\": {\n },\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"\n },\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://keyVaultNamedur8ab.vault.azure.net/\"\n },\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"\n },\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://keyVaultNamedur8ab.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": true\n }\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "1396" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "20134136-b720-4870-9d25-99055b3abf1a_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1186" ], - "x-ms-correlation-request-id": [ "c6594f58-d31a-43fa-ad8b-8068ddcc8ec4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133854Z:c6594f58-d31a-43fa-ad8b-8068ddcc8ec4" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:38:54 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1817" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:38:52.187Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+43": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "141" ], - "x-ms-client-request-id": [ "7d8ec5c5-0a6d-43e3-8803-daa2f4f08e38" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "47cc3507-1810-4749-970d-2599864264e4_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11861" ], - "x-ms-correlation-request-id": [ "4cce6ba5-87c0-428f-be4e-8016fa18825f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133924Z:4cce6ba5-87c0-428f-be4e-8016fa18825f" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:39:24 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1817" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:38:52.187Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+44": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "142" ], - "x-ms-client-request-id": [ "7d8ec5c5-0a6d-43e3-8803-daa2f4f08e38" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "aae138f0-244c-48d8-8ed7-0dd73b7f4b91_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11860" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "a2def486-f36c-4abb-822a-bab3f527ea44" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T133955Z:a2def486-f36c-4abb-822a-bab3f527ea44" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:39:54 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1817" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:38:52.187Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+45": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "143" ], - "x-ms-client-request-id": [ "7d8ec5c5-0a6d-43e3-8803-daa2f4f08e38" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6567f200-90bd-4115-a882-880cf01868af_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11859" ], - "x-ms-correlation-request-id": [ "5e85b53b-f576-4eb9-bcc4-244fb3208b11" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134026Z:5e85b53b-f576-4eb9-bcc4-244fb3208b11" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:40:26 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1812" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:40:06.65Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+46": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "144" ], - "x-ms-client-request-id": [ "7d8ec5c5-0a6d-43e3-8803-daa2f4f08e38" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5683c9a3-7f37-4e1d-98f2-0fec663e8abd_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11858" ], - "x-ms-correlation-request-id": [ "a85a238d-53c1-42de-ad86-d16b58c032a2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134056Z:a85a238d-53c1-42de-ad86-d16b58c032a2" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:40:56 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1812" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:40:06.65Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+47": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "145" ], - "x-ms-client-request-id": [ "7d8ec5c5-0a6d-43e3-8803-daa2f4f08e38" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "29d5a4c9-fb8c-420f-a2cf-7c6ea6975631_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11857" ], - "x-ms-correlation-request-id": [ "92eb6ea0-e5a1-40b3-b1ef-df57a95e872a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134127Z:92eb6ea0-e5a1-40b3-b1ef-df57a95e872a" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:41:26 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1812" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:40:06.65Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+48": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "146" ], - "x-ms-client-request-id": [ "7d8ec5c5-0a6d-43e3-8803-daa2f4f08e38" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "54b95b8d-10fc-4c4a-8526-fe0bd6798239_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11856" ], - "x-ms-correlation-request-id": [ "42c77bd1-30f8-4cf1-8f94-824e8d4c89de" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134157Z:42c77bd1-30f8-4cf1-8f94-824e8d4c89de" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:41:57 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1812" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:40:06.65Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+49": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "147" ], - "x-ms-client-request-id": [ "7d8ec5c5-0a6d-43e3-8803-daa2f4f08e38" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e98f9e64-8ad8-427b-b4b2-04e09393b917_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11855" ], - "x-ms-correlation-request-id": [ "1f6077dc-b994-4ba9-8e44-9d554eedd775" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134228Z:1f6077dc-b994-4ba9-8e44-9d554eedd775" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:42:28 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1812" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:40:06.65Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+50": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "148" ], - "x-ms-client-request-id": [ "7d8ec5c5-0a6d-43e3-8803-daa2f4f08e38" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "646d10e2-2b58-4509-8975-cd822893e327_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11854" ], - "x-ms-correlation-request-id": [ "28282579-8717-4aed-985d-97f09b390f62" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134300Z:28282579-8717-4aed-985d-97f09b390f62" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:42:59 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1812" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:40:06.65Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+51": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "149" ], - "x-ms-client-request-id": [ "7d8ec5c5-0a6d-43e3-8803-daa2f4f08e38" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "60cb8522-5b9c-4dab-9254-9bb556a4b8c5_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11853" ], - "x-ms-correlation-request-id": [ "61fbad43-47ac-41b2-82c9-4e283d73dceb" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134330Z:61fbad43-47ac-41b2-82c9-4e283d73dceb" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:43:29 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1812" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:40:06.65Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+52": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "150" ], - "x-ms-client-request-id": [ "7d8ec5c5-0a6d-43e3-8803-daa2f4f08e38" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "723c3fe9-89a8-46a3-9099-d4bd2e412e3f_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11852" ], - "x-ms-correlation-request-id": [ "00728276-0697-486a-b6d5-59c6681616e8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134401Z:00728276-0697-486a-b6d5-59c6681616e8" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:44:00 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1812" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:40:06.65Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+53": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "151" ], - "x-ms-client-request-id": [ "7d8ec5c5-0a6d-43e3-8803-daa2f4f08e38" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0ae4b6d3-1670-4a85-937d-f94c4498777e_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11851" ], - "x-ms-correlation-request-id": [ "2a6b7a08-5b76-465f-b795-3b8259d72cc6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134431Z:2a6b7a08-5b76-465f-b795-3b8259d72cc6" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:44:30 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1812" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:40:06.65Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+54": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "152" ], - "x-ms-client-request-id": [ "7d8ec5c5-0a6d-43e3-8803-daa2f4f08e38" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fa086fac-4353-4734-a29d-dc2e23206c3b_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11850" ], - "x-ms-correlation-request-id": [ "497beead-f230-473a-9ed5-277f8e1cb448" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134503Z:497beead-f230-473a-9ed5-277f8e1cb448" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:45:02 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1812" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:40:06.65Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+55": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "153" ], - "x-ms-client-request-id": [ "7d8ec5c5-0a6d-43e3-8803-daa2f4f08e38" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "90f6117e-e041-4242-afdd-dea6cc0718c1_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11849" ], - "x-ms-correlation-request-id": [ "54720146-2af0-44f2-bd11-c51cb76baf81" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134533Z:54720146-2af0-44f2-bd11-c51cb76baf81" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:45:33 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1812" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:40:06.65Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+56": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "154" ], - "x-ms-client-request-id": [ "7d8ec5c5-0a6d-43e3-8803-daa2f4f08e38" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f796c219-5e22-4be0-a3cc-62a7cf47beb1_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11848" ], - "x-ms-correlation-request-id": [ "1412dd5e-a9ce-4c92-8779-806f95a8cec0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134604Z:1412dd5e-a9ce-4c92-8779-806f95a8cec0" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:46:03 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1915" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:45:59.087Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+57": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "155" ], - "x-ms-client-request-id": [ "7d8ec5c5-0a6d-43e3-8803-daa2f4f08e38" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "569ec46d-4062-41dc-b04a-5858093c5f74_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11847" ], - "x-ms-correlation-request-id": [ "7872a8ef-5735-49d6-bc36-ef8e2de811c8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134635Z:7872a8ef-5735-49d6-bc36-ef8e2de811c8" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:46:34 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "2007" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:46:11.65Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzServiceBusNamespaceV2+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview+58": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "156" ], - "x-ms-client-request-id": [ "7d8ec5c5-0a6d-43e3-8803-daa2f4f08e38" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "114" ], + "x-ms-client-request-id": [ "8c134ebc-1c09-4b08-90f9-18ef328843db" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -2391,22 +871,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "025e509c-444b-4225-97f5-a9fd754bc9ca_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11846" ], - "x-ms-correlation-request-id": [ "0e86e7c8-1f82-471c-927b-e886c07e74e5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134635Z:0e86e7c8-1f82-471c-927b-e886c07e74e5" ], + "x-ms-correlation-request-id": [ "6365011b-fd67-44e4-a432-faca6c5b1a14" ], + "x-ms-client-request-id": [ "8c134ebc-1c09-4b08-90f9-18ef328843db_RP" ], + "x-ms-messaging-activity-id": [ "b9bba1a2-f54a-4986-9c64-3d5ac5470981" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:30:31" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "x-ms-request-id": [ "6365011b-fd67-44e4-a432-faca6c5b1a14" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053032Z:6365011b-fd67-44e4-a432-faca6c5b1a14" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:46:35 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 01BF39907A944A6EB98465C0EE0B78E9 Ref B: SEL221051504035 Ref C: 2024-04-30T05:30:30Z" ], + "Date": [ "Tue, 30 Apr 2024 05:30:31 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2007" ], + "Content-Length": [ "2094" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV94qljkm\",\"name\":\"namespaceV94qljkm\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev94qljkm\",\"createdAt\":\"2023-02-19T13:38:52.187Z\",\"updatedAt\":\"2023-02-19T13:46:11.65Z\",\"serviceBusEndpoint\":\"https://namespaceV94qljkm.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV9efv5ht\",\"name\":\"namespaceV9efv5ht\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}}],\"requireInfrastructureEncryption\":true},\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev9efv5ht\",\"serviceBusEndpoint\":\"https://namespaceV9efv5ht.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:29:26.7762709Z\",\"updatedAt\":\"2024-04-30T05:30:27.3312497Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusNamespaceV2.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusNamespaceV2.Tests.ps1 index 6511622914c6..9638e9f870ab 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusNamespaceV2.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusNamespaceV2.Tests.ps1 @@ -16,38 +16,42 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzServiceBusNamespaceV2') Describe 'New-AzServiceBusNamespaceV2' { It 'CreateExpanded' { - $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV2 -SkuName Standard -Location eastus + $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV2 -SkuName Standard -Location $env.location $serviceBusNamespace.Name | Should -Be $env.namespaceV2 $serviceBusNamespace.SkuName | Should -Be Standard - $serviceBusNamespace.Location | should -Be "East Us" + $serviceBusNamespace.Location.Replace(" ", "").ToLower() | Should -Be $env.location - $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV3 -SkuName Standard -Location southcentralus -Tag @{k1='v1'; k2='v2'} -DisableLocalAuth -MinimumTlsVersion 1.1 + $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV3 -SkuName Standard -Location $env.location -Tag @{k1='v1'; k2='v2'} -DisableLocalAuth -MinimumTlsVersion 1.1 $serviceBusNamespace.Name | Should -Be $env.namespaceV3 $serviceBusNamespace.SkuName | Should -Be Standard $serviceBusNamespace.SkuTier | Should -Be Standard $serviceBusNamespace.MinimumTlsVersion | Should -Be '1.1' - $serviceBusNamespace.Location | Should -Be "South Central Us" + $serviceBusNamespace.Location.Replace(" ", "").ToLower() | Should -Be $env.location $serviceBusNamespace.DisableLocalAuth | Should -Be $true $serviceBusNamespace.Tag.Count | should -Be 2 - $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV4 -SkuName Premium -Location eastus -IdentityType SystemAssigned -ZoneRedundant -PremiumMessagingPartition 2 -SkuCapacity 2 + if ($env:usePartitionedNamespace) { + $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV4 -SkuName Premium -Location $env.location -IdentityType SystemAssigned -ZoneRedundant:$env.useZoneRedundancy -PremiumMessagingPartition 2 -SkuCapacity 2 + $serviceBusNamespace.PremiumMessagingPartition | Should -Be 2 + } else { + $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV4 -SkuName Premium -Location $env.location -IdentityType SystemAssigned -ZoneRedundant:$env.useZoneRedundancy -SkuCapacity 2 + } $serviceBusNamespace.Name | Should -Be $env.namespaceV4 $serviceBusNamespace.IdentityType | Should -Be SystemAssigned $serviceBusNamespace.SkuName | Should -Be Premium $serviceBusNamespace.SkuTier | Should -Be Premium $serviceBusNamespace.SkuCapacity | Should -Be 2 - $serviceBusNamespace.PremiumMessagingPartition | Should -Be 2 - $serviceBusNamespace.Location | Should -Be "East Us" - $serviceBusNamespace.ZoneRedundant | Should be $true + $serviceBusNamespace.Location.Replace(" ", "").ToLower() | Should -Be $env.location + $serviceBusNamespace.ZoneRedundant | Should be $env.useZoneRedundancy # Create namespace with UserAssigned Encryption Enabled $ec1 = New-AzServiceBusKeyVaultPropertiesObject -KeyName key1 -KeyVaulturi $env.keyVaultUri -UserAssignedIdentity $env.msi1 $ec2 = New-AzServiceBusKeyVaultPropertiesObject -KeyName key2 -KeyVaulturi $env.keyVaultUri -UserAssignedIdentity $env.msi1 - $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV5 -SkuName Premium -Location northeurope -IdentityType UserAssigned -UserAssignedIdentityId $env.msi1,$env.msi2 -KeyVaultProperty $ec1,$ec2 + $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV5 -SkuName Premium -Location $env.location -IdentityType UserAssigned -UserAssignedIdentityId $env.msi1,$env.msi2 -KeyVaultProperty $ec1,$ec2 $serviceBusNamespace.IdentityType | Should -Be UserAssigned $serviceBusNamespace.SkuName | Should -Be Premium $serviceBusNamespace.SkuTier | Should -Be Premium - $serviceBusNamespace.Location | Should -Be "North Europe" + $serviceBusNamespace.Location.Replace(" ", "").ToLower() | Should -Be $env.location $serviceBusNamespace.KeyVaultProperty.Count | Should -Be 2 $serviceBusNamespace.UserAssignedIdentity.Count | Should -Be 2 $serviceBusNamespace.RequireInfrastructureEncryption | Should -Be $false @@ -56,11 +60,11 @@ Describe 'New-AzServiceBusNamespaceV2' { # Create namespace with UserAssigned Encryption Enabled and RequireInfrastructureEncryption true $ec1 = New-AzServiceBusKeyVaultPropertiesObject -KeyName key1 -KeyVaulturi $env.keyVaultUri -UserAssignedIdentity $env.msi1 $ec2 = New-AzServiceBusKeyVaultPropertiesObject -KeyName key2 -KeyVaulturi $env.keyVaultUri -UserAssignedIdentity $env.msi1 - $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV9 -SkuName Premium -Location northeurope -IdentityType UserAssigned -UserAssignedIdentityId $env.msi1,$env.msi2 -KeyVaultProperty $ec1,$ec2 -RequireInfrastructureEncryption + $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV9 -SkuName Premium -Location $env.location -IdentityType UserAssigned -UserAssignedIdentityId $env.msi1,$env.msi2 -KeyVaultProperty $ec1,$ec2 -RequireInfrastructureEncryption $serviceBusNamespace.IdentityType | Should -Be UserAssigned $serviceBusNamespace.SkuName | Should -Be Premium $serviceBusNamespace.SkuTier | Should -Be Premium - $serviceBusNamespace.Location | Should -Be "North Europe" + $serviceBusNamespace.Location.Replace(" ", "").ToLower() | Should -Be $env.location $serviceBusNamespace.KeyVaultProperty.Count | Should -Be 2 $serviceBusNamespace.UserAssignedIdentity.Count | Should -Be 2 $serviceBusNamespace.RequireInfrastructureEncryption | Should -Be $true diff --git a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusQueue.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusQueue.Recording.json index b8b336a7d090..be29f91f0539 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusQueue.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusQueue.Recording.json @@ -1,8 +1,8 @@ { - "New-AzServiceBusQueue+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+1": { + "New-AzServiceBusQueue+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT4M\",\n \"maxSizeInMegabytes\": 4096,\n \"maxMessageSizeInKilobytes\": 102400,\n \"requiresDuplicateDetection\": true,\n \"defaultMessageTimeToLive\": \"P428DT3H11M10S\",\n \"deadLetteringOnMessageExpiration\": true,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"maxDeliveryCount\": 8,\n \"status\": \"Active\",\n \"enableBatchedOperations\": false,\n \"forwardTo\": \"queue1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -17,28 +17,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1185" ], - "x-ms-request-id": [ "825a3dc3-2cb6-4eaf-bd63-f1d02dc888fe" ], - "x-ms-correlation-request-id": [ "825a3dc3-2cb6-4eaf-bd63-f1d02dc888fe" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134706Z:825a3dc3-2cb6-4eaf-bd63-f1d02dc888fe" ], + "x-ms-correlation-request-id": [ "c077c49e-969b-42bb-aa5e-e25c907d2a25" ], + "x-ms-client-request-id": [ "209817fb-86e3-4e0e-a6a6-ea6cd5c44e6d_RP" ], + "x-ms-messaging-activity-id": [ "73d10207-5151-4f4d-a9dd-47fde0625059" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:31:07" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "c077c49e-969b-42bb-aa5e-e25c907d2a25" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053107Z:c077c49e-969b-42bb-aa5e-e25c907d2a25" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:47:06 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7829C124E37641FA9D040BBD4E976E4C Ref B: SEL221051504035 Ref C: 2024-04-30T05:31:04Z" ], + "Date": [ "Tue, 30 Apr 2024 05:31:07 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1077" ], + "Content-Length": [ "1079" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT4M\",\"maxSizeInMegabytes\":4096,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:05.607Z\",\"updatedAt\":\"2023-02-19T13:47:05.77Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT4M\",\"maxSizeInMegabytes\":4096,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:07.287Z\",\"updatedAt\":\"2024-04-30T05:31:07.44Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "New-AzServiceBusQueue+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3?api-version=2022-10-01-preview+2": { + "New-AzServiceBusQueue+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3?api-version=2022-10-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"requiresSession\": true,\n \"autoDeleteOnIdle\": \"P7D\"\n }\n}", "isContentBase64": false, "Headers": { @@ -53,37 +58,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1184" ], - "x-ms-request-id": [ "0183910f-fab8-4c36-a1e9-803415efb546" ], - "x-ms-correlation-request-id": [ "0183910f-fab8-4c36-a1e9-803415efb546" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134708Z:0183910f-fab8-4c36-a1e9-803415efb546" ], + "x-ms-correlation-request-id": [ "7a548b61-2474-4f89-aeca-5c385edf1dd3" ], + "x-ms-client-request-id": [ "db29c8d1-f0fb-4b7a-8ee1-2371cbe70bd0_RP" ], + "x-ms-messaging-activity-id": [ "470e77e4-bcef-4744-86b7-186f97b89973" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T05:31:11" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "7a548b61-2474-4f89-aeca-5c385edf1dd3" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053111Z:7a548b61-2474-4f89-aeca-5c385edf1dd3" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:47:08 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6CC9EB9B4E32431DA0826ADBEA04FA68 Ref B: SEL221051504035 Ref C: 2024-04-30T05:31:08Z" ], + "Date": [ "Tue, 30 Apr 2024 05:31:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1001" ], + "Content-Length": [ "1005" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3\",\"name\":\"queue3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P7D\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:08.13Z\",\"updatedAt\":\"2023-02-19T13:47:08.2Z\",\"accessedAt\":\"0001-01-01T00:00:00\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3\",\"name\":\"queue3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P7D\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:11.34Z\",\"updatedAt\":\"2024-04-30T05:31:11.437Z\",\"accessedAt\":\"0001-01-01T00:00:00\"}}", "isContentBase64": false } }, - "New-AzServiceBusQueue+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues?api-version=2022-10-01-preview+3": { + "New-AzServiceBusQueue+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "159" ], - "x-ms-client-request-id": [ "1f2047de-efee-4337-bfe8-8179e63e56cb" ], + "x-ms-unique-id": [ "117" ], + "x-ms-client-request-id": [ "7e57fb06-5046-4b07-bfb0-14f85b021c4d" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -95,28 +105,33 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-inline-count": [ "" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11845" ], - "x-ms-request-id": [ "bb67acfe-fa4b-453a-9d59-dad244f75483" ], - "x-ms-correlation-request-id": [ "bb67acfe-fa4b-453a-9d59-dad244f75483" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134709Z:bb67acfe-fa4b-453a-9d59-dad244f75483" ], + "x-ms-correlation-request-id": [ "b5e50275-594b-49d6-8356-ea6cf071dd0b" ], + "x-ms-client-request-id": [ "7e57fb06-5046-4b07-bfb0-14f85b021c4d_RP" ], + "x-ms-messaging-activity-id": [ "5afed4fc-83fd-4be2-93a8-c241080c840b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:31:13" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "x-ms-request-id": [ "b5e50275-594b-49d6-8356-ea6cf071dd0b" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053113Z:b5e50275-594b-49d6-8356-ea6cf071dd0b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:47:09 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D78260A965A44AD8918063C9A01733A2 Ref B: SEL221051504035 Ref C: 2024-04-30T05:31:12Z" ], + "Date": [ "Tue, 30 Apr 2024 05:31:13 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "3131" ], + "Content-Length": [ "3139" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:02:41.6727523Z\",\"updatedAt\":\"2023-02-19T13:20:54.0533289Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT4M\",\"maxSizeInMegabytes\":4096,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:05.607Z\",\"updatedAt\":\"2023-02-19T13:47:05.77Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3\",\"name\":\"queue3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P7D\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:08.13Z\",\"updatedAt\":\"2023-02-19T13:47:08.2Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:06:34.7488153Z\",\"updatedAt\":\"2024-04-30T05:23:48.2059003Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT4M\",\"maxSizeInMegabytes\":4096,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:07.287Z\",\"updatedAt\":\"2024-04-30T05:31:07.44Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3\",\"name\":\"queue3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P7D\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:11.34Z\",\"updatedAt\":\"2024-04-30T05:31:11.437Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}]}", "isContentBase64": false } }, - "New-AzServiceBusQueue+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1?api-version=2022-10-01-preview+4": { + "New-AzServiceBusQueue+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1?api-version=2022-10-01-preview+4": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"enableExpress\": true\n }\n}", "isContentBase64": false, "Headers": { @@ -131,21 +146,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1183" ], - "x-ms-request-id": [ "25a8ff3e-f3fb-42a3-b08e-286c4f1ba489" ], - "x-ms-correlation-request-id": [ "25a8ff3e-f3fb-42a3-b08e-286c4f1ba489" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134711Z:25a8ff3e-f3fb-42a3-b08e-286c4f1ba489" ], + "x-ms-correlation-request-id": [ "53e71e14-e31f-4159-8957-163255c510e8" ], + "x-ms-client-request-id": [ "6ec64476-3981-47ea-a4e7-42db5d4b37ab_RP" ], + "x-ms-messaging-activity-id": [ "6b02ea36-18fe-4380-8381-a8a2cf45c26f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:31:17" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "53e71e14-e31f-4159-8957-163255c510e8" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053117Z:53e71e14-e31f-4159-8957-163255c510e8" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:47:11 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 59EF5BEF7F8E4883938CFDA580612AD5 Ref B: SEL221051504035 Ref C: 2024-04-30T05:31:14Z" ], + "Date": [ "Tue, 30 Apr 2024 05:31:17 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1025" ], + "Content-Length": [ "1027" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:11.44Z\",\"updatedAt\":\"2023-02-19T13:47:11.463Z\",\"accessedAt\":\"0001-01-01T00:00:00\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:17.09Z\",\"updatedAt\":\"2024-04-30T05:31:17.117Z\",\"accessedAt\":\"0001-01-01T00:00:00\"}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusRule.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusRule.Recording.json index 36bb250065fc..837bdd15a51a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusRule.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusRule.Recording.json @@ -1,8 +1,8 @@ { - "New-AzServiceBusRule+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRule2?api-version=2022-10-01-preview+1": { + "New-AzServiceBusRule+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRule2?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRule2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRule2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"action\": {\n \"sqlExpression\": \"SET a=b\"\n },\n \"sqlFilter\": {\n \"sqlExpression\": \"1=2\"\n },\n \"filterType\": \"SqlFilter\"\n }\n}", "isContentBase64": false, "Headers": { @@ -17,29 +17,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1182" ], - "x-ms-request-id": [ "906b39e7-244d-4efe-88fd-bf34e0f44117" ], - "x-ms-correlation-request-id": [ "906b39e7-244d-4efe-88fd-bf34e0f44117" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134725Z:906b39e7-244d-4efe-88fd-bf34e0f44117" ], + "x-ms-correlation-request-id": [ "d2e2bf9e-1477-4ec2-bb76-f6729726048d" ], + "x-ms-client-request-id": [ "11663c9c-fafa-4c9e-8afd-7065299e69a7_RP" ], + "x-ms-messaging-activity-id": [ "b7295584-a4f0-416d-83c6-f809e528f189" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:31:37" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "d2e2bf9e-1477-4ec2-bb76-f6729726048d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053137Z:d2e2bf9e-1477-4ec2-bb76-f6729726048d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:47:25 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 07F50B1D3AE445F0A88391ACEFB0FF56 Ref B: SEL221051504035 Ref C: 2024-04-30T05:31:33Z" ], + "Date": [ "Tue, 30 Apr 2024 05:31:37 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "489" ], + "Content-Length": [ "491" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRule2\",\"name\":\"sqlRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{\"sqlExpression\":\"SET a=b\",\"compatibilityLevel\":20},\"filterType\":\"SqlFilter\",\"sqlFilter\":{\"sqlExpression\":\"1=2\",\"compatibilityLevel\":20}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRule2\",\"name\":\"sqlRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{\"sqlExpression\":\"SET a=b\",\"compatibilityLevel\":20},\"filterType\":\"SqlFilter\",\"sqlFilter\":{\"sqlExpression\":\"1=2\",\"compatibilityLevel\":20}}}", "isContentBase64": false } }, - "New-AzServiceBusRule+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+2": { + "New-AzServiceBusRule+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"correlationFilter\": {\n \"properties\": {\n \"c\": \"d\",\n \"a\": \"b\"\n },\n \"correlationId\": \"correlationid\",\n \"messageId\": \"messageid\",\n \"replyTo\": \"replyto\",\n \"label\": \"label\",\n \"sessionId\": \"sessionid\",\n \"replyToSessionId\": \"replytosessionid\",\n \"contentType\": \"contenttype\"\n },\n \"filterType\": \"CorrelationFilter\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"correlationFilter\": {\n \"properties\": {\n \"a\": \"b\",\n \"c\": \"d\"\n },\n \"correlationId\": \"correlationid\",\n \"messageId\": \"messageid\",\n \"replyTo\": \"replyto\",\n \"label\": \"label\",\n \"sessionId\": \"sessionid\",\n \"replyToSessionId\": \"replytosessionid\",\n \"contentType\": \"contenttype\"\n },\n \"filterType\": \"CorrelationFilter\"\n }\n}", "isContentBase64": false, "Headers": { }, @@ -53,21 +58,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1181" ], - "x-ms-request-id": [ "77db29f2-fefc-4563-a799-20461cc4c613" ], - "x-ms-correlation-request-id": [ "77db29f2-fefc-4563-a799-20461cc4c613" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134728Z:77db29f2-fefc-4563-a799-20461cc4c613" ], + "x-ms-correlation-request-id": [ "e14569bf-6482-4da8-8ecd-1380bf00b621" ], + "x-ms-client-request-id": [ "ee85277a-8c6c-4330-ada0-ac7310a5f71f_RP" ], + "x-ms-messaging-activity-id": [ "e7bf9a8d-38ac-4cd3-8fb8-f4b0f516b463" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:31:41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "e14569bf-6482-4da8-8ecd-1380bf00b621" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053141Z:e14569bf-6482-4da8-8ecd-1380bf00b621" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:47:27 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2F7625FA64BD4259A846EE79832090DE Ref B: SEL221051504035 Ref C: 2024-04-30T05:31:38Z" ], + "Date": [ "Tue, 30 Apr 2024 05:31:41 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "639" ], + "Content-Length": [ "641" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"correlationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"label\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"contenttype\",\"properties\":{\"c\":\"d\",\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"correlationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"label\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"contenttype\",\"properties\":{\"a\":\"b\",\"c\":\"d\"}}}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusSubscription.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusSubscription.Recording.json index 5f8b43999c0a..c4f04aa8755d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusSubscription.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusSubscription.Recording.json @@ -1,8 +1,8 @@ { - "New-AzServiceBusSubscription+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+1": { + "New-AzServiceBusSubscription+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT3M\",\n \"defaultMessageTimeToLive\": \"P428DT3H11M10S\",\n \"deadLetteringOnMessageExpiration\": true,\n \"maxDeliveryCount\": 12,\n \"status\": \"Active\",\n \"enableBatchedOperations\": true,\n \"forwardTo\": \"queue1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -17,28 +17,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1180" ], - "x-ms-request-id": [ "b783467e-7e92-41f0-9d79-459b853fa39b" ], - "x-ms-correlation-request-id": [ "b783467e-7e92-41f0-9d79-459b853fa39b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134742Z:b783467e-7e92-41f0-9d79-459b853fa39b" ], + "x-ms-correlation-request-id": [ "f1c4c972-442f-41f8-be18-056c9fc04f50" ], + "x-ms-client-request-id": [ "d350f46d-71d0-4b0c-a7bc-19e0e25e312f_RP" ], + "x-ms-messaging-activity-id": [ "ca41004e-befc-45c7-a4f7-9833e480cf66" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T05:32:01" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "f1c4c972-442f-41f8-be18-056c9fc04f50" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053201Z:f1c4c972-442f-41f8-be18-056c9fc04f50" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:47:42 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7C1D8C729EA248D4A066F03BD455C8FA Ref B: SEL221051504035 Ref C: 2024-04-30T05:31:57Z" ], + "Date": [ "Tue, 30 Apr 2024 05:32:00 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1001" ], + "Content-Length": [ "1003" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT3M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T13:47:42.6331877Z\",\"updatedAt\":\"2023-02-19T13:47:42.6331877Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT3M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T05:32:01.0084297Z\",\"updatedAt\":\"2024-04-30T05:32:01.0084297Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "New-AzServiceBusSubscription+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3%24%24D?api-version=2022-10-01-preview+2": { + "New-AzServiceBusSubscription+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3%24%24D?api-version=2022-10-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3%24%24D?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3%24%24D?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"clientAffineProperties\": {\n \"clientId\": \"clientid\",\n \"isDurable\": true,\n \"isShared\": true\n },\n \"requiresSession\": true,\n \"deadLetteringOnFilterEvaluationExceptions\": true,\n \"autoDeleteOnIdle\": \"P7D\",\n \"isClientAffine\": true\n }\n}", "isContentBase64": false, "Headers": { @@ -53,37 +58,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1179" ], - "x-ms-request-id": [ "23a99802-f762-42b2-b3e3-36441963ceb5" ], - "x-ms-correlation-request-id": [ "23a99802-f762-42b2-b3e3-36441963ceb5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134744Z:23a99802-f762-42b2-b3e3-36441963ceb5" ], + "x-ms-correlation-request-id": [ "1c9d469c-d2e8-4c16-b440-564a4519eacc" ], + "x-ms-client-request-id": [ "25ee794b-ab12-48d4-a750-11155cb1c9b9_RP" ], + "x-ms-messaging-activity-id": [ "4affd4c3-3828-4454-b6b4-79d245e3f980" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T05:32:04" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "1c9d469c-d2e8-4c16-b440-564a4519eacc" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T053204Z:1c9d469c-d2e8-4c16-b440-564a4519eacc" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:47:43 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D4C2D1BDF3A04E04BC4903EF27E5A2B8 Ref B: SEL221051504035 Ref C: 2024-04-30T05:32:01Z" ], + "Date": [ "Tue, 30 Apr 2024 05:32:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1015" ], + "Content-Length": [ "1017" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3$$D\",\"name\":\"subscription3$$D\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":true,\"clientAffineProperties\":{\"clientId\":\"clientid\",\"isDurable\":true,\"isShared\":true},\"lockDuration\":\"PT1M\",\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T13:47:44.3365374Z\",\"updatedAt\":\"2023-02-19T13:47:44.3365374Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P7D\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3$$D\",\"name\":\"subscription3$$D\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":true,\"clientAffineProperties\":{\"clientId\":\"clientid\",\"isDurable\":true,\"isShared\":true},\"lockDuration\":\"PT1M\",\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T05:32:04.3012133Z\",\"updatedAt\":\"2024-04-30T05:32:04.3012133Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P7D\"}}", "isContentBase64": false } }, - "New-AzServiceBusSubscription+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions?api-version=2022-10-01-preview+3": { + "New-AzServiceBusSubscription+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "165" ], - "x-ms-client-request-id": [ "df21ce9e-03a7-4022-b5b4-c9d2a8e2e4cd" ], + "x-ms-unique-id": [ "123" ], + "x-ms-client-request-id": [ "fdadf057-62c0-4a69-a8b4-eaea15ab336d" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -95,21 +105,26 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-inline-count": [ "" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11844" ], - "x-ms-request-id": [ "2b730026-e0bb-4451-b439-5fcf85105fc2" ], - "x-ms-correlation-request-id": [ "2b730026-e0bb-4451-b439-5fcf85105fc2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134745Z:2b730026-e0bb-4451-b439-5fcf85105fc2" ], + "x-ms-correlation-request-id": [ "ea4e2624-afa2-439e-93b6-5bcd45a3961d" ], + "x-ms-client-request-id": [ "fdadf057-62c0-4a69-a8b4-eaea15ab336d_RP" ], + "x-ms-messaging-activity-id": [ "963ccd21-8999-45b7-b746-e9e3d6d879b3" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T05:32:06" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "ea4e2624-afa2-439e-93b6-5bcd45a3961d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053206Z:ea4e2624-afa2-439e-93b6-5bcd45a3961d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:47:44 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 58DA4B2944174354BC41D121ADB8132C Ref B: SEL221051504035 Ref C: 2024-04-30T05:32:04Z" ], + "Date": [ "Tue, 30 Apr 2024 05:32:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "3005" ], + "Content-Length": [ "3008" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1\",\"name\":\"subscription1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T13:02:44.2354247Z\",\"updatedAt\":\"2023-02-19T13:02:44.2354247Z\",\"accessedAt\":\"2023-02-19T13:02:44.235Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT3M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T13:47:42.6427506Z\",\"updatedAt\":\"2023-02-19T13:47:42.6427506Z\",\"accessedAt\":\"2023-02-19T13:47:42.6427506Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3$$D\",\"name\":\"subscription3$$D\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":true,\"clientAffineProperties\":{\"clientId\":\"clientid\",\"isDurable\":true,\"isShared\":true},\"lockDuration\":\"PT1M\",\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T13:47:44.3459436Z\",\"updatedAt\":\"2023-02-19T13:47:44.3459436Z\",\"accessedAt\":\"2023-02-19T13:47:44.3459436Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P7D\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1\",\"name\":\"subscription1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T05:06:37.7332631Z\",\"updatedAt\":\"2024-04-30T05:06:37.7332631Z\",\"accessedAt\":\"2024-04-30T05:06:37.733Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT3M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T05:32:01.0158655Z\",\"updatedAt\":\"2024-04-30T05:32:01.0158655Z\",\"accessedAt\":\"2024-04-30T05:32:01.0158655Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3$$D\",\"name\":\"subscription3$$D\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":true,\"clientAffineProperties\":{\"clientId\":\"clientid\",\"isDurable\":true,\"isShared\":true},\"lockDuration\":\"PT1M\",\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T05:32:04.312821Z\",\"updatedAt\":\"2024-04-30T05:32:04.312821Z\",\"accessedAt\":\"2024-04-30T05:32:04.312821Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P7D\"}}]}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusTopic.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusTopic.Recording.json index 7347836c302a..ed34008ca204 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusTopic.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/New-AzServiceBusTopic.Recording.json @@ -1,8 +1,8 @@ { - "New-AzServiceBusTopic+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic2?api-version=2022-10-01-preview+1": { + "New-AzServiceBusTopic+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic2?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"defaultMessageTimeToLive\": \"P365D\",\n \"maxMessageSizeInKilobytes\": 102400,\n \"requiresDuplicateDetection\": true,\n \"duplicateDetectionHistoryTimeWindow\": \"P1DT3M4S\",\n \"enableBatchedOperations\": true,\n \"supportOrdering\": true,\n \"autoDeleteOnIdle\": \"P428DT3H11M2S\"\n }\n}", "isContentBase64": false, "Headers": { @@ -17,28 +17,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1178" ], - "x-ms-request-id": [ "f74ff64f-5f3c-42bd-a0c3-2ca36cc10aa3" ], - "x-ms-correlation-request-id": [ "f74ff64f-5f3c-42bd-a0c3-2ca36cc10aa3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134759Z:f74ff64f-5f3c-42bd-a0c3-2ca36cc10aa3" ], + "x-ms-correlation-request-id": [ "809c789e-dd1c-44e4-9c03-c4b5692dc51a" ], + "x-ms-client-request-id": [ "6c711861-85a2-4628-be07-65e89c394f9b_RP" ], + "x-ms-messaging-activity-id": [ "cdfae128-e891-44e7-9776-25c578a77718" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T05:32:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "809c789e-dd1c-44e4-9c03-c4b5692dc51a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053226Z:809c789e-dd1c-44e4-9c03-c4b5692dc51a" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:47:59 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3650C54BA9234E31A33FE8C1BB5B2390 Ref B: SEL221051504035 Ref C: 2024-04-30T05:32:22Z" ], + "Date": [ "Tue, 30 Apr 2024 05:32:25 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "914" ], + "Content-Length": [ "916" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic2\",\"name\":\"topic2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"defaultMessageTimeToLive\":\"P365D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":true,\"duplicateDetectionHistoryTimeWindow\":\"P1DT3M4S\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P428DT3H11M2S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T13:47:59.1Z\",\"updatedAt\":\"2023-02-19T13:47:59.18Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic2\",\"name\":\"topic2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"defaultMessageTimeToLive\":\"P365D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":true,\"duplicateDetectionHistoryTimeWindow\":\"P1DT3M4S\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P428DT3H11M2S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T05:32:25.4Z\",\"updatedAt\":\"2024-04-30T05:32:25.54Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "New-AzServiceBusTopic+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic3?api-version=2022-10-01-preview+2": { + "New-AzServiceBusTopic+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic3?api-version=2022-10-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic3?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"maxSizeInMegabytes\": 2048\n }\n}", "isContentBase64": false, "Headers": { @@ -53,37 +58,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1177" ], - "x-ms-request-id": [ "f7743c92-c193-477b-a58f-b00839ee376f" ], - "x-ms-correlation-request-id": [ "f7743c92-c193-477b-a58f-b00839ee376f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134802Z:f7743c92-c193-477b-a58f-b00839ee376f" ], + "x-ms-correlation-request-id": [ "aad3fa22-8243-4109-b065-f83b265b37b2" ], + "x-ms-client-request-id": [ "8353c55b-25fc-48ff-bff4-3e41039f26ea_RP" ], + "x-ms-messaging-activity-id": [ "0e2f9eea-f27b-46a2-8877-58ade6d65b49" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T05:32:28" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "aad3fa22-8243-4109-b065-f83b265b37b2" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053228Z:aad3fa22-8243-4109-b065-f83b265b37b2" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:48:01 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E81DE71EC0164458A73B4841762C8F50 Ref B: SEL221051504035 Ref C: 2024-04-30T05:32:26Z" ], + "Date": [ "Tue, 30 Apr 2024 05:32:27 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "947" ], + "Content-Length": [ "948" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic3\",\"name\":\"topic3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T13:48:01.507Z\",\"updatedAt\":\"2023-02-19T13:48:01.583Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic3\",\"name\":\"topic3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T05:32:27.74Z\",\"updatedAt\":\"2024-04-30T05:32:27.833Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "New-AzServiceBusTopic+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics?api-version=2022-10-01-preview+3": { + "New-AzServiceBusTopic+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "168" ], - "x-ms-client-request-id": [ "2155464b-1355-4748-ae7e-4a39ce028afc" ], + "x-ms-unique-id": [ "126" ], + "x-ms-client-request-id": [ "c163c514-fa18-4627-ac51-6796388af97d" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -95,28 +105,33 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-inline-count": [ "" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11843" ], - "x-ms-request-id": [ "ef7692bd-4068-4bec-9b61-05037fac41db" ], - "x-ms-correlation-request-id": [ "ef7692bd-4068-4bec-9b61-05037fac41db" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134803Z:ef7692bd-4068-4bec-9b61-05037fac41db" ], + "x-ms-correlation-request-id": [ "c3343599-c58d-4ee2-aac9-ab9c701f7a9f" ], + "x-ms-client-request-id": [ "c163c514-fa18-4627-ac51-6796388af97d_RP" ], + "x-ms-messaging-activity-id": [ "0e4249b4-66c4-4108-91c3-d3f64e283467" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T05:32:30" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "c3343599-c58d-4ee2-aac9-ab9c701f7a9f" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053230Z:c3343599-c58d-4ee2-aac9-ab9c701f7a9f" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:48:02 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B8C945263AE140828ECDEC2D1B33DBD4 Ref B: SEL221051504035 Ref C: 2024-04-30T05:32:28Z" ], + "Date": [ "Tue, 30 Apr 2024 05:32:29 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2841" ], + "Content-Length": [ "2845" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T13:02:41.6883314Z\",\"updatedAt\":\"2023-02-19T13:20:58.8033687Z\",\"accessedAt\":\"2023-02-19T13:47:44.3459436Z\",\"subscriptionCount\":3,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic2\",\"name\":\"topic2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"defaultMessageTimeToLive\":\"P365D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":true,\"duplicateDetectionHistoryTimeWindow\":\"P1DT3M4S\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P428DT3H11M2S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T13:47:59.1Z\",\"updatedAt\":\"2023-02-19T13:47:59.18Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic3\",\"name\":\"topic3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T13:48:01.507Z\",\"updatedAt\":\"2023-02-19T13:48:01.583Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T05:06:34.7644423Z\",\"updatedAt\":\"2024-04-30T05:23:56.7842058Z\",\"accessedAt\":\"2024-04-30T05:32:04.312821Z\",\"subscriptionCount\":3,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic2\",\"name\":\"topic2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"defaultMessageTimeToLive\":\"P365D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":true,\"duplicateDetectionHistoryTimeWindow\":\"P1DT3M4S\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P428DT3H11M2S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T05:32:25.4Z\",\"updatedAt\":\"2024-04-30T05:32:25.54Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic3\",\"name\":\"topic3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T05:32:27.74Z\",\"updatedAt\":\"2024-04-30T05:32:27.833Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}]}", "isContentBase64": false } }, - "New-AzServiceBusTopic+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1?api-version=2022-10-01-preview+4": { + "New-AzServiceBusTopic+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1?api-version=2022-10-01-preview+4": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"enableExpress\": true\n }\n}", "isContentBase64": false, "Headers": { @@ -131,21 +146,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1176" ], - "x-ms-request-id": [ "1aa41fb2-89d5-425b-a8c7-7eb313769af4" ], - "x-ms-correlation-request-id": [ "1aa41fb2-89d5-425b-a8c7-7eb313769af4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134805Z:1aa41fb2-89d5-425b-a8c7-7eb313769af4" ], + "x-ms-correlation-request-id": [ "d7d91cb6-414b-42ed-8873-ce879d3608b7" ], + "x-ms-client-request-id": [ "5238575d-ef64-4c74-bb0a-62fb68cacfda_RP" ], + "x-ms-messaging-activity-id": [ "11398f70-5f55-45fa-b451-1290ccce8a31" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:32:33" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "d7d91cb6-414b-42ed-8873-ce879d3608b7" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053234Z:d7d91cb6-414b-42ed-8873-ce879d3608b7" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:48:05 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C4E2545EA6EB4FF7B2F89DB347CD9EF3 Ref B: SEL221051504035 Ref C: 2024-04-30T05:32:30Z" ], + "Date": [ "Tue, 30 Apr 2024 05:32:33 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "943" ], + "Content-Length": [ "947" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"createdAt\":\"2023-02-19T13:48:04.82Z\",\"updatedAt\":\"2023-02-19T13:48:04.84Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"createdAt\":\"2024-04-30T05:32:33.457Z\",\"updatedAt\":\"2024-04-30T05:32:33.523Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusAuthorizationRule.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusAuthorizationRule.Recording.json index 3bb94189af72..e4ef7539470f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusAuthorizationRule.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusAuthorizationRule.Recording.json @@ -1,17 +1,17 @@ { - "Remove-AzServiceBusAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "170" ], - "x-ms-client-request-id": [ "ddb96d7b-83d5-42ec-89ae-7775851cba31" ], + "x-ms-unique-id": [ "128" ], + "x-ms-client-request-id": [ "caaa1cdc-4425-47a3-a3b2-9d77c5f4d7be" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusNamespaceAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,37 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11842" ], - "x-ms-request-id": [ "86ad9bf5-b513-4951-9030-0b66c3feef89" ], - "x-ms-correlation-request-id": [ "86ad9bf5-b513-4951-9030-0b66c3feef89" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134839Z:86ad9bf5-b513-4951-9030-0b66c3feef89" ], + "x-ms-correlation-request-id": [ "d694e9aa-9911-4d8e-9f7d-f8192a944f1e" ], + "x-ms-client-request-id": [ "caaa1cdc-4425-47a3-a3b2-9d77c5f4d7be_RP" ], + "x-ms-messaging-activity-id": [ "87f82dce-3810-42f1-989d-9e74e93539bf" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:33:23" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "d694e9aa-9911-4d8e-9f7d-f8192a944f1e" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053323Z:d694e9aa-9911-4d8e-9f7d-f8192a944f1e" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:48:39 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F0C62247D8814247BEC7D442E914927D Ref B: SEL221051504035 Ref C: 2024-04-30T05:33:21Z" ], + "Date": [ "Tue, 30 Apr 2024 05:33:22 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1459" ], + "Content-Length": [ "1467" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule2\",\"name\":\"namespaceAuthRule2\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule3\",\"name\":\"namespaceAuthRule3\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\",\"Manage\",\"Listen\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule2\",\"name\":\"namespaceAuthRule2\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule3\",\"name\":\"namespaceAuthRule3\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\",\"Manage\",\"Listen\"]}}]}", "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules?api-version=2022-10-01-preview+2": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "171" ], - "x-ms-client-request-id": [ "3ff0ceed-6ad1-455c-8ddc-1925aeadf5b1" ], + "x-ms-unique-id": [ "129" ], + "x-ms-client-request-id": [ "39d1de4f-25bd-43f3-8a21-3653df779fcd" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusQueueAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusQueueAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -63,37 +68,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11841" ], - "x-ms-request-id": [ "f38cdc43-824d-4b6b-9202-ace069302c8b" ], - "x-ms-correlation-request-id": [ "f38cdc43-824d-4b6b-9202-ace069302c8b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134839Z:f38cdc43-824d-4b6b-9202-ace069302c8b" ], + "x-ms-correlation-request-id": [ "19fabbd3-cfcc-4778-9930-97a1573608b4" ], + "x-ms-client-request-id": [ "39d1de4f-25bd-43f3-8a21-3653df779fcd_RP" ], + "x-ms-messaging-activity-id": [ "2a9ab290-b4c9-4dbe-b105-f824af005bf3" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T05:33:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "19fabbd3-cfcc-4778-9930-97a1573608b4" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053325Z:19fabbd3-cfcc-4778-9930-97a1573608b4" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:48:39 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5CCC6F2DC3514794930B3CF55A49D349 Ref B: SEL221051504035 Ref C: 2024-04-30T05:33:23Z" ], + "Date": [ "Tue, 30 Apr 2024 05:33:24 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1123" ], + "Content-Length": [ "1129" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule2\",\"name\":\"queueAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule3\",\"name\":\"queueAuthRule3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule2\",\"name\":\"queueAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule3\",\"name\":\"queueAuthRule3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules?api-version=2022-10-01-preview+3": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "172" ], - "x-ms-client-request-id": [ "70d4b31d-edc6-4867-8a9f-71a82e12aef3" ], + "x-ms-unique-id": [ "130" ], + "x-ms-client-request-id": [ "577b3580-6f15-47f7-bd08-7289931af1b7" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusTopicAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusTopicAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -104,37 +114,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11840" ], - "x-ms-request-id": [ "4cb0b1f8-f108-4c5c-a13d-e317d2d687ba" ], - "x-ms-correlation-request-id": [ "4cb0b1f8-f108-4c5c-a13d-e317d2d687ba" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134840Z:4cb0b1f8-f108-4c5c-a13d-e317d2d687ba" ], + "x-ms-correlation-request-id": [ "b968d615-99bf-4a3e-ae06-bb8f0e1a63da" ], + "x-ms-client-request-id": [ "577b3580-6f15-47f7-bd08-7289931af1b7_RP" ], + "x-ms-messaging-activity-id": [ "5421509d-c7be-4921-bcf3-9d25d3304597" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T05:33:27" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "b968d615-99bf-4a3e-ae06-bb8f0e1a63da" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T053327Z:b968d615-99bf-4a3e-ae06-bb8f0e1a63da" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:48:40 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DB2439ACA50C4A04BE9EA86981096768 Ref B: SEL221051504035 Ref C: 2024-04-30T05:33:25Z" ], + "Date": [ "Tue, 30 Apr 2024 05:33:26 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1105" ], + "Content-Length": [ "1111" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule2\",\"name\":\"topicAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule3\",\"name\":\"topicAuthRule3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule2\",\"name\":\"topicAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule3\",\"name\":\"topicAuthRule3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedNamespace+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule3?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedNamespace+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule3?api-version=2022-10-01-preview+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule3?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "173" ], - "x-ms-client-request-id": [ "06e5bdaa-9482-417f-9460-0fc0c86bf775" ], + "x-ms-unique-id": [ "131" ], + "x-ms-client-request-id": [ "810c6732-d687-4347-8831-e5b407852e87" ], "CommandName": [ "Az.ServiceBus.private\\Remove-AzServiceBusNamespaceAuthorizationRule_Delete" ], "FullCommandName": [ "Remove-AzServiceBusNamespaceAuthorizationRule_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -145,14 +160,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-request-id": [ "382563d0-4000-469c-96e1-753bb3a978f8" ], - "x-ms-correlation-request-id": [ "382563d0-4000-469c-96e1-753bb3a978f8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134848Z:382563d0-4000-469c-96e1-753bb3a978f8" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005992" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005992" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005992" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T05:33:34" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "fb24221f-2ac8-4746-b753-c059683109d5" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053338Z:fb24221f-2ac8-4746-b753-c059683109d5" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:48:48 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3FB1DCB2828846DCB142D752271C3C93 Ref B: SEL221051504035 Ref C: 2024-04-30T05:33:27Z" ], + "Date": [ "Tue, 30 Apr 2024 05:33:37 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -162,19 +182,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule3?api-version=2022-10-01-preview+2": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule3?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule3?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "174" ], - "x-ms-client-request-id": [ "201afc82-bdb2-49a7-9250-baf269922ec8" ], + "x-ms-unique-id": [ "132" ], + "x-ms-client-request-id": [ "cbc4397a-65cf-4313-b80d-ec6c99b75a5b" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzServiceBusNamespaceAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -185,14 +205,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11839" ], - "x-ms-request-id": [ "ea2d91e4-4cc9-40ee-a53a-243e985c157f" ], - "x-ms-correlation-request-id": [ "ea2d91e4-4cc9-40ee-a53a-243e985c157f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134850Z:ea2d91e4-4cc9-40ee-a53a-243e985c157f" ], + "x-ms-correlation-request-id": [ "f8230cca-d7b0-48b7-a339-7d75d026e3cd" ], + "x-ms-client-request-id": [ "cbc4397a-65cf-4313-b80d-ec6c99b75a5b_RP" ], + "x-ms-messaging-activity-id": [ "19652563-9430-448a-be6b-f3ab8f9c0866" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T05:33:40" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "f8230cca-d7b0-48b7-a339-7d75d026e3cd" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053340Z:f8230cca-d7b0-48b7-a339-7d75d026e3cd" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:48:49 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 68CC0AC0C7674F1FBE79A6C45A19E3AC Ref B: SEL221051504035 Ref C: 2024-04-30T05:33:38Z" ], + "Date": [ "Tue, 30 Apr 2024 05:33:39 GMT" ] }, "ContentHeaders": { "Content-Length": [ "87" ], @@ -203,19 +228,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules?api-version=2022-10-01-preview+3": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "175" ], - "x-ms-client-request-id": [ "02d0e228-f103-42f1-89d5-c71a48a85972" ], + "x-ms-unique-id": [ "133" ], + "x-ms-client-request-id": [ "001cfa73-2d99-4298-9bf6-9207c2e1e724" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusNamespaceAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -226,37 +251,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11838" ], - "x-ms-request-id": [ "aff17fdd-380d-4115-9b18-1491f590aaf5" ], - "x-ms-correlation-request-id": [ "aff17fdd-380d-4115-9b18-1491f590aaf5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134851Z:aff17fdd-380d-4115-9b18-1491f590aaf5" ], + "x-ms-correlation-request-id": [ "e8453913-8e2a-4897-8174-9f59c9319919" ], + "x-ms-client-request-id": [ "001cfa73-2d99-4298-9bf6-9207c2e1e724_RP" ], + "x-ms-messaging-activity-id": [ "da62a29d-3401-41ca-829b-974840f48a55" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T05:33:42" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "e8453913-8e2a-4897-8174-9f59c9319919" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T053342Z:e8453913-8e2a-4897-8174-9f59c9319919" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:48:50 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9731D8E940314DDC879F88A16C8B5360 Ref B: SEL221051504035 Ref C: 2024-04-30T05:33:40Z" ], + "Date": [ "Tue, 30 Apr 2024 05:33:41 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1096" ], + "Content-Length": [ "1102" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule2\",\"name\":\"namespaceAuthRule2\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule2\",\"name\":\"namespaceAuthRule2\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}]}", "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedTopic+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule3?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedTopic+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule3?api-version=2022-10-01-preview+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule3?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "176" ], - "x-ms-client-request-id": [ "ffc38923-e644-460d-99aa-12271a6f9d46" ], + "x-ms-unique-id": [ "134" ], + "x-ms-client-request-id": [ "3087f681-2862-41ca-9525-834ad1e6ac35" ], "CommandName": [ "Az.ServiceBus.private\\Remove-AzServiceBusTopicAuthorizationRule_Delete" ], "FullCommandName": [ "Remove-AzServiceBusTopicAuthorizationRule_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -267,14 +297,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], - "x-ms-request-id": [ "ddc0f94d-0860-4a23-8343-e8046d6f0bef" ], - "x-ms-correlation-request-id": [ "ddc0f94d-0860-4a23-8343-e8046d6f0bef" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134851Z:ddc0f94d-0860-4a23-8343-e8046d6f0bef" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000006996" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000006996" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000006996" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:33:44" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "a8444849-c503-4d86-8f3d-2807f2620cd3" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053344Z:a8444849-c503-4d86-8f3d-2807f2620cd3" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:48:51 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B7B6A764CA9E4DEEABCF0F1A56820E9D Ref B: SEL221051504035 Ref C: 2024-04-30T05:33:42Z" ], + "Date": [ "Tue, 30 Apr 2024 05:33:44 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -284,19 +319,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedTopic+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule3?api-version=2022-10-01-preview+2": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedTopic+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule3?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule3?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "177" ], - "x-ms-client-request-id": [ "ade88079-c8c4-47b3-8137-489889fad2cf" ], + "x-ms-unique-id": [ "135" ], + "x-ms-client-request-id": [ "7d771c26-f657-450f-9d27-4efb74dda9de" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusTopicAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzServiceBusTopicAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -307,14 +342,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11837" ], - "x-ms-request-id": [ "b773db21-1062-458f-8e88-2173b3d44a81" ], - "x-ms-correlation-request-id": [ "b773db21-1062-458f-8e88-2173b3d44a81" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134852Z:b773db21-1062-458f-8e88-2173b3d44a81" ], + "x-ms-correlation-request-id": [ "a25129cc-d4cb-4a28-9fac-9dadb8d2422f" ], + "x-ms-client-request-id": [ "7d771c26-f657-450f-9d27-4efb74dda9de_RP" ], + "x-ms-messaging-activity-id": [ "d7695474-9e7c-4b09-a0bf-2340597074b2" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:33:45" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "a25129cc-d4cb-4a28-9fac-9dadb8d2422f" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053345Z:a25129cc-d4cb-4a28-9fac-9dadb8d2422f" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:48:52 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E95DC573BDF849B287FD020693509CED Ref B: SEL221051504035 Ref C: 2024-04-30T05:33:44Z" ], + "Date": [ "Tue, 30 Apr 2024 05:33:45 GMT" ] }, "ContentHeaders": { "Content-Length": [ "87" ], @@ -325,19 +365,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedTopic+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules?api-version=2022-10-01-preview+3": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedTopic+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "178" ], - "x-ms-client-request-id": [ "aba086e4-9565-4eb6-a72c-2c9d3a893bde" ], + "x-ms-unique-id": [ "136" ], + "x-ms-client-request-id": [ "ea7b18a8-087b-475e-8814-bb23eca1e02a" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusTopicAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusTopicAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -348,37 +388,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11836" ], - "x-ms-request-id": [ "53f18b05-0009-434e-8029-bba9ef844134" ], - "x-ms-correlation-request-id": [ "53f18b05-0009-434e-8029-bba9ef844134" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134853Z:53f18b05-0009-434e-8029-bba9ef844134" ], + "x-ms-correlation-request-id": [ "1a4f9eab-2f9f-421b-958d-64e31bc03463" ], + "x-ms-client-request-id": [ "ea7b18a8-087b-475e-8814-bb23eca1e02a_RP" ], + "x-ms-messaging-activity-id": [ "c293b5d7-86c2-434c-9896-05d5d9134270" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:33:47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "1a4f9eab-2f9f-421b-958d-64e31bc03463" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053347Z:1a4f9eab-2f9f-421b-958d-64e31bc03463" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:48:52 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 000DB83BC7774CD4B70472E427E2EC3E Ref B: SEL221051504035 Ref C: 2024-04-30T05:33:45Z" ], + "Date": [ "Tue, 30 Apr 2024 05:33:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "747" ], + "Content-Length": [ "751" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule2\",\"name\":\"topicAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule2\",\"name\":\"topicAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedQueue+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule3?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedQueue+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule3?api-version=2022-10-01-preview+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule3?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "179" ], - "x-ms-client-request-id": [ "91d011e6-c550-4bff-9130-f8beb5013a30" ], + "x-ms-unique-id": [ "137" ], + "x-ms-client-request-id": [ "b07d7834-a985-43e3-82c1-cf22739a3180" ], "CommandName": [ "Az.ServiceBus.private\\Remove-AzServiceBusQueueAuthorizationRule_Delete" ], "FullCommandName": [ "Remove-AzServiceBusQueueAuthorizationRule_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -389,14 +434,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14997" ], - "x-ms-request-id": [ "caa079a1-4810-4da3-b358-8256d5e9673e" ], - "x-ms-correlation-request-id": [ "caa079a1-4810-4da3-b358-8256d5e9673e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134854Z:caa079a1-4810-4da3-b358-8256d5e9673e" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000006996" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000006996" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000006996" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:33:50" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "1a857efc-6440-44a0-a43e-541ecc3eb728" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053350Z:1a857efc-6440-44a0-a43e-541ecc3eb728" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:48:53 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0805252707D54D1B94A20F8CD7450B9D Ref B: SEL221051504035 Ref C: 2024-04-30T05:33:47Z" ], + "Date": [ "Tue, 30 Apr 2024 05:33:49 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -406,19 +456,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedQueue+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule3?api-version=2022-10-01-preview+2": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedQueue+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule3?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule3?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "180" ], - "x-ms-client-request-id": [ "74c710c3-e5ee-45a3-a06d-96c8a997d7a3" ], + "x-ms-unique-id": [ "138" ], + "x-ms-client-request-id": [ "f4adba35-2dca-4a62-a47a-9efba80d9dde" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusQueueAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzServiceBusQueueAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -429,14 +479,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11835" ], - "x-ms-request-id": [ "3dc11f30-2f70-4fa9-951c-d344ce953b3a" ], - "x-ms-correlation-request-id": [ "3dc11f30-2f70-4fa9-951c-d344ce953b3a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134855Z:3dc11f30-2f70-4fa9-951c-d344ce953b3a" ], + "x-ms-correlation-request-id": [ "9b9aa842-4e0c-4cd4-acc1-10778fd4ef8d" ], + "x-ms-client-request-id": [ "f4adba35-2dca-4a62-a47a-9efba80d9dde_RP" ], + "x-ms-messaging-activity-id": [ "a0f1d7b6-af2a-413a-82e1-a6fea2eb78c5" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:33:52" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "9b9aa842-4e0c-4cd4-acc1-10778fd4ef8d" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T053352Z:9b9aa842-4e0c-4cd4-acc1-10778fd4ef8d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:48:54 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E0C37CF91F3442B3878E0E5B9E17018D Ref B: SEL221051504035 Ref C: 2024-04-30T05:33:50Z" ], + "Date": [ "Tue, 30 Apr 2024 05:33:51 GMT" ] }, "ContentHeaders": { "Content-Length": [ "87" ], @@ -447,19 +502,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedQueue+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules?api-version=2022-10-01-preview+3": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveExpandedQueue+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "181" ], - "x-ms-client-request-id": [ "c1561b41-27e2-485d-962c-f7b1abeed47f" ], + "x-ms-unique-id": [ "139" ], + "x-ms-client-request-id": [ "9c3b9ed0-7722-4cdc-9af2-0b57e88a794b" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusQueueAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusQueueAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -470,37 +525,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11834" ], - "x-ms-request-id": [ "e93716d6-3342-40c5-a0b9-edc5713c2d52" ], - "x-ms-correlation-request-id": [ "e93716d6-3342-40c5-a0b9-edc5713c2d52" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134856Z:e93716d6-3342-40c5-a0b9-edc5713c2d52" ], + "x-ms-correlation-request-id": [ "4a14a9a4-55a4-45be-bbc7-3e50eb042c5b" ], + "x-ms-client-request-id": [ "9c3b9ed0-7722-4cdc-9af2-0b57e88a794b_RP" ], + "x-ms-messaging-activity-id": [ "6fdb7370-31f5-465c-93eb-4c9888ea9558" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T05:33:54" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "4a14a9a4-55a4-45be-bbc7-3e50eb042c5b" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053354Z:4a14a9a4-55a4-45be-bbc7-3e50eb042c5b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:48:55 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DBAB76871EDB4B5BA58F533A664FAAF9 Ref B: SEL221051504035 Ref C: 2024-04-30T05:33:52Z" ], + "Date": [ "Tue, 30 Apr 2024 05:33:53 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "763" ], + "Content-Length": [ "767" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule2\",\"name\":\"queueAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule2\",\"name\":\"queueAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule2?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule2?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "182" ], - "x-ms-client-request-id": [ "c8a6d678-4363-4687-a174-e737539f0e95" ], + "x-ms-unique-id": [ "140" ], + "x-ms-client-request-id": [ "341c7d4b-ebe2-47a3-b710-72d077e40ff7" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzServiceBusNamespaceAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -511,37 +571,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11833" ], - "x-ms-request-id": [ "1f5046fa-0b31-4b23-9558-5c7b08f16ce6" ], - "x-ms-correlation-request-id": [ "1f5046fa-0b31-4b23-9558-5c7b08f16ce6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134857Z:1f5046fa-0b31-4b23-9558-5c7b08f16ce6" ], + "x-ms-correlation-request-id": [ "313a2ae6-a90e-41d8-867b-f446ed61ee63" ], + "x-ms-client-request-id": [ "341c7d4b-ebe2-47a3-b710-72d077e40ff7_RP" ], + "x-ms-messaging-activity-id": [ "15bf9675-d92c-4fb5-948a-5ce182035156" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T05:33:56" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "313a2ae6-a90e-41d8-867b-f446ed61ee63" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053356Z:313a2ae6-a90e-41d8-867b-f446ed61ee63" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:48:56 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 543FD0A0AC1D43FDB1706F3E3EFD244A Ref B: SEL221051504035 Ref C: 2024-04-30T05:33:54Z" ], + "Date": [ "Tue, 30 Apr 2024 05:33:55 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "344" ], + "Content-Length": [ "346" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule2\",\"name\":\"namespaceAuthRule2\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule2\",\"name\":\"namespaceAuthRule2\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}", "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule2?api-version=2022-10-01-preview+2": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule2?api-version=2022-10-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "183" ], - "x-ms-client-request-id": [ "66c94cb8-f694-4dcf-884c-3224f4793a0a" ], + "x-ms-unique-id": [ "141" ], + "x-ms-client-request-id": [ "583446e3-89c3-431a-83c1-08810f73aeac" ], "CommandName": [ "Az.ServiceBus.private\\Remove-AzServiceBusNamespaceAuthorizationRule_DeleteViaIdentity" ], "FullCommandName": [ "Remove-AzServiceBusNamespaceAuthorizationRule_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -552,14 +617,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14996" ], - "x-ms-request-id": [ "2160726a-067d-4240-9642-511dc2d54aa8" ], - "x-ms-correlation-request-id": [ "2160726a-067d-4240-9642-511dc2d54aa8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134903Z:2160726a-067d-4240-9642-511dc2d54aa8" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005436" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005436" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005436" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:34:03" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "f6d313c6-7555-4c21-9f4f-bb55ac1e130b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053406Z:f6d313c6-7555-4c21-9f4f-bb55ac1e130b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:49:02 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CEB7ACFE49FD40D293F94ADA0086B4F6 Ref B: SEL221051504035 Ref C: 2024-04-30T05:33:56Z" ], + "Date": [ "Tue, 30 Apr 2024 05:34:06 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -569,19 +639,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule2?api-version=2022-10-01-preview+3": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule2?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "184" ], - "x-ms-client-request-id": [ "cea6c880-66c1-418e-8bdf-99d116a5a474" ], + "x-ms-unique-id": [ "142" ], + "x-ms-client-request-id": [ "0c2744b2-86cb-42cf-897a-b95eee07270c" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceAuthorizationRule_GetViaIdentity" ], "FullCommandName": [ "Get-AzServiceBusNamespaceAuthorizationRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -592,14 +662,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11832" ], - "x-ms-request-id": [ "c966d156-d244-4ae1-949b-868840f8c169" ], - "x-ms-correlation-request-id": [ "c966d156-d244-4ae1-949b-868840f8c169" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134904Z:c966d156-d244-4ae1-949b-868840f8c169" ], + "x-ms-correlation-request-id": [ "a5cf2a9e-5108-4dbc-8bb8-7351cced7582" ], + "x-ms-client-request-id": [ "0c2744b2-86cb-42cf-897a-b95eee07270c_RP" ], + "x-ms-messaging-activity-id": [ "52186788-a5ab-4dd1-96dd-b8f4b091e2ef" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:34:08" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "a5cf2a9e-5108-4dbc-8bb8-7351cced7582" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053408Z:a5cf2a9e-5108-4dbc-8bb8-7351cced7582" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:49:04 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7637DA59F9DB43728DE560EC9221FA90 Ref B: SEL221051504035 Ref C: 2024-04-30T05:34:06Z" ], + "Date": [ "Tue, 30 Apr 2024 05:34:08 GMT" ] }, "ContentHeaders": { "Content-Length": [ "87" ], @@ -610,19 +685,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules?api-version=2022-10-01-preview+4": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "185" ], - "x-ms-client-request-id": [ "d95759fb-a009-4e49-bd44-a3ce8fe2156a" ], + "x-ms-unique-id": [ "143" ], + "x-ms-client-request-id": [ "df936940-27e4-4a90-9478-86a52b9ba7d3" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusNamespaceAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -633,37 +708,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11831" ], - "x-ms-request-id": [ "b9b20e9d-1db0-4e01-91f3-816a07ce957e" ], - "x-ms-correlation-request-id": [ "b9b20e9d-1db0-4e01-91f3-816a07ce957e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134905Z:b9b20e9d-1db0-4e01-91f3-816a07ce957e" ], + "x-ms-correlation-request-id": [ "1a2e59ee-e0f8-4b4f-b511-a089859c266e" ], + "x-ms-client-request-id": [ "df936940-27e4-4a90-9478-86a52b9ba7d3_RP" ], + "x-ms-messaging-activity-id": [ "81856cf0-0524-43f9-bb10-f472db7e3ffe" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T05:34:10" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "1a2e59ee-e0f8-4b4f-b511-a089859c266e" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053410Z:1a2e59ee-e0f8-4b4f-b511-a089859c266e" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:49:04 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A4BBE32FE22E467D8DE088B1337051EC Ref B: SEL221051504035 Ref C: 2024-04-30T05:34:08Z" ], + "Date": [ "Tue, 30 Apr 2024 05:34:09 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "751" ], + "Content-Length": [ "755" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule2?api-version=2022-10-01-preview+5": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule2?api-version=2022-10-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "186" ], - "x-ms-client-request-id": [ "259388c0-3bef-4369-b0c2-5a1d4d9428c2" ], + "x-ms-unique-id": [ "144" ], + "x-ms-client-request-id": [ "0d51b765-ecbe-48e9-a096-78f952bff87b" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusQueueAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzServiceBusQueueAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -674,37 +754,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11830" ], - "x-ms-request-id": [ "3d635ecc-c5e1-41ab-8b99-70d21427f739" ], - "x-ms-correlation-request-id": [ "3d635ecc-c5e1-41ab-8b99-70d21427f739" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134906Z:3d635ecc-c5e1-41ab-8b99-70d21427f739" ], + "x-ms-correlation-request-id": [ "d2e62a03-2942-4a2c-b24e-77d9ff2b76c1" ], + "x-ms-client-request-id": [ "0d51b765-ecbe-48e9-a096-78f952bff87b_RP" ], + "x-ms-messaging-activity-id": [ "ba58b8be-7f22-43ae-b48a-674da0e02b11" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:34:12" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "d2e62a03-2942-4a2c-b24e-77d9ff2b76c1" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053412Z:d2e62a03-2942-4a2c-b24e-77d9ff2b76c1" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:49:05 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 74797E414475411A8BF627F030A0A91F Ref B: SEL221051504035 Ref C: 2024-04-30T05:34:10Z" ], + "Date": [ "Tue, 30 Apr 2024 05:34:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "375" ], + "Content-Length": [ "377" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule2\",\"name\":\"queueAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule2\",\"name\":\"queueAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule2?api-version=2022-10-01-preview+6": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule2?api-version=2022-10-01-preview+6": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "187" ], - "x-ms-client-request-id": [ "5bf20a85-a47b-40c2-af04-36c1aede4899" ], + "x-ms-unique-id": [ "145" ], + "x-ms-client-request-id": [ "53e020be-9cf7-4607-8fc1-f57d0594803d" ], "CommandName": [ "Az.ServiceBus.private\\Remove-AzServiceBusQueueAuthorizationRule_DeleteViaIdentity" ], "FullCommandName": [ "Remove-AzServiceBusQueueAuthorizationRule_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -715,14 +800,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14995" ], - "x-ms-request-id": [ "3749c98f-7c6f-46e4-aaba-b35ebd8f20b9" ], - "x-ms-correlation-request-id": [ "3749c98f-7c6f-46e4-aaba-b35ebd8f20b9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134907Z:3749c98f-7c6f-46e4-aaba-b35ebd8f20b9" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:34:14" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "1e8809e0-6a13-4e38-86d3-bb43da63cd29" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053414Z:1e8809e0-6a13-4e38-86d3-bb43da63cd29" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:49:06 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 25E08C5055DD40C99AF8C174FA43EE7F Ref B: SEL221051504035 Ref C: 2024-04-30T05:34:12Z" ], + "Date": [ "Tue, 30 Apr 2024 05:34:14 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -732,19 +822,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule2?api-version=2022-10-01-preview+7": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule2?api-version=2022-10-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "188" ], - "x-ms-client-request-id": [ "fa35010e-140d-44c2-8414-9a1cd227f652" ], + "x-ms-unique-id": [ "146" ], + "x-ms-client-request-id": [ "a2b60bf6-1d16-40f7-b02c-378f5b6b0ffe" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusQueueAuthorizationRule_GetViaIdentity" ], "FullCommandName": [ "Get-AzServiceBusQueueAuthorizationRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -755,14 +845,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11829" ], - "x-ms-request-id": [ "d016fb70-b411-4115-bcc2-f8f0f9390bd3" ], - "x-ms-correlation-request-id": [ "d016fb70-b411-4115-bcc2-f8f0f9390bd3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134907Z:d016fb70-b411-4115-bcc2-f8f0f9390bd3" ], + "x-ms-correlation-request-id": [ "ede3f1e3-17ec-4dbf-b685-d20718fa0cb7" ], + "x-ms-client-request-id": [ "a2b60bf6-1d16-40f7-b02c-378f5b6b0ffe_RP" ], + "x-ms-messaging-activity-id": [ "502e6080-8fff-4000-90a6-ae789db4bb23" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:34:16" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "ede3f1e3-17ec-4dbf-b685-d20718fa0cb7" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053416Z:ede3f1e3-17ec-4dbf-b685-d20718fa0cb7" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:49:07 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F16D551D11134B7E82B0461C07500E69 Ref B: SEL221051504035 Ref C: 2024-04-30T05:34:14Z" ], + "Date": [ "Tue, 30 Apr 2024 05:34:16 GMT" ] }, "ContentHeaders": { "Content-Length": [ "87" ], @@ -773,19 +868,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules?api-version=2022-10-01-preview+8": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules?api-version=2022-10-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "189" ], - "x-ms-client-request-id": [ "19922032-0957-4cd3-a4bc-89156dc86c55" ], + "x-ms-unique-id": [ "147" ], + "x-ms-client-request-id": [ "02736173-3c0d-4e1b-9002-447776bd75cd" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusQueueAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusQueueAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -796,37 +891,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11828" ], - "x-ms-request-id": [ "727cdb98-b6e8-46d1-bb1a-e35c011692ad" ], - "x-ms-correlation-request-id": [ "727cdb98-b6e8-46d1-bb1a-e35c011692ad" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134908Z:727cdb98-b6e8-46d1-bb1a-e35c011692ad" ], + "x-ms-correlation-request-id": [ "ccda57f4-1ab8-49ad-9e30-a362c1aacafc" ], + "x-ms-client-request-id": [ "02736173-3c0d-4e1b-9002-447776bd75cd_RP" ], + "x-ms-messaging-activity-id": [ "ff78fac8-71ea-4982-be2f-6f1ae4e2a745" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:34:18" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "ccda57f4-1ab8-49ad-9e30-a362c1aacafc" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053418Z:ccda57f4-1ab8-49ad-9e30-a362c1aacafc" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:49:07 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7B5BB25895794008A921948866757E26 Ref B: SEL221051504035 Ref C: 2024-04-30T05:34:16Z" ], + "Date": [ "Tue, 30 Apr 2024 05:34:17 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "387" ], + "Content-Length": [ "389" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule2?api-version=2022-10-01-preview+9": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule2?api-version=2022-10-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "190" ], - "x-ms-client-request-id": [ "93912262-1660-48bd-b277-a01e1c743566" ], + "x-ms-unique-id": [ "148" ], + "x-ms-client-request-id": [ "55f24ba3-f1e6-4b6b-9aac-40aa1794813f" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusTopicAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzServiceBusTopicAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -837,37 +937,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11827" ], - "x-ms-request-id": [ "a2e5c07a-6e32-41db-aea2-e2530e79fb75" ], - "x-ms-correlation-request-id": [ "a2e5c07a-6e32-41db-aea2-e2530e79fb75" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134909Z:a2e5c07a-6e32-41db-aea2-e2530e79fb75" ], + "x-ms-correlation-request-id": [ "187e46f6-1844-4e78-a984-72a597bba1b0" ], + "x-ms-client-request-id": [ "55f24ba3-f1e6-4b6b-9aac-40aa1794813f_RP" ], + "x-ms-messaging-activity-id": [ "6b7232b0-2be7-4da4-8b32-59a648612728" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T05:34:20" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "187e46f6-1844-4e78-a984-72a597bba1b0" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T053420Z:187e46f6-1844-4e78-a984-72a597bba1b0" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:49:08 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 32CCCE4B6F4E49A6900A704263086B3D Ref B: SEL221051504035 Ref C: 2024-04-30T05:34:18Z" ], + "Date": [ "Tue, 30 Apr 2024 05:34:19 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "359" ], + "Content-Length": [ "361" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule2\",\"name\":\"topicAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule2\",\"name\":\"topicAuthRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}}", "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule2?api-version=2022-10-01-preview+10": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule2?api-version=2022-10-01-preview+10": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "191" ], - "x-ms-client-request-id": [ "f615fcd0-2f52-4e34-b2c6-10f78f4aeacf" ], + "x-ms-unique-id": [ "149" ], + "x-ms-client-request-id": [ "8e4ba61d-6469-47c3-a120-46609eb0b64f" ], "CommandName": [ "Az.ServiceBus.private\\Remove-AzServiceBusTopicAuthorizationRule_DeleteViaIdentity" ], "FullCommandName": [ "Remove-AzServiceBusTopicAuthorizationRule_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -878,14 +983,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14994" ], - "x-ms-request-id": [ "dc302428-b13c-4afd-8877-4d5d24401307" ], - "x-ms-correlation-request-id": [ "dc302428-b13c-4afd-8877-4d5d24401307" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134910Z:dc302428-b13c-4afd-8877-4d5d24401307" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000006248" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000006248" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000006248" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:34:22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "08e7ea7a-a66c-4e67-b9b3-7cc45f5797f7" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T053422Z:08e7ea7a-a66c-4e67-b9b3-7cc45f5797f7" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:49:09 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 327E4F4F0884481EB22F60D1C00BA94F Ref B: SEL221051504035 Ref C: 2024-04-30T05:34:20Z" ], + "Date": [ "Tue, 30 Apr 2024 05:34:22 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -895,19 +1005,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule2?api-version=2022-10-01-preview+11": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule2?api-version=2022-10-01-preview+11": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "192" ], - "x-ms-client-request-id": [ "e06fbc74-0b97-4320-8516-576030c5c478" ], + "x-ms-unique-id": [ "150" ], + "x-ms-client-request-id": [ "868b4b4b-cc4c-4571-b53a-08c60100fd18" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusTopicAuthorizationRule_GetViaIdentity" ], "FullCommandName": [ "Get-AzServiceBusTopicAuthorizationRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -918,14 +1028,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11826" ], - "x-ms-request-id": [ "46bd678a-1a95-435a-9fbf-a9ee7cc4b2ca" ], - "x-ms-correlation-request-id": [ "46bd678a-1a95-435a-9fbf-a9ee7cc4b2ca" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134910Z:46bd678a-1a95-435a-9fbf-a9ee7cc4b2ca" ], + "x-ms-correlation-request-id": [ "6b6c3ad8-d652-474f-ab7d-ab769b60abba" ], + "x-ms-client-request-id": [ "868b4b4b-cc4c-4571-b53a-08c60100fd18_RP" ], + "x-ms-messaging-activity-id": [ "d3341ae4-6f30-409a-bae3-9f6d1a2356c6" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:34:24" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "6b6c3ad8-d652-474f-ab7d-ab769b60abba" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053424Z:6b6c3ad8-d652-474f-ab7d-ab769b60abba" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:49:09 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C829D714CE6E4F41884497B26927B8BE Ref B: SEL221051504035 Ref C: 2024-04-30T05:34:22Z" ], + "Date": [ "Tue, 30 Apr 2024 05:34:24 GMT" ] }, "ContentHeaders": { "Content-Length": [ "87" ], @@ -936,19 +1051,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules?api-version=2022-10-01-preview+12": { + "Remove-AzServiceBusAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules?api-version=2022-10-01-preview+12": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "193" ], - "x-ms-client-request-id": [ "63022bf3-eaf8-4d38-a388-b19bfdd2f103" ], + "x-ms-unique-id": [ "151" ], + "x-ms-client-request-id": [ "aaa312f7-ad06-4164-a549-50de1f1976cb" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusTopicAuthorizationRule_List" ], "FullCommandName": [ "Get-AzServiceBusTopicAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -959,21 +1074,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11825" ], - "x-ms-request-id": [ "4f988b2b-5d45-4997-adfc-00327bfe52ff" ], - "x-ms-correlation-request-id": [ "4f988b2b-5d45-4997-adfc-00327bfe52ff" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T134911Z:4f988b2b-5d45-4997-adfc-00327bfe52ff" ], + "x-ms-correlation-request-id": [ "163b516f-5af6-4bb4-9f9e-5bfec8c48ac8" ], + "x-ms-client-request-id": [ "aaa312f7-ad06-4164-a549-50de1f1976cb_RP" ], + "x-ms-messaging-activity-id": [ "188473a4-d0fa-4e37-ade5-9d0fc1388133" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T05:34:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "163b516f-5af6-4bb4-9f9e-5bfec8c48ac8" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053425Z:163b516f-5af6-4bb4-9f9e-5bfec8c48ac8" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:49:10 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 95D57A732E064684A22A1181C6F5AEB5 Ref B: SEL221051504035 Ref C: 2024-04-30T05:34:24Z" ], + "Date": [ "Tue, 30 Apr 2024 05:34:24 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "387" ], + "Content-Length": [ "389" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusAuthorizationRule.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusAuthorizationRule.Tests.ps1 index d3792b9d7140..42a2909fe416 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusAuthorizationRule.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusAuthorizationRule.Tests.ps1 @@ -25,21 +25,21 @@ Describe 'Remove-AzServiceBusAuthorizationRule' { It 'RemoveExpandedNamespace' { Remove-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name namespaceAuthRule3 - { Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name namespaceAuthRule3 } | Should -Throw + { Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name namespaceAuthRule3 -ErrorAction Stop } | Should -Throw $namespaceAuthRules = Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace $namespaceAuthRules.Count | Should -Be 3 } It 'RemoveExpandedTopic' { Remove-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 -Name topicAuthRule3 - { Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 -Name topicAuthRule3 } | Should -Throw + { Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 -Name topicAuthRule3 -ErrorAction Stop } | Should -Throw $topicAuthRules = Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 $topicAuthRules.Count | Should -Be 2 } It 'RemoveExpandedQueue' { Remove-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -QueueName queue1 -Name queueAuthRule3 - { Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -QueueName queue1 -Name queueAuthRule3 } | Should -Throw + { Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -QueueName queue1 -Name queueAuthRule3 -ErrorAction Stop } | Should -Throw $queueAuthRules = Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -QueueName queue1 $queueAuthRules.Count | Should -Be 2 } @@ -47,19 +47,19 @@ Describe 'Remove-AzServiceBusAuthorizationRule' { It 'RemoveViaIdentityExpanded' { $authRule = Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name namespaceAuthRule2 Remove-AzServiceBusAuthorizationRule -InputObject $authRule - { Get-AzServiceBusAuthorizationRule -InputObject $authRule } | Should -Throw + { Get-AzServiceBusAuthorizationRule -InputObject $authRule -ErrorAction Stop } | Should -Throw $namespaceAuthRules = Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace $namespaceAuthRules.Count | Should -Be 2 $authRule = Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -QueueName queue1 -Name queueAuthRule2 Remove-AzServiceBusAuthorizationRule -InputObject $authRule - { Get-AzServiceBusAuthorizationRule -InputObject $authRule } | Should -Throw + { Get-AzServiceBusAuthorizationRule -InputObject $authRule -ErrorAction Stop } | Should -Throw $queueAuthRules = Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -QueueName queue1 $queueAuthRules.Count | Should -Be 1 $authRule = Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 -Name topicAuthRule2 Remove-AzServiceBusAuthorizationRule -InputObject $authRule - { Get-AzServiceBusAuthorizationRule -InputObject $authRule } | Should -Throw + { Get-AzServiceBusAuthorizationRule -InputObject $authRule -ErrorAction Stop } | Should -Throw $topicAuthRules = Get-AzServiceBusAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 $topicAuthRules.Count | Should -Be 1 } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusNamespaceV2.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusNamespaceV2.Recording.json index 5c0c10e10839..82d928439a32 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusNamespaceV2.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusNamespaceV2.Recording.json @@ -1,8 +1,8 @@ { - "Remove-AzServiceBusNamespaceV2+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV7qbxiho?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusNamespaceV2+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV7i84pmj?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV7qbxiho?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV7i84pmj?api-version=2022-10-01-preview", "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n }\n}", "isContentBase64": false, "Headers": { @@ -13,85 +13,47 @@ } }, "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e46efbbe-edf8-4b46-b42f-a2964bea79aa_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1175" ], - "x-ms-correlation-request-id": [ "95d4a6c5-8ada-4efd-a41a-2a8830d799d9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135004Z:95d4a6c5-8ada-4efd-a41a-2a8830d799d9" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:50:03 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "732" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV7qbxiho\",\"name\":\"namespaceV7qbxiho\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7qbxiho\",\"createdAt\":\"2023-02-19T13:50:02.843Z\",\"updatedAt\":\"2023-02-19T13:50:02.843Z\",\"serviceBusEndpoint\":\"https://namespaceV7qbxiho.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Remove-AzServiceBusNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV7qbxiho?api-version=2022-10-01-preview+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV7qbxiho?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "195" ], - "x-ms-client-request-id": [ "93e181b9-1cbc-4ef6-87e3-57c72e651051" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "bdd67e5c-8e75-408e-9482-55c627801e14_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11824" ], - "x-ms-correlation-request-id": [ "0a75f994-48ae-4282-9096-e82540a9b523" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135034Z:0a75f994-48ae-4282-9096-e82540a9b523" ], + "x-ms-correlation-request-id": [ "e09a8707-ce4e-49ad-a443-28f22a61e155" ], + "x-ms-client-request-id": [ "1bef43ee-be3f-4e94-8b5a-735bfa72052b_RP" ], + "x-ms-messaging-activity-id": [ "09daa692-81db-4250-af17-242d8983fa25" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:35:31" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "e09a8707-ce4e-49ad-a443-28f22a61e155" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053531Z:e09a8707-ce4e-49ad-a443-28f22a61e155" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:50:33 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0D3BE6B0D2434958B9B3B251F868F3A5 Ref B: SEL221051504035 Ref C: 2024-04-30T05:35:27Z" ], + "Date": [ "Tue, 30 Apr 2024 05:35:31 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "732" ], + "Content-Length": [ "740" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV7qbxiho\",\"name\":\"namespaceV7qbxiho\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7qbxiho\",\"createdAt\":\"2023-02-19T13:50:02.843Z\",\"updatedAt\":\"2023-02-19T13:50:02.843Z\",\"serviceBusEndpoint\":\"https://namespaceV7qbxiho.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV7i84pmj\",\"name\":\"namespaceV7i84pmj\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7i84pmj\",\"serviceBusEndpoint\":\"https://namespaceV7i84pmj.servicebus.windows.net:443/\",\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-30T05:35:31.2823552Z\",\"updatedAt\":\"2024-04-30T05:35:31.2823552Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Remove-AzServiceBusNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV7qbxiho?api-version=2022-10-01-preview+3": { + "Remove-AzServiceBusNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV7i84pmj?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV7qbxiho?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV7i84pmj?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "196" ], - "x-ms-client-request-id": [ "93e181b9-1cbc-4ef6-87e3-57c72e651051" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "153" ], + "x-ms-client-request-id": [ "1bef43ee-be3f-4e94-8b5a-735bfa72052b" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -101,39 +63,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "35420909-72ce-4152-a0b4-f72e0cd01a63_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11823" ], - "x-ms-correlation-request-id": [ "4b2cde04-f375-4873-9072-d5a7fc2af655" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135105Z:4b2cde04-f375-4873-9072-d5a7fc2af655" ], + "x-ms-correlation-request-id": [ "ff27ef6c-eb02-4ba0-a8e4-ec09bea9a9c9" ], + "x-ms-client-request-id": [ "1bef43ee-be3f-4e94-8b5a-735bfa72052b_RP" ], + "x-ms-messaging-activity-id": [ "3ea7f659-08b1-4642-a720-6bab93b2064a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T05:36:03" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "ff27ef6c-eb02-4ba0-a8e4-ec09bea9a9c9" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053603Z:ff27ef6c-eb02-4ba0-a8e4-ec09bea9a9c9" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:51:04 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9153B68A226A4D17BD5D38830D92B721 Ref B: SEL221051504035 Ref C: 2024-04-30T05:36:01Z" ], + "Date": [ "Tue, 30 Apr 2024 05:36:02 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "730" ], + "Content-Length": [ "771" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV7qbxiho\",\"name\":\"namespaceV7qbxiho\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7qbxiho\",\"createdAt\":\"2023-02-19T13:50:02.843Z\",\"updatedAt\":\"2023-02-19T13:50:47.233Z\",\"serviceBusEndpoint\":\"https://namespaceV7qbxiho.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV7i84pmj\",\"name\":\"namespaceV7i84pmj\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7i84pmj\",\"serviceBusEndpoint\":\"https://namespaceV7i84pmj.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:35:31.2823552Z\",\"updatedAt\":\"2024-04-30T05:35:34.2042857Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Remove-AzServiceBusNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV7qbxiho?api-version=2022-10-01-preview+4": { + "Remove-AzServiceBusNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV7i84pmj?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV7qbxiho?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV7i84pmj?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "197" ], - "x-ms-client-request-id": [ "93e181b9-1cbc-4ef6-87e3-57c72e651051" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "154" ], + "x-ms-client-request-id": [ "1bef43ee-be3f-4e94-8b5a-735bfa72052b" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -143,38 +109,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "74dd5778-87cd-4dda-8123-50437b76a861_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11822" ], - "x-ms-correlation-request-id": [ "fdeb4dfe-d8d3-4612-b75c-b8d4c4155fe8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135106Z:fdeb4dfe-d8d3-4612-b75c-b8d4c4155fe8" ], + "x-ms-correlation-request-id": [ "f3a724a3-01fa-46c7-9140-03eb6dc57226" ], + "x-ms-client-request-id": [ "1bef43ee-be3f-4e94-8b5a-735bfa72052b_RP" ], + "x-ms-messaging-activity-id": [ "bfd6e0b8-6b37-4f86-a6b1-b34897fe9229" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:36:04" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "f3a724a3-01fa-46c7-9140-03eb6dc57226" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053604Z:f3a724a3-01fa-46c7-9140-03eb6dc57226" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:51:05 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 238396956B4C44EDBA7FA0D71386D840 Ref B: SEL221051504035 Ref C: 2024-04-30T05:36:03Z" ], + "Date": [ "Tue, 30 Apr 2024 05:36:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "730" ], + "Content-Length": [ "771" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV7qbxiho\",\"name\":\"namespaceV7qbxiho\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7qbxiho\",\"createdAt\":\"2023-02-19T13:50:02.843Z\",\"updatedAt\":\"2023-02-19T13:50:47.233Z\",\"serviceBusEndpoint\":\"https://namespaceV7qbxiho.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV7i84pmj\",\"name\":\"namespaceV7i84pmj\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7i84pmj\",\"serviceBusEndpoint\":\"https://namespaceV7i84pmj.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:35:31.2823552Z\",\"updatedAt\":\"2024-04-30T05:35:34.2042857Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Remove-AzServiceBusNamespaceV2+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV7qbxiho?api-version=2022-10-01-preview+5": { + "Remove-AzServiceBusNamespaceV2+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV7i84pmj?api-version=2022-10-01-preview+4": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV7qbxiho?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV7i84pmj?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "198" ], - "x-ms-client-request-id": [ "f4e5cb86-c7c7-4eca-a52b-1dc654fddc00" ], + "x-ms-unique-id": [ "155" ], + "x-ms-client-request-id": [ "2e1695d6-7d68-4546-a655-a6639c157ed3" ], "CommandName": [ "Remove-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Remove-AzServiceBusNamespaceV2_Delete" ], + "FullCommandName": [ "Remove-AzServiceBusNamespace_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -185,16 +155,20 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/locations/eastus/operationStatus/namespaceV7qbxiho?api-version=2022-10-01-preview\u0026resourceType=Namespace" ], - "x-ms-request-id": [ "a1be07be-174d-4ab5-8770-bcfad4795a36_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14993" ], - "x-ms-correlation-request-id": [ "9ef66183-42f1-4e05-aba0-04f080678e23" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135107Z:9ef66183-42f1-4e05-aba0-04f080678e23" ], + "Location": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/locations/eastus/namespaceOperationResults/0ee42b96-0f81-4386-8ec9-09d995db38c5?isAsyncHeader=false\u0026resourceName=namespaceV7i84pmj\u0026resourceType=namespace\u0026api-version=2022-10-01-preview\u0026operationType=Deleted\u0026t=638500521670230469\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=SsfSGHzTGYAmy5_aIS3XH_H4fpBG8tr46dFJV8VLSzWExFU0dDhhxz_AX1c-RrlzxQPobdMFomnybikU4x9W0m7oA2BlARbQcOlU9Txg9aZn8jPaufQlfnusUmr-86fCuoGp-Dh9yBH98w5_7u5ZwprUFo0Jr7_kTiJs2lN6AwfKiwhmGMuckln9DEV7F2rzGHqGe1eTSgKSaP5482QrEpCSiGaQBUFxi5myKM9O31QV45Dg0rpacMvB9NelWgzLJmN5KAMK1x5Zh1dKkCiPvweVGAp1X8gXOB2891hofOaoIncwukT_n0LW-S3asRMCjLa-RwmqoE9O_lp3UCSftw\u0026h=hf9pJZX38gw-1p3HWgjO-_YKzyQY85qvvOIwjLwF9wk" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005660" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005660" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005660" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T05:36:06" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "3ba1fc87-804b-4839-a385-cbdc7156143d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053607Z:3ba1fc87-804b-4839-a385-cbdc7156143d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:51:06 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 73BF63CB9C334339832C9DACEB66AAF9 Ref B: SEL221051504035 Ref C: 2024-04-30T05:36:05Z" ], + "Date": [ "Tue, 30 Apr 2024 05:36:06 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -204,20 +178,20 @@ "isContentBase64": false } }, - "Remove-AzServiceBusNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/locations/eastus/operationStatus/namespaceV7qbxiho?api-version=2022-10-01-preview\u0026resourceType=Namespace+6": { + "Remove-AzServiceBusNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/locations/eastus/namespaceOperationResults/0ee42b96-0f81-4386-8ec9-09d995db38c5?isAsyncHeader=false\u0026resourceName=namespaceV7i84pmj\u0026resourceType=namespace\u0026api-version=2022-10-01-preview\u0026operationType=Deleted\u0026t=638500521670230469\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=SsfSGHzTGYAmy5_aIS3XH_H4fpBG8tr46dFJV8VLSzWExFU0dDhhxz_AX1c-RrlzxQPobdMFomnybikU4x9W0m7oA2BlARbQcOlU9Txg9aZn8jPaufQlfnusUmr-86fCuoGp-Dh9yBH98w5_7u5ZwprUFo0Jr7_kTiJs2lN6AwfKiwhmGMuckln9DEV7F2rzGHqGe1eTSgKSaP5482QrEpCSiGaQBUFxi5myKM9O31QV45Dg0rpacMvB9NelWgzLJmN5KAMK1x5Zh1dKkCiPvweVGAp1X8gXOB2891hofOaoIncwukT_n0LW-S3asRMCjLa-RwmqoE9O_lp3UCSftw\u0026h=hf9pJZX38gw-1p3HWgjO-_YKzyQY85qvvOIwjLwF9wk+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/locations/eastus/operationStatus/namespaceV7qbxiho?api-version=2022-10-01-preview\u0026resourceType=Namespace", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/locations/eastus/namespaceOperationResults/0ee42b96-0f81-4386-8ec9-09d995db38c5?isAsyncHeader=false\u0026resourceName=namespaceV7i84pmj\u0026resourceType=namespace\u0026api-version=2022-10-01-preview\u0026operationType=Deleted\u0026t=638500521670230469\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=SsfSGHzTGYAmy5_aIS3XH_H4fpBG8tr46dFJV8VLSzWExFU0dDhhxz_AX1c-RrlzxQPobdMFomnybikU4x9W0m7oA2BlARbQcOlU9Txg9aZn8jPaufQlfnusUmr-86fCuoGp-Dh9yBH98w5_7u5ZwprUFo0Jr7_kTiJs2lN6AwfKiwhmGMuckln9DEV7F2rzGHqGe1eTSgKSaP5482QrEpCSiGaQBUFxi5myKM9O31QV45Dg0rpacMvB9NelWgzLJmN5KAMK1x5Zh1dKkCiPvweVGAp1X8gXOB2891hofOaoIncwukT_n0LW-S3asRMCjLa-RwmqoE9O_lp3UCSftw\u0026h=hf9pJZX38gw-1p3HWgjO-_YKzyQY85qvvOIwjLwF9wk", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "199" ], - "x-ms-client-request-id": [ "f4e5cb86-c7c7-4eca-a52b-1dc654fddc00" ], + "x-ms-unique-id": [ "156" ], + "x-ms-client-request-id": [ "2e1695d6-7d68-4546-a655-a6639c157ed3" ], "CommandName": [ "Remove-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Remove-AzServiceBusNamespaceV2_Delete" ], + "FullCommandName": [ "Remove-AzServiceBusNamespace_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -227,15 +201,20 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e6621b12-c993-429f-be63-756bc05bcf50_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11821" ], - "x-ms-correlation-request-id": [ "7dfdfdb8-b76e-4679-a5a1-2046a32ae94c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135137Z:7dfdfdb8-b76e-4679-a5a1-2046a32ae94c" ], + "Location": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/locations/eastus/namespaceOperationResults/0ee42b96-0f81-4386-8ec9-09d995db38c5?isAsyncHeader=false\u0026resourceName=namespaceV7i84pmj\u0026resourceType=namespace\u0026api-version=2022-10-01-preview\u0026operationType=Deleted\u0026t=638500521986056786\u0026c=MIIHKjCCBhKgAwIBAgITHgRwbFvgB8QvXABGowAABHBsWzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNDI5MDU0OTI2WhcNMjUwNDI0MDU0OTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMI74kkH1s1fyf3u8I9NW48Al606jCyqMV0yJPFfgnXzY0ksG-iZgod2J98qesULbjiYsbXV0sHlD9QSNQU8ZIQZl4DfemNJow8QYsOz2cltqajb66-USZbxABjDvSsGKjICxWLcm-lEWkFg-GDs8LOHMiQgVivfOLn7vDT_tlU3gBy5H5UGQZJbY-elo_utlDtbzZjJPwDoybfFV_XnexkBuSK9pNVgXtOaPWgibTw2p-q5YwtHXjDet3VsWKc1qwD3IlKgLxR_nCg4CBO9Nnw6w41TJKFwDQVN070SUNKYulYf4-9KqXF5dDpB_ftcILJ2TkWDhNwtm10IQy4Lic0CAwEAAaOCBBcwggQTMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBTDbpQqaXJdBMiU7rIDX9nVdRd9VDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMEEGA1UdIAQ6MDgwDAYKKwYBBAGCN3sBATAMBgorBgEEAYI3ewIBMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKxfK_S7hJnYof2MUz_YwGYBOzg_bFpkN8fnmSQBEjC55tA8eliiZ1Y8cgSFYU-LPdEJz2KQssa1GmILoSFme62JtwI7gbHaRG0cHW8LeGSEqeRVYvguFIY17qAqJaIIDLdalEim7FRRdsARusI7yf5l3J-TrUADFhz0zQcaRdXj1tBaLqvHGQxcHxjGDL9TYGvE5QX3gMDaRP4rUEREpn5PnLZ4aKpHcO9mrypJxv7RkgkCc0NIr31WSKhZdw9PUdWvPTPnBEXNqUySJ4YGP66oGk8XPAgXkJBCoAZnTvYi8hum8Ef-2gnF4J2bTC7n-RXSGH7n1eACAZrzg8vxueM\u0026s=mUl0PwMks8NAC5KJxoI4juk7qbgTZlRoTM9NsTkqfZ1rw1RR-cAWAv4-E9dnpKEIUsnZ6n5ITiOiLfW7_71wLBV3-DDHtHcv85nr33sVExMx0f2JvqEwdqJKpxhWLQUxXmLY-8pdw6lkLfPZPTp9AqgWDAbffSOy76cpKUDVDw6acZTVpZHrLCFlUh34twJpVpYz6j1CItvBrihvRgtMvE_a3qDQgyLn2On-zGo8_HCvImGJ9M5O7JMnlmAAjw7zqfwltECsKnZBzP32X7BsWQlRXGtceiFDpKS0FdCT3YLOivg1UVlPsVhtxAcF9_1lENttZQ3ZmXUfMh4ormP0zg\u0026h=cIIGzmHkX8bfnRn3Q3ojai7bA8EVFYZElSe01HjrPSQ" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005660" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005660" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005660" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T05:36:38" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "31600366-794b-41c5-b972-23a53efd9151" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053638Z:31600366-794b-41c5-b972-23a53efd9151" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:51:37 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A4ADCF7149A347399CA704AD22D80146 Ref B: SEL221051504035 Ref C: 2024-04-30T05:36:37Z" ], + "Date": [ "Tue, 30 Apr 2024 05:36:37 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ] @@ -244,20 +223,20 @@ "isContentBase64": false } }, - "Remove-AzServiceBusNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/locations/eastus/operationStatus/namespaceV7qbxiho?api-version=2022-10-01-preview\u0026resourceType=Namespace+7": { + "Remove-AzServiceBusNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/locations/eastus/namespaceOperationResults/0ee42b96-0f81-4386-8ec9-09d995db38c5?isAsyncHeader=false\u0026resourceName=namespaceV7i84pmj\u0026resourceType=namespace\u0026api-version=2022-10-01-preview\u0026operationType=Deleted\u0026t=638500521670230469\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=SsfSGHzTGYAmy5_aIS3XH_H4fpBG8tr46dFJV8VLSzWExFU0dDhhxz_AX1c-RrlzxQPobdMFomnybikU4x9W0m7oA2BlARbQcOlU9Txg9aZn8jPaufQlfnusUmr-86fCuoGp-Dh9yBH98w5_7u5ZwprUFo0Jr7_kTiJs2lN6AwfKiwhmGMuckln9DEV7F2rzGHqGe1eTSgKSaP5482QrEpCSiGaQBUFxi5myKM9O31QV45Dg0rpacMvB9NelWgzLJmN5KAMK1x5Zh1dKkCiPvweVGAp1X8gXOB2891hofOaoIncwukT_n0LW-S3asRMCjLa-RwmqoE9O_lp3UCSftw\u0026h=hf9pJZX38gw-1p3HWgjO-_YKzyQY85qvvOIwjLwF9wk+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/locations/eastus/operationStatus/namespaceV7qbxiho?api-version=2022-10-01-preview\u0026resourceType=Namespace", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/locations/eastus/namespaceOperationResults/0ee42b96-0f81-4386-8ec9-09d995db38c5?isAsyncHeader=false\u0026resourceName=namespaceV7i84pmj\u0026resourceType=namespace\u0026api-version=2022-10-01-preview\u0026operationType=Deleted\u0026t=638500521670230469\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=SsfSGHzTGYAmy5_aIS3XH_H4fpBG8tr46dFJV8VLSzWExFU0dDhhxz_AX1c-RrlzxQPobdMFomnybikU4x9W0m7oA2BlARbQcOlU9Txg9aZn8jPaufQlfnusUmr-86fCuoGp-Dh9yBH98w5_7u5ZwprUFo0Jr7_kTiJs2lN6AwfKiwhmGMuckln9DEV7F2rzGHqGe1eTSgKSaP5482QrEpCSiGaQBUFxi5myKM9O31QV45Dg0rpacMvB9NelWgzLJmN5KAMK1x5Zh1dKkCiPvweVGAp1X8gXOB2891hofOaoIncwukT_n0LW-S3asRMCjLa-RwmqoE9O_lp3UCSftw\u0026h=hf9pJZX38gw-1p3HWgjO-_YKzyQY85qvvOIwjLwF9wk", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "200" ], - "x-ms-client-request-id": [ "f4e5cb86-c7c7-4eca-a52b-1dc654fddc00" ], + "x-ms-unique-id": [ "157" ], + "x-ms-client-request-id": [ "2e1695d6-7d68-4546-a655-a6639c157ed3" ], "CommandName": [ "Remove-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Remove-AzServiceBusNamespaceV2_Delete" ], + "FullCommandName": [ "Remove-AzServiceBusNamespace_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -267,15 +246,20 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "34eb3e09-a51e-4a2e-ab35-fd20f446f3a5_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11820" ], - "x-ms-correlation-request-id": [ "077974fe-710e-4ddc-8de2-655fd777effb" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135138Z:077974fe-710e-4ddc-8de2-655fd777effb" ], + "Location": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/locations/eastus/namespaceOperationResults/0ee42b96-0f81-4386-8ec9-09d995db38c5?isAsyncHeader=false\u0026resourceName=namespaceV7i84pmj\u0026resourceType=namespace\u0026api-version=2022-10-01-preview\u0026operationType=Deleted\u0026t=638500522001992228\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=aPXxfZCBi6BH6dcd9K4b3RZs913wdXhgRZKmJlCFmsp7K3zTxRIft1q9c_M59K0LUPNGuK4XB772VNbHoUTBy5rYdXrD5FlGQiAI2fzL_jlAhq6xc6YHqrS2_EO3PKHMkNzoMfQwULdjLJ3xJG2VaIe8ZIk4jaC43KWMoBnzEan4p_l3DaqTAQ1XbSYcpL_xgX5NouKCufFb1n0q-t3YmETSENCBtBacniG3xb8Nr_OZ_dBQH7llZ-Cb7o7fLCkW5MJhBa9dHn81nQP6eKyX1aJSqoUL3HGn2wIxbY61c3WgpVuOOMGsVh_H2j_brXvW6tZz9l1kNPgoKX00ygjlqA\u0026h=J6RYeCo1VAW3AjGaR25b_nUV0K6rsg7O-BCbt2u4bVk" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005436" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005436" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005436" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:36:40" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "8238a0b8-fabd-4b93-a7f6-90b2384bff0b" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053640Z:8238a0b8-fabd-4b93-a7f6-90b2384bff0b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:51:37 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C9BE60C75C2C4346B24B42A5A53EA9BF Ref B: SEL221051504035 Ref C: 2024-04-30T05:36:38Z" ], + "Date": [ "Tue, 30 Apr 2024 05:36:39 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ] @@ -284,19 +268,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV7qbxiho?api-version=2022-10-01-preview+8": { + "Remove-AzServiceBusNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV7i84pmj?api-version=2022-10-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV7qbxiho?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV7i84pmj?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "201" ], - "x-ms-client-request-id": [ "7ef1c57e-e896-417a-b4e6-ca910d8f16e5" ], + "x-ms-unique-id": [ "158" ], + "x-ms-client-request-id": [ "7c16dd44-426d-4213-aa94-c63998631af9" ], "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_Get" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -307,29 +291,29 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "20916124-09ec-4ad1-9fe7-a58f83fd4ac1_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11819" ], - "x-ms-correlation-request-id": [ "448bcd78-68ed-48c7-848c-cb50cf679350" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135138Z:448bcd78-68ed-48c7-848c-cb50cf679350" ], + "x-ms-failure-cause": [ "gateway" ], + "x-ms-request-id": [ "fc50294a-91a5-499a-b97d-ebcbf9219cfa" ], + "x-ms-correlation-request-id": [ "fc50294a-91a5-499a-b97d-ebcbf9219cfa" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053640Z:fc50294a-91a5-499a-b97d-ebcbf9219cfa" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:51:37 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 26B1A2ADBB0F4D888F3A821CDC3FFA47 Ref B: SEL221051504035 Ref C: 2024-04-30T05:36:40Z" ], + "Date": [ "Tue, 30 Apr 2024 05:36:39 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "119" ], + "Content-Length": [ "250" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"error\":{\"message\":\"Namespace does not exist. CorrelationId: 448bcd78-68ed-48c7-848c-cb50cf679350\",\"code\":\"NotFound\"}}", + "Content": "{\"error\":{\"code\":\"ResourceNotFound\",\"message\":\"The Resource \u0027Microsoft.ServiceBus/namespaces/namespaceV7i84pmj\u0027 under resource group \u0027Autorest-PS-ServiceBus-2n3eh9\u0027 was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"}}", "isContentBase64": false } }, - "Remove-AzServiceBusNamespaceV2+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV85v4e0c?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusNamespaceV2+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV8vc59lw?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV85v4e0c?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV8vc59lw?api-version=2022-10-01-preview", "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n }\n}", "isContentBase64": false, "Headers": { @@ -340,85 +324,47 @@ } }, "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "44b812fc-c032-4185-b0c7-cbf796c619c2_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1174" ], - "x-ms-correlation-request-id": [ "5948105e-8492-4cb1-99b3-3469f4e49d22" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135142Z:5948105e-8492-4cb1-99b3-3469f4e49d22" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:51:41 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "730" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV85v4e0c\",\"name\":\"namespaceV85v4e0c\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev85v4e0c\",\"createdAt\":\"2023-02-19T13:51:41.72Z\",\"updatedAt\":\"2023-02-19T13:51:41.72Z\",\"serviceBusEndpoint\":\"https://namespaceV85v4e0c.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Remove-AzServiceBusNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV85v4e0c?api-version=2022-10-01-preview+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV85v4e0c?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "203" ], - "x-ms-client-request-id": [ "67f28af0-8aca-4c42-9855-850ccca708c7" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3e5589b7-1e83-42a2-8aca-7603b18fd156_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11818" ], - "x-ms-correlation-request-id": [ "1e2641d8-8489-4e50-88dc-5b4f48ccc2e1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135213Z:1e2641d8-8489-4e50-88dc-5b4f48ccc2e1" ], + "x-ms-correlation-request-id": [ "41c40081-2b5e-4023-ba81-5020dee5fd24" ], + "x-ms-client-request-id": [ "c8c4c2dc-4045-4cdd-998f-225810816152_RP" ], + "x-ms-messaging-activity-id": [ "f6e69d01-615d-49cb-b9ee-499e7b4fd897" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:36:44" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "41c40081-2b5e-4023-ba81-5020dee5fd24" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053644Z:41c40081-2b5e-4023-ba81-5020dee5fd24" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:52:12 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 11C775FA138B4BD68ABA1B2378ED5DD6 Ref B: SEL221051504035 Ref C: 2024-04-30T05:36:40Z" ], + "Date": [ "Tue, 30 Apr 2024 05:36:43 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "730" ], + "Content-Length": [ "740" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV85v4e0c\",\"name\":\"namespaceV85v4e0c\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev85v4e0c\",\"createdAt\":\"2023-02-19T13:51:41.72Z\",\"updatedAt\":\"2023-02-19T13:51:41.72Z\",\"serviceBusEndpoint\":\"https://namespaceV85v4e0c.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV8vc59lw\",\"name\":\"namespaceV8vc59lw\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev8vc59lw\",\"serviceBusEndpoint\":\"https://namespaceV8vc59lw.servicebus.windows.net:443/\",\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-30T05:36:44.3300703Z\",\"updatedAt\":\"2024-04-30T05:36:44.3300703Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Remove-AzServiceBusNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV85v4e0c?api-version=2022-10-01-preview+3": { + "Remove-AzServiceBusNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV8vc59lw?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV85v4e0c?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV8vc59lw?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "204" ], - "x-ms-client-request-id": [ "67f28af0-8aca-4c42-9855-850ccca708c7" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "160" ], + "x-ms-client-request-id": [ "c8c4c2dc-4045-4cdd-998f-225810816152" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -428,39 +374,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "84738558-a118-4a76-8cd8-f5e82cb8b7f6_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11817" ], - "x-ms-correlation-request-id": [ "ada7b224-f748-4fb5-8f8a-69165a46a5a6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135243Z:ada7b224-f748-4fb5-8f8a-69165a46a5a6" ], + "x-ms-correlation-request-id": [ "304bc782-d810-4ce8-a7b1-acdddd7ae537" ], + "x-ms-client-request-id": [ "c8c4c2dc-4045-4cdd-998f-225810816152_RP" ], + "x-ms-messaging-activity-id": [ "bd38b52e-c946-4848-8808-c61f2780a533" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:37:16" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "304bc782-d810-4ce8-a7b1-acdddd7ae537" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053716Z:304bc782-d810-4ce8-a7b1-acdddd7ae537" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:52:43 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C6352C803E4C42429AC8CCD8EBF1F78D Ref B: SEL221051504035 Ref C: 2024-04-30T05:37:14Z" ], + "Date": [ "Tue, 30 Apr 2024 05:37:15 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "729" ], + "Content-Length": [ "771" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV85v4e0c\",\"name\":\"namespaceV85v4e0c\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev85v4e0c\",\"createdAt\":\"2023-02-19T13:51:41.72Z\",\"updatedAt\":\"2023-02-19T13:52:26.377Z\",\"serviceBusEndpoint\":\"https://namespaceV85v4e0c.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV8vc59lw\",\"name\":\"namespaceV8vc59lw\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev8vc59lw\",\"serviceBusEndpoint\":\"https://namespaceV8vc59lw.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:36:44.3300703Z\",\"updatedAt\":\"2024-04-30T05:36:47.0644484Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Remove-AzServiceBusNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV85v4e0c?api-version=2022-10-01-preview+4": { + "Remove-AzServiceBusNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV8vc59lw?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV85v4e0c?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV8vc59lw?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "205" ], - "x-ms-client-request-id": [ "67f28af0-8aca-4c42-9855-850ccca708c7" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "161" ], + "x-ms-client-request-id": [ "c8c4c2dc-4045-4cdd-998f-225810816152" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -470,38 +420,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9680e72c-d660-4efc-9768-cab9941740b8_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11816" ], - "x-ms-correlation-request-id": [ "10261e22-9e7c-48c6-9544-7ff8ed61bf63" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135244Z:10261e22-9e7c-48c6-9544-7ff8ed61bf63" ], + "x-ms-correlation-request-id": [ "c91ece83-43f3-41ee-9dc8-45e4dc292607" ], + "x-ms-client-request-id": [ "c8c4c2dc-4045-4cdd-998f-225810816152_RP" ], + "x-ms-messaging-activity-id": [ "1a296b9a-43b8-4a40-ab9d-49b239cf7cc3" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T05:37:18" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "c91ece83-43f3-41ee-9dc8-45e4dc292607" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053718Z:c91ece83-43f3-41ee-9dc8-45e4dc292607" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:52:43 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FC5DF704456647E1A69D89FFF78D7CA5 Ref B: SEL221051504035 Ref C: 2024-04-30T05:37:16Z" ], + "Date": [ "Tue, 30 Apr 2024 05:37:17 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "729" ], + "Content-Length": [ "771" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV85v4e0c\",\"name\":\"namespaceV85v4e0c\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev85v4e0c\",\"createdAt\":\"2023-02-19T13:51:41.72Z\",\"updatedAt\":\"2023-02-19T13:52:26.377Z\",\"serviceBusEndpoint\":\"https://namespaceV85v4e0c.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV8vc59lw\",\"name\":\"namespaceV8vc59lw\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev8vc59lw\",\"serviceBusEndpoint\":\"https://namespaceV8vc59lw.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:36:44.3300703Z\",\"updatedAt\":\"2024-04-30T05:36:47.0644484Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Remove-AzServiceBusNamespaceV2+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV85v4e0c?api-version=2022-10-01-preview+5": { + "Remove-AzServiceBusNamespaceV2+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV8vc59lw?api-version=2022-10-01-preview+4": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV85v4e0c?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV8vc59lw?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "206" ], - "x-ms-client-request-id": [ "52235080-1d0c-4e99-b029-4a829cd08bc9" ], + "x-ms-unique-id": [ "162" ], + "x-ms-client-request-id": [ "3c70dff3-8d89-4aee-bc66-e271b6d53678" ], "CommandName": [ "Remove-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Remove-AzServiceBusNamespaceV2_DeleteViaIdentity" ], + "FullCommandName": [ "Remove-AzServiceBusNamespace_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -512,16 +466,20 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/locations/eastus/operationStatus/namespaceV85v4e0c?api-version=2022-10-01-preview\u0026resourceType=Namespace" ], - "x-ms-request-id": [ "04b01c1b-cdab-4d17-8f07-ddeb040194c5_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14992" ], - "x-ms-correlation-request-id": [ "88f32d84-ed13-46b0-b081-08ca880f97cd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135245Z:88f32d84-ed13-46b0-b081-08ca880f97cd" ], + "Location": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/locations/eastus/namespaceOperationResults/0841a15f-3037-4774-984a-4ea9b595047c?isAsyncHeader=false\u0026resourceName=namespaceV8vc59lw\u0026resourceType=namespace\u0026api-version=2022-10-01-preview\u0026operationType=Deleted\u0026t=638500522402045835\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=FrRTaeZonxWOv3FeLTPPVzUSx-s7075Fj_ZAe-fCTLhboPjLrIbXQzq-reqRN2YtoOXIUqARQiWgy8xJyzgT-gDU5AX5jQuZA7Gvvym0MdRnyn3qsrKhuW0cNhmJPat29LJght4cb-Tiv1rJwYxlkD-oOuGInmZP7JbsQwRu8EKXFu54ReMFFlsd8hdepUVeweejEnVJuJrDHrr5lSNx5pDjY56XA2f9id2_kwjdUhmizphfsQeX7WnQ3ouWhD_EvbeprxNtEu2MuX819WOrFQt5cBBgukn2vpYlafwi0F5Z-tS48gvtey1nry_MEAD_CBrEX9qYurRJ7MlZTrfD3Q\u0026h=V_B9JWe3ORYn50EsmGSpEs2qGpfKFUXpFcIO1l6xjmw" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005660" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005660" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005660" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T05:37:20" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "3c08e30f-6472-4fa9-90e0-f6640585c26c" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053720Z:3c08e30f-6472-4fa9-90e0-f6640585c26c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:52:45 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 36AC69E8DC5440C1A741720293407738 Ref B: SEL221051504035 Ref C: 2024-04-30T05:37:18Z" ], + "Date": [ "Tue, 30 Apr 2024 05:37:19 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -531,20 +489,20 @@ "isContentBase64": false } }, - "Remove-AzServiceBusNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/locations/eastus/operationStatus/namespaceV85v4e0c?api-version=2022-10-01-preview\u0026resourceType=Namespace+6": { + "Remove-AzServiceBusNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/locations/eastus/namespaceOperationResults/0841a15f-3037-4774-984a-4ea9b595047c?isAsyncHeader=false\u0026resourceName=namespaceV8vc59lw\u0026resourceType=namespace\u0026api-version=2022-10-01-preview\u0026operationType=Deleted\u0026t=638500522402045835\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=FrRTaeZonxWOv3FeLTPPVzUSx-s7075Fj_ZAe-fCTLhboPjLrIbXQzq-reqRN2YtoOXIUqARQiWgy8xJyzgT-gDU5AX5jQuZA7Gvvym0MdRnyn3qsrKhuW0cNhmJPat29LJght4cb-Tiv1rJwYxlkD-oOuGInmZP7JbsQwRu8EKXFu54ReMFFlsd8hdepUVeweejEnVJuJrDHrr5lSNx5pDjY56XA2f9id2_kwjdUhmizphfsQeX7WnQ3ouWhD_EvbeprxNtEu2MuX819WOrFQt5cBBgukn2vpYlafwi0F5Z-tS48gvtey1nry_MEAD_CBrEX9qYurRJ7MlZTrfD3Q\u0026h=V_B9JWe3ORYn50EsmGSpEs2qGpfKFUXpFcIO1l6xjmw+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/locations/eastus/operationStatus/namespaceV85v4e0c?api-version=2022-10-01-preview\u0026resourceType=Namespace", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/locations/eastus/namespaceOperationResults/0841a15f-3037-4774-984a-4ea9b595047c?isAsyncHeader=false\u0026resourceName=namespaceV8vc59lw\u0026resourceType=namespace\u0026api-version=2022-10-01-preview\u0026operationType=Deleted\u0026t=638500522402045835\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=FrRTaeZonxWOv3FeLTPPVzUSx-s7075Fj_ZAe-fCTLhboPjLrIbXQzq-reqRN2YtoOXIUqARQiWgy8xJyzgT-gDU5AX5jQuZA7Gvvym0MdRnyn3qsrKhuW0cNhmJPat29LJght4cb-Tiv1rJwYxlkD-oOuGInmZP7JbsQwRu8EKXFu54ReMFFlsd8hdepUVeweejEnVJuJrDHrr5lSNx5pDjY56XA2f9id2_kwjdUhmizphfsQeX7WnQ3ouWhD_EvbeprxNtEu2MuX819WOrFQt5cBBgukn2vpYlafwi0F5Z-tS48gvtey1nry_MEAD_CBrEX9qYurRJ7MlZTrfD3Q\u0026h=V_B9JWe3ORYn50EsmGSpEs2qGpfKFUXpFcIO1l6xjmw", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "207" ], - "x-ms-client-request-id": [ "52235080-1d0c-4e99-b029-4a829cd08bc9" ], + "x-ms-unique-id": [ "163" ], + "x-ms-client-request-id": [ "3c70dff3-8d89-4aee-bc66-e271b6d53678" ], "CommandName": [ "Remove-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Remove-AzServiceBusNamespaceV2_DeleteViaIdentity" ], + "FullCommandName": [ "Remove-AzServiceBusNamespace_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -554,15 +512,20 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "cd7c2061-996d-4fb4-884c-9ad70da5b819_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11815" ], - "x-ms-correlation-request-id": [ "8fcf27e7-bb4b-421c-8903-b79139c3e895" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135316Z:8fcf27e7-bb4b-421c-8903-b79139c3e895" ], + "Location": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/locations/eastus/namespaceOperationResults/0841a15f-3037-4774-984a-4ea9b595047c?isAsyncHeader=false\u0026resourceName=namespaceV8vc59lw\u0026resourceType=namespace\u0026api-version=2022-10-01-preview\u0026operationType=Deleted\u0026t=638500522729126056\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=eafrrqwgoHuH6fx1Bg1r7eb9DfxJhF2fLdnk1KJyp1hTXebCJGIsJjYAv_0UBXWIJOFlm5YBtvSuESRkHOs3hhHqkUt0mZkRK4yCokOZymRHbNxRirV-4SsCpl4N7gfY-zeaFLU7lTIJhwBHtWKtXkc8DY57IO6o_KOO9YUDwSf29-P2TpUFAtJyuMBXKHa592LJPuV3jl1ToCDtJAy1RpN0fFJ_j4eTiQzlOhv2S7q6b8PycnEl2gBBt1G30hHsfwLFJkD-svQ2FAP0yY_G0jjB7EZwtDlDih6bcAwPKbHf7BTbmfVMcp6OYUbg3RApMpd3iAQTY7PsaGz1KhKArg\u0026h=6w46zRt5GYdas46qnFXrVdlP3qsOItY3irsSVBpYvq0" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000003308" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000003308" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000003308" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T05:37:52" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "b6a37cab-108b-4364-be39-6a2032886cf4" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053752Z:b6a37cab-108b-4364-be39-6a2032886cf4" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:53:16 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7CA2E6AA30D64C73A4F35E1FA0868467 Ref B: SEL221051504035 Ref C: 2024-04-30T05:37:50Z" ], + "Date": [ "Tue, 30 Apr 2024 05:37:52 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ] @@ -571,20 +534,20 @@ "isContentBase64": false } }, - "Remove-AzServiceBusNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/locations/eastus/operationStatus/namespaceV85v4e0c?api-version=2022-10-01-preview\u0026resourceType=Namespace+7": { + "Remove-AzServiceBusNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/locations/eastus/namespaceOperationResults/0841a15f-3037-4774-984a-4ea9b595047c?isAsyncHeader=false\u0026resourceName=namespaceV8vc59lw\u0026resourceType=namespace\u0026api-version=2022-10-01-preview\u0026operationType=Deleted\u0026t=638500522402045835\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=FrRTaeZonxWOv3FeLTPPVzUSx-s7075Fj_ZAe-fCTLhboPjLrIbXQzq-reqRN2YtoOXIUqARQiWgy8xJyzgT-gDU5AX5jQuZA7Gvvym0MdRnyn3qsrKhuW0cNhmJPat29LJght4cb-Tiv1rJwYxlkD-oOuGInmZP7JbsQwRu8EKXFu54ReMFFlsd8hdepUVeweejEnVJuJrDHrr5lSNx5pDjY56XA2f9id2_kwjdUhmizphfsQeX7WnQ3ouWhD_EvbeprxNtEu2MuX819WOrFQt5cBBgukn2vpYlafwi0F5Z-tS48gvtey1nry_MEAD_CBrEX9qYurRJ7MlZTrfD3Q\u0026h=V_B9JWe3ORYn50EsmGSpEs2qGpfKFUXpFcIO1l6xjmw+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/locations/eastus/operationStatus/namespaceV85v4e0c?api-version=2022-10-01-preview\u0026resourceType=Namespace", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/locations/eastus/namespaceOperationResults/0841a15f-3037-4774-984a-4ea9b595047c?isAsyncHeader=false\u0026resourceName=namespaceV8vc59lw\u0026resourceType=namespace\u0026api-version=2022-10-01-preview\u0026operationType=Deleted\u0026t=638500522402045835\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=FrRTaeZonxWOv3FeLTPPVzUSx-s7075Fj_ZAe-fCTLhboPjLrIbXQzq-reqRN2YtoOXIUqARQiWgy8xJyzgT-gDU5AX5jQuZA7Gvvym0MdRnyn3qsrKhuW0cNhmJPat29LJght4cb-Tiv1rJwYxlkD-oOuGInmZP7JbsQwRu8EKXFu54ReMFFlsd8hdepUVeweejEnVJuJrDHrr5lSNx5pDjY56XA2f9id2_kwjdUhmizphfsQeX7WnQ3ouWhD_EvbeprxNtEu2MuX819WOrFQt5cBBgukn2vpYlafwi0F5Z-tS48gvtey1nry_MEAD_CBrEX9qYurRJ7MlZTrfD3Q\u0026h=V_B9JWe3ORYn50EsmGSpEs2qGpfKFUXpFcIO1l6xjmw", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "208" ], - "x-ms-client-request-id": [ "52235080-1d0c-4e99-b029-4a829cd08bc9" ], + "x-ms-unique-id": [ "164" ], + "x-ms-client-request-id": [ "3c70dff3-8d89-4aee-bc66-e271b6d53678" ], "CommandName": [ "Remove-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Remove-AzServiceBusNamespaceV2_DeleteViaIdentity" ], + "FullCommandName": [ "Remove-AzServiceBusNamespace_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -594,15 +557,20 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ff815882-931a-4c16-8d7e-1967642c07a2_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11814" ], - "x-ms-correlation-request-id": [ "39c730c2-ffed-4a41-a55c-d5f408ebcb09" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135316Z:39c730c2-ffed-4a41-a55c-d5f408ebcb09" ], + "Location": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/locations/eastus/namespaceOperationResults/0841a15f-3037-4774-984a-4ea9b595047c?isAsyncHeader=false\u0026resourceName=namespaceV8vc59lw\u0026resourceType=namespace\u0026api-version=2022-10-01-preview\u0026operationType=Deleted\u0026t=638500522745593605\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=qNVUmvbMPe3uMTcVfFU8ei_y8SbIQY4urOn7TrymmCmyP4O1PL8b0yg0drubXzui2pjQbzxMqkR6PIQA6zeeG8PLSKBzaUmTgfGCdOgitu6MbtfbmFhMRgjnZse_NQ2KicjF7wsfC6cikFCYh_cExK7x6XW6xGCbvdK2sro6_79sK2N52mr3E6AnJ6aw4oZfOfZfUhu4136YJTmsLHyiVFf4RJVnkLts56hC8Rx1qHXgrB0E9k_BUeBOytozWPoIL8vY3ZTC9N0PtIo9DmXje5Zo3F1cCiyfAK1T0PS0a6yX1i2OtsLfUJkd9ho1LMSXV1XRgY9_4tKuOfF4aaY8Yw\u0026h=mSzwHsxAF_qa8a17ci6ijDlqU7d5_OljrEXiMi2RNzA" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005260" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005260" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005260" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:37:54" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "5d8e9712-8fe2-48f4-b84f-9f82a5fdf38b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053754Z:5d8e9712-8fe2-48f4-b84f-9f82a5fdf38b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:53:16 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 27CE81282A0641F7BB2EC1CB8A52169C Ref B: SEL221051504035 Ref C: 2024-04-30T05:37:53Z" ], + "Date": [ "Tue, 30 Apr 2024 05:37:53 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ] @@ -611,19 +579,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV85v4e0c?api-version=2022-10-01-preview+8": { + "Remove-AzServiceBusNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV8vc59lw?api-version=2022-10-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV85v4e0c?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV8vc59lw?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "209" ], - "x-ms-client-request-id": [ "aec986b2-8659-45b8-9a00-9a6ff07ac849" ], + "x-ms-unique-id": [ "165" ], + "x-ms-client-request-id": [ "a64095d2-6b2a-47ee-bdd1-12b6f342e150" ], "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_GetViaIdentity" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -634,22 +602,22 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "009937ec-89ff-4142-9a38-457532313b45_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11813" ], - "x-ms-correlation-request-id": [ "c2063989-8eeb-4f0b-ac04-a8f15d4cb3f1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135317Z:c2063989-8eeb-4f0b-ac04-a8f15d4cb3f1" ], + "x-ms-failure-cause": [ "gateway" ], + "x-ms-request-id": [ "c68d9390-4ac6-4a90-8ef6-00cb7a44728b" ], + "x-ms-correlation-request-id": [ "c68d9390-4ac6-4a90-8ef6-00cb7a44728b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053754Z:c68d9390-4ac6-4a90-8ef6-00cb7a44728b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:53:17 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1C5F477FA46D48CA9E47253D76BC2773 Ref B: SEL221051504035 Ref C: 2024-04-30T05:37:54Z" ], + "Date": [ "Tue, 30 Apr 2024 05:37:54 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "119" ], + "Content-Length": [ "250" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"error\":{\"message\":\"Namespace does not exist. CorrelationId: c2063989-8eeb-4f0b-ac04-a8f15d4cb3f1\",\"code\":\"NotFound\"}}", + "Content": "{\"error\":{\"code\":\"ResourceNotFound\",\"message\":\"The Resource \u0027Microsoft.ServiceBus/namespaces/namespaceV8vc59lw\u0027 under resource group \u0027Autorest-PS-ServiceBus-2n3eh9\u0027 was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusNamespaceV2.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusNamespaceV2.Tests.ps1 index b920ac5a2074..453ba510b60a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusNamespaceV2.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusNamespaceV2.Tests.ps1 @@ -16,14 +16,14 @@ if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzServiceBusNamespaceV Describe 'Remove-AzServiceBusNamespaceV2' { It 'Delete' { - $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV7 -SkuName Standard -Location eastus + $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV7 -SkuName Standard -Location $env.location Remove-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV7 - { Get-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV7 } | Should -Throw + { Get-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV7 -ErrorAction Stop } | Should -Throw } It 'DeleteViaIdentity' { - $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV8 -SkuName Standard -Location eastus + $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV8 -SkuName Standard -Location $env.location Remove-AzServiceBusNamespaceV2 -InputObject $serviceBusNamespace - { Get-AzServiceBusNamespaceV2 -InputObject $serviceBusNamespace } | Should -Throw + { Get-AzServiceBusNamespaceV2 -InputObject $serviceBusNamespace -ErrorAction Stop } | Should -Throw } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusPrivateEndpointConnection.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusPrivateEndpointConnection.Recording.json index f919a38ad4da..f83890525523 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusPrivateEndpointConnection.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusPrivateEndpointConnection.Recording.json @@ -1,17 +1,17 @@ { - "Remove-AzServiceBusPrivateEndpointConnection+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusPrivateEndpointConnection+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "210" ], - "x-ms-client-request-id": [ "c362dec3-8887-49d3-9f10-a07e3bcc0664" ], + "x-ms-unique-id": [ "166" ], + "x-ms-client-request-id": [ "681f5d41-03aa-4716-a745-cb5a787d4815" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,38 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "8a3ef0c9-526d-47d5-8608-babc396896bc_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11812" ], - "x-ms-correlation-request-id": [ "59370a01-026b-4b00-804e-630c12ee3bd6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135331Z:59370a01-026b-4b00-804e-630c12ee3bd6" ], + "x-ms-correlation-request-id": [ "5be74962-89f9-4689-80be-574216cf4beb" ], + "x-ms-client-request-id": [ "681f5d41-03aa-4716-a745-cb5a787d4815_RP" ], + "x-ms-messaging-activity-id": [ "02a37c71-040c-4110-8c86-bbecbd1ed9be" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T05:38:10" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "5be74962-89f9-4689-80be-574216cf4beb" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053810Z:5be74962-89f9-4689-80be-574216cf4beb" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:53:30 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 660C891FC7FF4DC283512734A6E19E00 Ref B: SEL221051504035 Ref C: 2024-04-30T05:38:08Z" ], + "Date": [ "Tue, 30 Apr 2024 05:38:09 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1392" ], + "Content-Length": [ "1398" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe2otyvgf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe1ase46u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}]}", "isContentBase64": false } }, - "Remove-AzServiceBusPrivateEndpointConnection+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusPrivateEndpointConnection+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "211" ], - "x-ms-client-request-id": [ "678d5309-316d-4694-924b-a1bcf427827a" ], + "x-ms-unique-id": [ "167" ], + "x-ms-client-request-id": [ "dcee75a1-9d00-4b53-b47a-4b95e0e3f368" ], "CommandName": [ "Remove-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Remove-AzServiceBusPrivateEndpointConnection_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,16 +68,20 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "dcae9f4d-3dc2-4cbe-ad65-7d18b8b5b3f4_M3SN1_M3SN1" ], - "Azure-AsyncOperation": [ "https://management.azure.com:443/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211/operationStatus/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview\u0026operationType=Delete" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14991" ], - "x-ms-correlation-request-id": [ "4f089c5d-b7b3-409b-a720-710a055301c0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135332Z:4f089c5d-b7b3-409b-a720-710a055301c0" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b/operationStatus/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview\u0026operationType=Delete\u0026t=638500522928068769\u0026c=MIIHADCCBeigAwIBAgITfARkblWv9E1UAxL0rgAABGRuVTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMDYxMDQ1WhcNMjUwMTI0MDYxMDQ1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL63lNdlvQvkP7LpygshC_1kUR8Go8cQgx8bHhBgpDDVKuiZ9Ac6D19MAApdfH616nszMxe_fI1VBHXniEsjPIV8AXVPDZsYCvRuoo8NS3kXvNixn2PhgEvc7t6mZJpguzRxCvCjQjb129HPMlZfO706DAoq-3Abk2D1ll6oHEIFF-YhjtFxXd-cB4I4sCYZYdG5DFj65hWpQ4wtYur1yA1RMJ8U032dNAijuZrbmCs_Q7P1-y_pCC7VoKqRbeJQhMRROmCpX-TNXW3G9HNh300FJZ-qWZVUJZaa9-gPdJSiDPG41VipfQS_CinB3Zqif61cSyK9AI3YsTsQXtTcR_UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBRgyIJjirhr5laZASuyXTmIxmTBzjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGIGEEgPerVLMQJK1Fk22xrEMyLCfudJmeDIiAi765uzPqt_wmDsdrqpT5yR7rsTQj9D9yYKq4PWalUzuE5QRq1rtTU1dc8FPhkPwX85cYGdXR09ERq9-C-eutCRsjdAXSAcOJW3K1-5fmKCRZyyz74bgucwgUwcP2L2PkiQedpIyTV4u7iYf8SsAmPf_e2bErQYtxk2lNu_26WKVPZczOwS5v9yt6ZQjxJxKVDygkHqUjghX5T6K22gd6d_KXS_ET2uu9Shl7Q9NCQ1Lt12LhDBD8ch5Jky6siBu4P9tSgTHnodazx2wuXj-1eY3Q-Mx3UKOD00XREaD2Gcz-rTEIA\u0026s=UD5HzyhOGe8YFk3D6hQmy_6rM1NjH6-dFqZ9niwPHXcEA8IbU_Q_fVMHNkAoXK7zGpqJpbu33P4IV-uYTZna2Jp3PDP-GLzRxT6NKJhxIy7iVuf8tlhWV2nPf3cRyi4iATGI-JLHc9i7nOPYsnsMSGZ-FDWeFzvdnjfwa9Bf7HAva94jh0y9ZOlx_STjT9F5c-qQTe6WAU-2Puis6gfiuZ32szssslkxVpE2Wr5iQ40II7q9w4zaNOtcxMlX6AmlV6kqoZqk26viG2TtECJCkkAOJUkUIrzpQRJMKAu9B37Ra1-cWgESFhVCj9OUrXIczWJubn3acQV7mH5XilUQcA\u0026h=MBa4U-Osj4PtgVbJ5ywrSKj2VAR3z4hq7yk_RyeCv4c" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:38:12" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "84fea4cb-9190-4184-b307-f15802ba0692" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T053812Z:84fea4cb-9190-4184-b307-f15802ba0692" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:53:31 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 135F52E4AC824BE0999F011D6B9402F2 Ref B: SEL221051504035 Ref C: 2024-04-30T05:38:10Z" ], + "Date": [ "Tue, 30 Apr 2024 05:38:12 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -83,20 +91,20 @@ "isContentBase64": false } }, - "Remove-AzServiceBusPrivateEndpointConnection+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211/operationStatus/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview\u0026operationType=Delete+2": { + "Remove-AzServiceBusPrivateEndpointConnection+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b/operationStatus/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview\u0026operationType=Delete\u0026t=638500522928068769\u0026c=MIIHADCCBeigAwIBAgITfARkblWv9E1UAxL0rgAABGRuVTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMDYxMDQ1WhcNMjUwMTI0MDYxMDQ1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL63lNdlvQvkP7LpygshC_1kUR8Go8cQgx8bHhBgpDDVKuiZ9Ac6D19MAApdfH616nszMxe_fI1VBHXniEsjPIV8AXVPDZsYCvRuoo8NS3kXvNixn2PhgEvc7t6mZJpguzRxCvCjQjb129HPMlZfO706DAoq-3Abk2D1ll6oHEIFF-YhjtFxXd-cB4I4sCYZYdG5DFj65hWpQ4wtYur1yA1RMJ8U032dNAijuZrbmCs_Q7P1-y_pCC7VoKqRbeJQhMRROmCpX-TNXW3G9HNh300FJZ-qWZVUJZaa9-gPdJSiDPG41VipfQS_CinB3Zqif61cSyK9AI3YsTsQXtTcR_UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBRgyIJjirhr5laZASuyXTmIxmTBzjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGIGEEgPerVLMQJK1Fk22xrEMyLCfudJmeDIiAi765uzPqt_wmDsdrqpT5yR7rsTQj9D9yYKq4PWalUzuE5QRq1rtTU1dc8FPhkPwX85cYGdXR09ERq9-C-eutCRsjdAXSAcOJW3K1-5fmKCRZyyz74bgucwgUwcP2L2PkiQedpIyTV4u7iYf8SsAmPf_e2bErQYtxk2lNu_26WKVPZczOwS5v9yt6ZQjxJxKVDygkHqUjghX5T6K22gd6d_KXS_ET2uu9Shl7Q9NCQ1Lt12LhDBD8ch5Jky6siBu4P9tSgTHnodazx2wuXj-1eY3Q-Mx3UKOD00XREaD2Gcz-rTEIA\u0026s=UD5HzyhOGe8YFk3D6hQmy_6rM1NjH6-dFqZ9niwPHXcEA8IbU_Q_fVMHNkAoXK7zGpqJpbu33P4IV-uYTZna2Jp3PDP-GLzRxT6NKJhxIy7iVuf8tlhWV2nPf3cRyi4iATGI-JLHc9i7nOPYsnsMSGZ-FDWeFzvdnjfwa9Bf7HAva94jh0y9ZOlx_STjT9F5c-qQTe6WAU-2Puis6gfiuZ32szssslkxVpE2Wr5iQ40II7q9w4zaNOtcxMlX6AmlV6kqoZqk26viG2TtECJCkkAOJUkUIrzpQRJMKAu9B37Ra1-cWgESFhVCj9OUrXIczWJubn3acQV7mH5XilUQcA\u0026h=MBa4U-Osj4PtgVbJ5ywrSKj2VAR3z4hq7yk_RyeCv4c+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211/operationStatus/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview\u0026operationType=Delete", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b/operationStatus/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview\u0026operationType=Delete\u0026t=638500522928068769\u0026c=MIIHADCCBeigAwIBAgITfARkblWv9E1UAxL0rgAABGRuVTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMDYxMDQ1WhcNMjUwMTI0MDYxMDQ1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL63lNdlvQvkP7LpygshC_1kUR8Go8cQgx8bHhBgpDDVKuiZ9Ac6D19MAApdfH616nszMxe_fI1VBHXniEsjPIV8AXVPDZsYCvRuoo8NS3kXvNixn2PhgEvc7t6mZJpguzRxCvCjQjb129HPMlZfO706DAoq-3Abk2D1ll6oHEIFF-YhjtFxXd-cB4I4sCYZYdG5DFj65hWpQ4wtYur1yA1RMJ8U032dNAijuZrbmCs_Q7P1-y_pCC7VoKqRbeJQhMRROmCpX-TNXW3G9HNh300FJZ-qWZVUJZaa9-gPdJSiDPG41VipfQS_CinB3Zqif61cSyK9AI3YsTsQXtTcR_UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBRgyIJjirhr5laZASuyXTmIxmTBzjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGIGEEgPerVLMQJK1Fk22xrEMyLCfudJmeDIiAi765uzPqt_wmDsdrqpT5yR7rsTQj9D9yYKq4PWalUzuE5QRq1rtTU1dc8FPhkPwX85cYGdXR09ERq9-C-eutCRsjdAXSAcOJW3K1-5fmKCRZyyz74bgucwgUwcP2L2PkiQedpIyTV4u7iYf8SsAmPf_e2bErQYtxk2lNu_26WKVPZczOwS5v9yt6ZQjxJxKVDygkHqUjghX5T6K22gd6d_KXS_ET2uu9Shl7Q9NCQ1Lt12LhDBD8ch5Jky6siBu4P9tSgTHnodazx2wuXj-1eY3Q-Mx3UKOD00XREaD2Gcz-rTEIA\u0026s=UD5HzyhOGe8YFk3D6hQmy_6rM1NjH6-dFqZ9niwPHXcEA8IbU_Q_fVMHNkAoXK7zGpqJpbu33P4IV-uYTZna2Jp3PDP-GLzRxT6NKJhxIy7iVuf8tlhWV2nPf3cRyi4iATGI-JLHc9i7nOPYsnsMSGZ-FDWeFzvdnjfwa9Bf7HAva94jh0y9ZOlx_STjT9F5c-qQTe6WAU-2Puis6gfiuZ32szssslkxVpE2Wr5iQ40II7q9w4zaNOtcxMlX6AmlV6kqoZqk26viG2TtECJCkkAOJUkUIrzpQRJMKAu9B37Ra1-cWgESFhVCj9OUrXIczWJubn3acQV7mH5XilUQcA\u0026h=MBa4U-Osj4PtgVbJ5ywrSKj2VAR3z4hq7yk_RyeCv4c", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "212" ], - "x-ms-client-request-id": [ "678d5309-316d-4694-924b-a1bcf427827a" ], + "x-ms-unique-id": [ "168" ], + "x-ms-client-request-id": [ "dcee75a1-9d00-4b53-b47a-4b95e0e3f368" ], "CommandName": [ "Remove-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Remove-AzServiceBusPrivateEndpointConnection_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -106,38 +114,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "75e34c4c-160e-4a33-b116-5e25e56c67d5_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11811" ], - "x-ms-correlation-request-id": [ "5e569b18-a417-444b-b5e6-a6337c4d1517" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135402Z:5e569b18-a417-444b-b5e6-a6337c4d1517" ], + "x-ms-correlation-request-id": [ "1f41cbe1-a502-484b-900c-a1b120ba8fae" ], + "x-ms-client-request-id": [ "dcee75a1-9d00-4b53-b47a-4b95e0e3f368_RP" ], + "x-ms-messaging-activity-id": [ "7014f87f-1001-457f-93fd-74d6556ee795" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:38:44" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "1f41cbe1-a502-484b-900c-a1b120ba8fae" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053844Z:1f41cbe1-a502-484b-900c-a1b120ba8fae" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:54:01 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 701FC811E16D4CF8A8A924EDD8036D74 Ref B: SEL221051504035 Ref C: 2024-04-30T05:38:42Z" ], + "Date": [ "Tue, 30 Apr 2024 05:38:43 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "470" ], + "Content-Length": [ "404" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211/operationStatus/efc95bab-8a36-4368-bf40-071ec0dd3211/operationStatus/efc95bab-8a36-4368-bf40-071ec0dd3211\",\"name\":\"efc95bab-8a36-4368-bf40-071ec0dd3211\",\"status\":\"Succeeded\",\"startTime\":\"0001-01-01T00:00:00Z\",\"endTime\":\"0001-01-01T00:00:00Z\"}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b/operationStatus/e63008e7-f643-420a-ad79-6dd9aa22ff0b/operationStatus/e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"name\":\"e63008e7-f643-420a-ad79-6dd9aa22ff0b\",\"status\":\"Succeeded\"}", "isContentBase64": false } }, - "Remove-AzServiceBusPrivateEndpointConnection+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview+3": { + "Remove-AzServiceBusPrivateEndpointConnection+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/efc95bab-8a36-4368-bf40-071ec0dd3211?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/e63008e7-f643-420a-ad79-6dd9aa22ff0b?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "213" ], - "x-ms-client-request-id": [ "1b564910-7a32-4e28-a98d-80070245065c" ], + "x-ms-unique-id": [ "169" ], + "x-ms-client-request-id": [ "ade8ead1-574d-4845-90e4-0447bcf54019" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -148,38 +160,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "8d2aff7d-0ed8-412d-a5ca-ebe6fc50bd35_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11810" ], - "x-ms-correlation-request-id": [ "2ae6aa1f-9e5d-4119-8590-ecfd441172da" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135403Z:2ae6aa1f-9e5d-4119-8590-ecfd441172da" ], + "x-ms-correlation-request-id": [ "7b11c28a-42e0-45eb-a842-298d95acfd6f" ], + "x-ms-client-request-id": [ "ade8ead1-574d-4845-90e4-0447bcf54019_RP" ], + "x-ms-messaging-activity-id": [ "e14a5645-101c-4a0f-8fe7-4e977934e553" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T05:38:46" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "7b11c28a-42e0-45eb-a842-298d95acfd6f" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T053846Z:7b11c28a-42e0-45eb-a842-298d95acfd6f" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:54:02 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 909E1A38431D44D487AECE351AE320A3 Ref B: SEL221051504035 Ref C: 2024-04-30T05:38:44Z" ], + "Date": [ "Tue, 30 Apr 2024 05:38:45 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "169" ], - "Content-Type": [ "application/json; charset=utf-8" ], + "Content-Length": [ "105" ], + "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"error\":{\"message\":\"The requested resource efc95bab-8a36-4368-bf40-071ec0dd3211 does not exist. CorrelationId: 2ae6aa1f-9e5d-4119-8590-ecfd441172da\",\"code\":\"NotFound\"}}", + "Content": "{\"error\":{\"code\":\"PrivateEndpointConnectionNotFound\",\"message\":\"Private endpoint connection not found.\"}}", "isContentBase64": false } }, - "Remove-AzServiceBusPrivateEndpointConnection+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusPrivateEndpointConnection+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "214" ], - "x-ms-client-request-id": [ "79c57b40-323d-4c57-a522-2e2e7c1b3bca" ], + "x-ms-unique-id": [ "170" ], + "x-ms-client-request-id": [ "a1b3e60f-d9e6-47d9-b05d-a9015966497a" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -190,38 +206,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "01fe1d56-89c1-4a3a-89c4-5facfcf3ef7f_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11809" ], - "x-ms-correlation-request-id": [ "96c9a557-8df8-4f27-8eb3-0f6dcc3da53c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135403Z:96c9a557-8df8-4f27-8eb3-0f6dcc3da53c" ], + "x-ms-correlation-request-id": [ "0b0bd02d-8507-4a28-876e-e6354a1d1e3d" ], + "x-ms-client-request-id": [ "a1b3e60f-d9e6-47d9-b05d-a9015966497a_RP" ], + "x-ms-messaging-activity-id": [ "26ebafea-fe4b-4d54-9197-b245da6e2f48" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:38:48" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "0b0bd02d-8507-4a28-876e-e6354a1d1e3d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053848Z:0b0bd02d-8507-4a28-876e-e6354a1d1e3d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:54:03 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D89311A49D274648A6F174225AB31FD0 Ref B: SEL221051504035 Ref C: 2024-04-30T05:38:46Z" ], + "Date": [ "Tue, 30 Apr 2024 05:38:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "691" ], + "Content-Length": [ "694" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.Network/privateEndpoints/pe1w0yv9t\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"type\":\"Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/privateEndpoints/pe2a10kcs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Remove-AzServiceBusPrivateEndpointConnection+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview+2": { + "Remove-AzServiceBusPrivateEndpointConnection+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "215" ], - "x-ms-client-request-id": [ "dbc8e06f-466a-4dbe-b382-e277b11bd2d5" ], + "x-ms-unique-id": [ "171" ], + "x-ms-client-request-id": [ "6e82f429-bbf7-4231-8a08-9d33917cbf04" ], "CommandName": [ "Remove-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Remove-AzServiceBusPrivateEndpointConnection_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -232,16 +252,20 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a28c8220-c8e1-480b-9324-edf0581cc95e_M3SN1_M3SN1" ], - "Azure-AsyncOperation": [ "https://management.azure.com:443/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00/operationStatus/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview\u0026operationType=Delete" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14990" ], - "x-ms-correlation-request-id": [ "5f8bb0b6-a3e5-4fc5-a060-c77e004a1f21" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135404Z:5f8bb0b6-a3e5-4fc5-a060-c77e004a1f21" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1/operationStatus/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview\u0026operationType=Delete\u0026t=638500523307593173\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=El4PA0J1xkixsz4EeDmy66tfsnrgn84acmE2nd1sTZlemLe6yFVZyybEqJhqqT8xDa3L4vmhcB0eRzYdq2Ki7EXohqMrvIc2Lcn2l9Oro4qhD6HQHn-87m6pkwaD-e40O8cDVEPaH5hVDkoYAMJYZ2YdN6HskfsinJqOnakbY8GUu0D4yRJdTZ88kWnxQkiHEyAp6vFGF-3QGTK3J9XAdkPA_Zdr55caBiTUb1xR8t9b56iXbrO9YKdn9xdxAgLC2j7xmCH2CQ_4_AIQ42584SFunwi9zwG4tUMiqGAOMWdlKtRv-nBGhoOmskSppzv9d86sCackqhOVgqVmG3h0NQ\u0026h=OreCBWcsb_S2HYlwe8_L34Xb_psmMsqrtfy6UJLPptE" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000006996" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000006996" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000006996" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:38:50" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "a74a5fdf-21e1-4178-b169-ba2bc98eb710" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053850Z:a74a5fdf-21e1-4178-b169-ba2bc98eb710" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:54:04 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0484EC074C0541DBA88EFDEE5EC6AD27 Ref B: SEL221051504035 Ref C: 2024-04-30T05:38:48Z" ], + "Date": [ "Tue, 30 Apr 2024 05:38:49 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -251,20 +275,20 @@ "isContentBase64": false } }, - "Remove-AzServiceBusPrivateEndpointConnection+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00/operationStatus/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview\u0026operationType=Delete+3": { + "Remove-AzServiceBusPrivateEndpointConnection+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1/operationStatus/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview\u0026operationType=Delete\u0026t=638500523307593173\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=El4PA0J1xkixsz4EeDmy66tfsnrgn84acmE2nd1sTZlemLe6yFVZyybEqJhqqT8xDa3L4vmhcB0eRzYdq2Ki7EXohqMrvIc2Lcn2l9Oro4qhD6HQHn-87m6pkwaD-e40O8cDVEPaH5hVDkoYAMJYZ2YdN6HskfsinJqOnakbY8GUu0D4yRJdTZ88kWnxQkiHEyAp6vFGF-3QGTK3J9XAdkPA_Zdr55caBiTUb1xR8t9b56iXbrO9YKdn9xdxAgLC2j7xmCH2CQ_4_AIQ42584SFunwi9zwG4tUMiqGAOMWdlKtRv-nBGhoOmskSppzv9d86sCackqhOVgqVmG3h0NQ\u0026h=OreCBWcsb_S2HYlwe8_L34Xb_psmMsqrtfy6UJLPptE+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00/operationStatus/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview\u0026operationType=Delete", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1/operationStatus/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview\u0026operationType=Delete\u0026t=638500523307593173\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=El4PA0J1xkixsz4EeDmy66tfsnrgn84acmE2nd1sTZlemLe6yFVZyybEqJhqqT8xDa3L4vmhcB0eRzYdq2Ki7EXohqMrvIc2Lcn2l9Oro4qhD6HQHn-87m6pkwaD-e40O8cDVEPaH5hVDkoYAMJYZ2YdN6HskfsinJqOnakbY8GUu0D4yRJdTZ88kWnxQkiHEyAp6vFGF-3QGTK3J9XAdkPA_Zdr55caBiTUb1xR8t9b56iXbrO9YKdn9xdxAgLC2j7xmCH2CQ_4_AIQ42584SFunwi9zwG4tUMiqGAOMWdlKtRv-nBGhoOmskSppzv9d86sCackqhOVgqVmG3h0NQ\u0026h=OreCBWcsb_S2HYlwe8_L34Xb_psmMsqrtfy6UJLPptE", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "216" ], - "x-ms-client-request-id": [ "dbc8e06f-466a-4dbe-b382-e277b11bd2d5" ], + "x-ms-unique-id": [ "172" ], + "x-ms-client-request-id": [ "6e82f429-bbf7-4231-8a08-9d33917cbf04" ], "CommandName": [ "Remove-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Remove-AzServiceBusPrivateEndpointConnection_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -274,38 +298,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b65961e9-593b-466a-bfa9-4578fb37a7f1_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11808" ], - "x-ms-correlation-request-id": [ "26c02ae5-7904-4c5d-834f-6fb06dfdc2fb" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135435Z:26c02ae5-7904-4c5d-834f-6fb06dfdc2fb" ], + "x-ms-correlation-request-id": [ "a0cf2f2a-e559-48d3-a89b-3ed1a0958a2b" ], + "x-ms-client-request-id": [ "6e82f429-bbf7-4231-8a08-9d33917cbf04_RP" ], + "x-ms-messaging-activity-id": [ "1c6d71ca-a85a-48e9-b4c1-0f0a81bf374a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:39:22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "a0cf2f2a-e559-48d3-a89b-3ed1a0958a2b" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053922Z:a0cf2f2a-e559-48d3-a89b-3ed1a0958a2b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:54:34 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9194E42EECA8440386D8D99DCC9CE7BD Ref B: SEL221051504035 Ref C: 2024-04-30T05:39:20Z" ], + "Date": [ "Tue, 30 Apr 2024 05:39:21 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "470" ], + "Content-Length": [ "404" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00/operationStatus/77566733-2ab6-455d-972d-793c5a451f00/operationStatus/77566733-2ab6-455d-972d-793c5a451f00\",\"name\":\"77566733-2ab6-455d-972d-793c5a451f00\",\"status\":\"Succeeded\",\"startTime\":\"0001-01-01T00:00:00Z\",\"endTime\":\"0001-01-01T00:00:00Z\"}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1/operationStatus/0cdc460f-521b-4bab-9966-021aec7ff1e1/operationStatus/0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"name\":\"0cdc460f-521b-4bab-9966-021aec7ff1e1\",\"status\":\"Succeeded\"}", "isContentBase64": false } }, - "Remove-AzServiceBusPrivateEndpointConnection+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview+4": { + "Remove-AzServiceBusPrivateEndpointConnection+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/privateEndpointConnections/77566733-2ab6-455d-972d-793c5a451f00?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/privateEndpointConnections/0cdc460f-521b-4bab-9966-021aec7ff1e1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "217" ], - "x-ms-client-request-id": [ "00a7b4cc-6128-4fd0-8784-eb336b4c8384" ], + "x-ms-unique-id": [ "173" ], + "x-ms-client-request-id": [ "e1ceb1aa-f90d-4cf3-a55b-b5c41478e689" ], "CommandName": [ "Get-AzServiceBusPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzServiceBusPrivateEndpointConnection_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -316,22 +344,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "33ad5501-46a5-4286-9750-950352e1c881_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11807" ], - "x-ms-correlation-request-id": [ "512c97e5-8402-4f21-a986-e59bed44758e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135435Z:512c97e5-8402-4f21-a986-e59bed44758e" ], + "x-ms-correlation-request-id": [ "648ed3e2-7943-445b-8d53-3e85ce61850a" ], + "x-ms-client-request-id": [ "e1ceb1aa-f90d-4cf3-a55b-b5c41478e689_RP" ], + "x-ms-messaging-activity-id": [ "fcc33e56-e78a-4ca2-8112-8356eece635a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T05:39:24" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "648ed3e2-7943-445b-8d53-3e85ce61850a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053924Z:648ed3e2-7943-445b-8d53-3e85ce61850a" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:54:35 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8B3B84809C0E432F994BF133C7898EBB Ref B: SEL221051504035 Ref C: 2024-04-30T05:39:22Z" ], + "Date": [ "Tue, 30 Apr 2024 05:39:23 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "169" ], - "Content-Type": [ "application/json; charset=utf-8" ], + "Content-Length": [ "105" ], + "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"error\":{\"message\":\"The requested resource 77566733-2ab6-455d-972d-793c5a451f00 does not exist. CorrelationId: 512c97e5-8402-4f21-a986-e59bed44758e\",\"code\":\"NotFound\"}}", + "Content": "{\"error\":{\"code\":\"PrivateEndpointConnectionNotFound\",\"message\":\"Private endpoint connection not found.\"}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusPrivateEndpointConnection.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusPrivateEndpointConnection.Tests.ps1 index 6a75ddcacb32..fc0bfe467317 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusPrivateEndpointConnection.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusPrivateEndpointConnection.Tests.ps1 @@ -18,12 +18,12 @@ Describe 'Remove-AzServiceBusPrivateEndpointConnection' { $listOfPrivateEndpoints = Get-AzServiceBusPrivateEndpointConnection -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace It 'Delete' { Remove-AzServiceBusPrivateEndpointConnection -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name $listOfPrivateEndpoints[0].Name - { Get-AzServiceBusPrivateEndpointConnection -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name $listOfPrivateEndpoints[0].Name } | Should -Throw + { Get-AzServiceBusPrivateEndpointConnection -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name $listOfPrivateEndpoints[0].Name -ErrorAction Stop } | Should -Throw } It 'DeleteViaIdentity' { $privateEndpoint = Get-AzServiceBusPrivateEndpointConnection -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name $listOfPrivateEndpoints[1].Name Remove-AzServiceBusPrivateEndpointConnection -InputObject $privateEndpoint - { Get-AzServiceBusPrivateEndpointConnection -InputObject $privateEndpoint } | Should -Throw + { Get-AzServiceBusPrivateEndpointConnection -InputObject $privateEndpoint -ErrorAction Stop } | Should -Throw } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusQueue.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusQueue.Recording.json index fdee5ba5f1ef..ea5a2f0e740a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusQueue.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusQueue.Recording.json @@ -1,8 +1,8 @@ { - "Remove-AzServiceBusQueue+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queueToRemove?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusQueue+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queueToRemove?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queueToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queueToRemove?api-version=2022-10-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -17,37 +17,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1173" ], - "x-ms-request-id": [ "49e2d140-ce6d-495e-88d8-cef4e5f70d6d" ], - "x-ms-correlation-request-id": [ "49e2d140-ce6d-495e-88d8-cef4e5f70d6d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135451Z:49e2d140-ce6d-495e-88d8-cef4e5f70d6d" ], + "x-ms-correlation-request-id": [ "b32151a3-95e6-4210-95bb-24710ee6841d" ], + "x-ms-client-request-id": [ "a988a0b6-f61d-42cd-8945-a62bb6b3a8b9_RP" ], + "x-ms-messaging-activity-id": [ "73c7f016-5017-4336-acd8-cbed78877ed1" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:39:41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "b32151a3-95e6-4210-95bb-24710ee6841d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053941Z:b32151a3-95e6-4210-95bb-24710ee6841d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:54:51 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FF92D61ED1874BC6ACEDFAD58D6A8785 Ref B: SEL221051504035 Ref C: 2024-04-30T05:39:38Z" ], + "Date": [ "Tue, 30 Apr 2024 05:39:41 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1041" ], + "Content-Length": [ "1042" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queueToRemove\",\"name\":\"queueToRemove\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:54:51.153Z\",\"updatedAt\":\"2023-02-19T13:54:51.34Z\",\"accessedAt\":\"0001-01-01T00:00:00\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queueToRemove\",\"name\":\"queueToRemove\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:39:41.29Z\",\"updatedAt\":\"2024-04-30T05:39:41.52Z\",\"accessedAt\":\"0001-01-01T00:00:00\"}}", "isContentBase64": false } }, - "Remove-AzServiceBusQueue+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queueToRemove?api-version=2022-10-01-preview+2": { + "Remove-AzServiceBusQueue+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queueToRemove?api-version=2022-10-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queueToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queueToRemove?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "219" ], - "x-ms-client-request-id": [ "d95ca796-3318-46be-8bda-ad9e7f72b20f" ], + "x-ms-unique-id": [ "175" ], + "x-ms-client-request-id": [ "9345cbbc-dd41-46b8-bfdf-41dffc511d09" ], "CommandName": [ "Remove-AzServiceBusQueue" ], "FullCommandName": [ "Remove-AzServiceBusQueue_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -58,14 +63,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14989" ], - "x-ms-request-id": [ "01a29fd5-bfa8-4b0b-8659-5064d08759d7" ], - "x-ms-correlation-request-id": [ "01a29fd5-bfa8-4b0b-8659-5064d08759d7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135453Z:01a29fd5-bfa8-4b0b-8659-5064d08759d7" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005260" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005260" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005260" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:39:44" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "cef3009b-fd0d-4bfd-b863-9a54eeebb943" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053944Z:cef3009b-fd0d-4bfd-b863-9a54eeebb943" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:54:52 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EEE03E66DA1C4B45B3C42CBF10009647 Ref B: SEL221051504035 Ref C: 2024-04-30T05:39:42Z" ], + "Date": [ "Tue, 30 Apr 2024 05:39:43 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -75,19 +85,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusQueue+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queueToRemove?api-version=2022-10-01-preview+3": { + "Remove-AzServiceBusQueue+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queueToRemove?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queueToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queueToRemove?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "220" ], - "x-ms-client-request-id": [ "1f1ad0dc-1ad3-428b-bae2-5dc5d1b3a359" ], + "x-ms-unique-id": [ "176" ], + "x-ms-client-request-id": [ "e9b89b5f-b4f7-4545-b0f7-114710ff654e" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -98,14 +108,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11806" ], - "x-ms-request-id": [ "db7a0c01-bac9-4b62-8f21-b8b4376f93b2" ], - "x-ms-correlation-request-id": [ "db7a0c01-bac9-4b62-8f21-b8b4376f93b2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135454Z:db7a0c01-bac9-4b62-8f21-b8b4376f93b2" ], + "x-ms-correlation-request-id": [ "11e8b18f-559d-4189-9abf-62db58e2d202" ], + "x-ms-client-request-id": [ "e9b89b5f-b4f7-4545-b0f7-114710ff654e_RP" ], + "x-ms-messaging-activity-id": [ "9f358195-8726-42e1-9a34-d4c1f86be79b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T05:39:46" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "11e8b18f-559d-4189-9abf-62db58e2d202" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T053946Z:11e8b18f-559d-4189-9abf-62db58e2d202" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:54:54 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0CF53CC8F0364A71A79B99847A6E1832 Ref B: SEL221051504035 Ref C: 2024-04-30T05:39:44Z" ], + "Date": [ "Tue, 30 Apr 2024 05:39:45 GMT" ] }, "ContentHeaders": { "Content-Length": [ "68" ], @@ -116,10 +131,10 @@ "isContentBase64": false } }, - "Remove-AzServiceBusQueue+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queueToRemove?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusQueue+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queueToRemove?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queueToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queueToRemove?api-version=2022-10-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -134,37 +149,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1172" ], - "x-ms-request-id": [ "f0ffa915-b359-4243-983e-d08ac18c9b16" ], - "x-ms-correlation-request-id": [ "f0ffa915-b359-4243-983e-d08ac18c9b16" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135456Z:f0ffa915-b359-4243-983e-d08ac18c9b16" ], + "x-ms-correlation-request-id": [ "c9ff46e8-3f73-4499-8212-aad7131c18bb" ], + "x-ms-client-request-id": [ "270ad849-eb7c-4b96-9dae-4717afe00fed_RP" ], + "x-ms-messaging-activity-id": [ "b17592af-6657-4a2e-9d54-dc7ee484b5e0" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:39:50" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "c9ff46e8-3f73-4499-8212-aad7131c18bb" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053950Z:c9ff46e8-3f73-4499-8212-aad7131c18bb" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:54:56 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 72D7AB6997644D979A77A71EB6A6CE3E Ref B: SEL221051504035 Ref C: 2024-04-30T05:39:46Z" ], + "Date": [ "Tue, 30 Apr 2024 05:39:49 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1041" ], + "Content-Length": [ "1044" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queueToRemove\",\"name\":\"queueToRemove\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:54:56.263Z\",\"updatedAt\":\"2023-02-19T13:54:56.34Z\",\"accessedAt\":\"0001-01-01T00:00:00\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queueToRemove\",\"name\":\"queueToRemove\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:39:50.183Z\",\"updatedAt\":\"2024-04-30T05:39:50.273Z\",\"accessedAt\":\"0001-01-01T00:00:00\"}}", "isContentBase64": false } }, - "Remove-AzServiceBusQueue+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queueToRemove?api-version=2022-10-01-preview+2": { + "Remove-AzServiceBusQueue+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queueToRemove?api-version=2022-10-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queueToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queueToRemove?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "222" ], - "x-ms-client-request-id": [ "c38d958a-69ee-4417-af7f-866f8c50c494" ], + "x-ms-unique-id": [ "178" ], + "x-ms-client-request-id": [ "be998651-c5c9-4eee-9d81-db41e02d0734" ], "CommandName": [ "Remove-AzServiceBusQueue" ], "FullCommandName": [ "Remove-AzServiceBusQueue_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -175,14 +195,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14988" ], - "x-ms-request-id": [ "b272245d-aca0-4975-914e-262aa31d9b12" ], - "x-ms-correlation-request-id": [ "b272245d-aca0-4975-914e-262aa31d9b12" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135458Z:b272245d-aca0-4975-914e-262aa31d9b12" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000006216" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000006216" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000006216" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T05:39:54" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "2b6f650d-10f1-4dd7-9223-800583e27886" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T053954Z:2b6f650d-10f1-4dd7-9223-800583e27886" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:54:58 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FD173CA879984FBEAD0A6E72DDD66603 Ref B: SEL221051504035 Ref C: 2024-04-30T05:39:50Z" ], + "Date": [ "Tue, 30 Apr 2024 05:39:53 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -192,19 +217,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusQueue+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queueToRemove?api-version=2022-10-01-preview+3": { + "Remove-AzServiceBusQueue+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queueToRemove?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queueToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queueToRemove?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "223" ], - "x-ms-client-request-id": [ "e62afecb-0e69-435b-bafe-28a1b1e4519b" ], + "x-ms-unique-id": [ "179" ], + "x-ms-client-request-id": [ "f47786bd-4cca-4a5f-82a4-69449a595fef" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -215,14 +240,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11805" ], - "x-ms-request-id": [ "fce70c6e-63fb-40dd-a0ea-8ad47537e918" ], - "x-ms-correlation-request-id": [ "fce70c6e-63fb-40dd-a0ea-8ad47537e918" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135459Z:fce70c6e-63fb-40dd-a0ea-8ad47537e918" ], + "x-ms-correlation-request-id": [ "c72058a4-d18d-4ce2-93ba-0dc628a50ac9" ], + "x-ms-client-request-id": [ "f47786bd-4cca-4a5f-82a4-69449a595fef_RP" ], + "x-ms-messaging-activity-id": [ "c72cb8b9-ceb3-421a-bcf0-2081ef9101d3" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:39:56" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "c72058a4-d18d-4ce2-93ba-0dc628a50ac9" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T053956Z:c72058a4-d18d-4ce2-93ba-0dc628a50ac9" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:54:59 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3536B7BDE3834BAB8B3905FC1723169E Ref B: SEL221051504035 Ref C: 2024-04-30T05:39:54Z" ], + "Date": [ "Tue, 30 Apr 2024 05:39:55 GMT" ] }, "ContentHeaders": { "Content-Length": [ "68" ], diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusQueue.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusQueue.Tests.ps1 index cf547b350ca7..e84a598bf812 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusQueue.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusQueue.Tests.ps1 @@ -18,12 +18,12 @@ Describe 'Remove-AzServiceBusQueue' { It 'Delete' { New-AzServiceBusQueue -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name queueToRemove Remove-AzServiceBusQueue -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name queueToRemove - { Get-AzServiceBusQueue -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name queueToRemove } | Should -Throw + { Get-AzServiceBusQueue -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name queueToRemove -ErrorAction Stop } | Should -Throw } It 'DeleteViaIdentity' { $queue = New-AzServiceBusQueue -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name queueToRemove Remove-AzServiceBusQueue -InputObject $queue - { Get-AzServiceBusQueue -InputObject $queue } | Should -Throw + { Get-AzServiceBusQueue -InputObject $queue -ErrorAction Stop } | Should -Throw } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusRule.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusRule.Recording.json index 92d2d6fb8ef3..08171b6ba90f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusRule.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusRule.Recording.json @@ -1,8 +1,8 @@ { - "Remove-AzServiceBusRule+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusRule+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -17,37 +17,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1171" ], - "x-ms-request-id": [ "b84743e4-8e7d-40fc-9c40-276a6cec933f" ], - "x-ms-correlation-request-id": [ "b84743e4-8e7d-40fc-9c40-276a6cec933f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135515Z:b84743e4-8e7d-40fc-9c40-276a6cec933f" ], + "x-ms-correlation-request-id": [ "8110e7c7-3569-45f3-93b2-f0094c072031" ], + "x-ms-client-request-id": [ "13fffe0a-df6e-4dfe-b648-62c746b87df2_RP" ], + "x-ms-messaging-activity-id": [ "5f4fd928-f7d7-44b8-9601-0e224ee06f9c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T05:40:14" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "8110e7c7-3569-45f3-93b2-f0094c072031" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054014Z:8110e7c7-3569-45f3-93b2-f0094c072031" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:55:14 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: AE5C784842C549AF955A969682F85F29 Ref B: SEL221051504035 Ref C: 2024-04-30T05:40:10Z" ], + "Date": [ "Tue, 30 Apr 2024 05:40:13 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "470" ], + "Content-Length": [ "472" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove\",\"name\":\"sqlRuleToRemove\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"SqlFilter\",\"sqlFilter\":{\"sqlExpression\":\"1=1\",\"compatibilityLevel\":20,\"parameters\":{}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove\",\"name\":\"sqlRuleToRemove\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"SqlFilter\",\"sqlFilter\":{\"sqlExpression\":\"1=1\",\"compatibilityLevel\":20,\"parameters\":{}}}}", "isContentBase64": false } }, - "Remove-AzServiceBusRule+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview+2": { + "Remove-AzServiceBusRule+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "225" ], - "x-ms-client-request-id": [ "4aa3f4d0-0e3c-429f-8cfa-28158ce04e68" ], + "x-ms-unique-id": [ "181" ], + "x-ms-client-request-id": [ "9bf6d4f7-0600-4457-bb45-a2f3646a4393" ], "CommandName": [ "Remove-AzServiceBusRule" ], "FullCommandName": [ "Remove-AzServiceBusRule_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -58,14 +63,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14987" ], - "x-ms-request-id": [ "a6dbaffa-e534-4aac-97c7-df0f9df02861" ], - "x-ms-correlation-request-id": [ "a6dbaffa-e534-4aac-97c7-df0f9df02861" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135515Z:a6dbaffa-e534-4aac-97c7-df0f9df02861" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000002544" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000002544" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000002544" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T05:40:16" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "406b275c-c3a1-4604-8d51-471fe04ea5de" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054016Z:406b275c-c3a1-4604-8d51-471fe04ea5de" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:55:15 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E27A0B243C4E41A5A82C4A0B0D7EFA90 Ref B: SEL221051504035 Ref C: 2024-04-30T05:40:14Z" ], + "Date": [ "Tue, 30 Apr 2024 05:40:15 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -75,19 +85,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusRule+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview+3": { + "Remove-AzServiceBusRule+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "226" ], - "x-ms-client-request-id": [ "5cff0938-dd97-4612-88f7-bdd6b658c37e" ], + "x-ms-unique-id": [ "182" ], + "x-ms-client-request-id": [ "5fad7d03-d4b0-4a70-b7bb-5c98c07705c5" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -98,14 +108,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11804" ], - "x-ms-request-id": [ "99cb349d-63c0-44a9-86e6-a95f3340c94e" ], - "x-ms-correlation-request-id": [ "99cb349d-63c0-44a9-86e6-a95f3340c94e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135517Z:99cb349d-63c0-44a9-86e6-a95f3340c94e" ], + "x-ms-correlation-request-id": [ "ee9b3329-c3bd-4b17-bc32-b0a368f18b45" ], + "x-ms-client-request-id": [ "5fad7d03-d4b0-4a70-b7bb-5c98c07705c5_RP" ], + "x-ms-messaging-activity-id": [ "4918211b-f2c9-4e9f-9180-71a157f3cd7d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:40:18" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "ee9b3329-c3bd-4b17-bc32-b0a368f18b45" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054018Z:ee9b3329-c3bd-4b17-bc32-b0a368f18b45" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:55:16 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 42DCE89F3A664831B5EEEF636C5692F3 Ref B: SEL221051504035 Ref C: 2024-04-30T05:40:16Z" ], + "Date": [ "Tue, 30 Apr 2024 05:40:17 GMT" ] }, "ContentHeaders": { "Content-Length": [ "73" ], @@ -116,10 +131,10 @@ "isContentBase64": false } }, - "Remove-AzServiceBusRule+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusRule+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -134,37 +149,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1170" ], - "x-ms-request-id": [ "941fe237-b6cb-4f40-a5ef-60b39dd8883f" ], - "x-ms-correlation-request-id": [ "941fe237-b6cb-4f40-a5ef-60b39dd8883f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135519Z:941fe237-b6cb-4f40-a5ef-60b39dd8883f" ], + "x-ms-correlation-request-id": [ "af15209d-c1b6-46fb-85f8-f9969eb5d487" ], + "x-ms-client-request-id": [ "48a1c6d2-9965-4c2c-9aaa-7cee4b39813d_RP" ], + "x-ms-messaging-activity-id": [ "bbcdacd2-873d-4c97-897b-85632e491bb9" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T05:40:21" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "af15209d-c1b6-46fb-85f8-f9969eb5d487" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054021Z:af15209d-c1b6-46fb-85f8-f9969eb5d487" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:55:19 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D0E71D235BD94D97AB779542A10FBB3F Ref B: SEL221051504035 Ref C: 2024-04-30T05:40:18Z" ], + "Date": [ "Tue, 30 Apr 2024 05:40:20 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "470" ], + "Content-Length": [ "472" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove\",\"name\":\"sqlRuleToRemove\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"SqlFilter\",\"sqlFilter\":{\"sqlExpression\":\"1=1\",\"compatibilityLevel\":20,\"parameters\":{}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove\",\"name\":\"sqlRuleToRemove\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"SqlFilter\",\"sqlFilter\":{\"sqlExpression\":\"1=1\",\"compatibilityLevel\":20,\"parameters\":{}}}}", "isContentBase64": false } }, - "Remove-AzServiceBusRule+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview+2": { + "Remove-AzServiceBusRule+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "228" ], - "x-ms-client-request-id": [ "fd3e17bc-05a4-442a-876e-290d19024c29" ], + "x-ms-unique-id": [ "184" ], + "x-ms-client-request-id": [ "fb1c9ab4-010f-4c73-b697-cae1e5e59277" ], "CommandName": [ "Remove-AzServiceBusRule" ], "FullCommandName": [ "Remove-AzServiceBusRule_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -175,14 +195,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14986" ], - "x-ms-request-id": [ "10a445a1-0a68-4c13-8bbf-d38e18276585" ], - "x-ms-correlation-request-id": [ "10a445a1-0a68-4c13-8bbf-d38e18276585" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135520Z:10a445a1-0a68-4c13-8bbf-d38e18276585" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005992" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005992" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005992" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T05:40:23" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "28f01db3-b11e-4851-b1f4-54252b94e5d3" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054023Z:28f01db3-b11e-4851-b1f4-54252b94e5d3" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:55:19 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D0B3749DCB964B7B8916E4C7C517C244 Ref B: SEL221051504035 Ref C: 2024-04-30T05:40:21Z" ], + "Date": [ "Tue, 30 Apr 2024 05:40:22 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -192,19 +217,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusRule+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview+3": { + "Remove-AzServiceBusRule+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRuleToRemove?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "229" ], - "x-ms-client-request-id": [ "2fc14b5a-bc94-4ec1-8e0c-65b7320e294d" ], + "x-ms-unique-id": [ "185" ], + "x-ms-client-request-id": [ "50483e9c-51d8-4458-9927-f9c3981e919d" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -215,14 +240,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11803" ], - "x-ms-request-id": [ "ddf0d8fc-8285-452e-90b5-768fb3e988d3" ], - "x-ms-correlation-request-id": [ "ddf0d8fc-8285-452e-90b5-768fb3e988d3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135522Z:ddf0d8fc-8285-452e-90b5-768fb3e988d3" ], + "x-ms-correlation-request-id": [ "3802b588-4a70-4ae9-a51c-78465c167118" ], + "x-ms-client-request-id": [ "50483e9c-51d8-4458-9927-f9c3981e919d_RP" ], + "x-ms-messaging-activity-id": [ "d97720d0-f633-482c-96e4-918e094f1174" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:40:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "3802b588-4a70-4ae9-a51c-78465c167118" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054025Z:3802b588-4a70-4ae9-a51c-78465c167118" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:55:21 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 96518589B7614354B4A4B46CB9DB2F68 Ref B: SEL221051504035 Ref C: 2024-04-30T05:40:23Z" ], + "Date": [ "Tue, 30 Apr 2024 05:40:25 GMT" ] }, "ContentHeaders": { "Content-Length": [ "73" ], diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusRule.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusRule.Tests.ps1 index 15f582fd8c34..fc48f749ac6d 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusRule.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusRule.Tests.ps1 @@ -18,12 +18,12 @@ Describe 'Remove-AzServiceBusRule' { It 'Delete' { New-AzServiceBusRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 -SubscriptionName subscription1 -Name sqlRuleToRemove Remove-AzServiceBusRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 -SubscriptionName subscription1 -Name sqlRuleToRemove - { Get-AzServiceBusRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 -SubscriptionName subscription1 -Name sqlRuleToRemove } | Should -Throw + { Get-AzServiceBusRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 -SubscriptionName subscription1 -Name sqlRuleToRemove -ErrorAction Stop } | Should -Throw } It 'DeleteViaIdentity' { $rule = New-AzServiceBusRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 -SubscriptionName subscription1 -Name sqlRuleToRemove Remove-AzServiceBusRule -InputObject $rule - { Get-AzServiceBusRule -InputObject $rule } | Should -Throw + { Get-AzServiceBusRule -InputObject $rule -ErrorAction Stop } | Should -Throw } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusSubscription.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusSubscription.Recording.json index e4777a115b5f..918ed1237ac9 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusSubscription.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusSubscription.Recording.json @@ -1,8 +1,8 @@ { - "Remove-AzServiceBusSubscription+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusSubscription+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -17,37 +17,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1169" ], - "x-ms-request-id": [ "88fe1aaf-918d-4b75-94af-55ee9830da70" ], - "x-ms-correlation-request-id": [ "88fe1aaf-918d-4b75-94af-55ee9830da70" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135536Z:88fe1aaf-918d-4b75-94af-55ee9830da70" ], + "x-ms-correlation-request-id": [ "7dfc26e5-9087-46ad-a1f7-c522918775ad" ], + "x-ms-client-request-id": [ "fd0f3007-bfb6-4196-ba0a-5245f87dd4d1_RP" ], + "x-ms-messaging-activity-id": [ "7fffba2b-aee1-4ee3-afdf-5cc31287576a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:40:42" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "7dfc26e5-9087-46ad-a1f7-c522918775ad" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054042Z:7dfc26e5-9087-46ad-a1f7-c522918775ad" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:55:35 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FC79B708BEA74548985A4782D556B845 Ref B: SEL221051504035 Ref C: 2024-04-30T05:40:39Z" ], + "Date": [ "Tue, 30 Apr 2024 05:40:41 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "948" ], + "Content-Length": [ "950" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subToRemove\",\"name\":\"subToRemove\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T13:55:36.5159004Z\",\"updatedAt\":\"2023-02-19T13:55:36.5159004Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subToRemove\",\"name\":\"subToRemove\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T05:40:42.5175678Z\",\"updatedAt\":\"2024-04-30T05:40:42.5175678Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", "isContentBase64": false } }, - "Remove-AzServiceBusSubscription+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview+2": { + "Remove-AzServiceBusSubscription+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "231" ], - "x-ms-client-request-id": [ "d4eece41-6cb8-48ea-9971-7c04b73872c6" ], + "x-ms-unique-id": [ "187" ], + "x-ms-client-request-id": [ "a16247f4-fcd0-4d2b-ad97-7588d475ca14" ], "CommandName": [ "Remove-AzServiceBusSubscription" ], "FullCommandName": [ "Remove-AzServiceBusSubscription_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -58,14 +63,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14985" ], - "x-ms-request-id": [ "fd35a322-10ea-4658-874b-c174c9587abd" ], - "x-ms-correlation-request-id": [ "fd35a322-10ea-4658-874b-c174c9587abd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135537Z:fd35a322-10ea-4658-874b-c174c9587abd" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000006996" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000006996" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000006996" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:40:43" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "d12333d4-971a-4ad6-9fe4-30bfad4d6258" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054043Z:d12333d4-971a-4ad6-9fe4-30bfad4d6258" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:55:36 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E9BD780729324399A484DD258402F1B5 Ref B: SEL221051504035 Ref C: 2024-04-30T05:40:42Z" ], + "Date": [ "Tue, 30 Apr 2024 05:40:42 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -75,19 +85,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusSubscription+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview+3": { + "Remove-AzServiceBusSubscription+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "232" ], - "x-ms-client-request-id": [ "6d5541d5-8607-4f78-97c4-b32f4224aca5" ], + "x-ms-unique-id": [ "188" ], + "x-ms-client-request-id": [ "ad75fb40-c513-4a56-be8f-d59eead12526" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -98,14 +108,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11802" ], - "x-ms-request-id": [ "06f8d173-7c92-4fde-892c-310f729f3c2b" ], - "x-ms-correlation-request-id": [ "06f8d173-7c92-4fde-892c-310f729f3c2b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135539Z:06f8d173-7c92-4fde-892c-310f729f3c2b" ], + "x-ms-correlation-request-id": [ "69fee2e0-c44b-462b-b832-e711bea482bd" ], + "x-ms-client-request-id": [ "ad75fb40-c513-4a56-be8f-d59eead12526_RP" ], + "x-ms-messaging-activity-id": [ "8c94da17-6234-4e86-b80d-3634c30bb88d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:40:44" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], + "x-ms-request-id": [ "69fee2e0-c44b-462b-b832-e711bea482bd" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054044Z:69fee2e0-c44b-462b-b832-e711bea482bd" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:55:38 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 794582380D6D4069985EEE54EE2A07EF Ref B: SEL221051504035 Ref C: 2024-04-30T05:40:43Z" ], + "Date": [ "Tue, 30 Apr 2024 05:40:43 GMT" ] }, "ContentHeaders": { "Content-Length": [ "81" ], @@ -116,10 +131,10 @@ "isContentBase64": false } }, - "Remove-AzServiceBusSubscription+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusSubscription+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -134,37 +149,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1168" ], - "x-ms-request-id": [ "86d35aa0-298d-433f-9203-c74a5cee18e8" ], - "x-ms-correlation-request-id": [ "86d35aa0-298d-433f-9203-c74a5cee18e8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135540Z:86d35aa0-298d-433f-9203-c74a5cee18e8" ], + "x-ms-correlation-request-id": [ "73d1d014-df0a-4097-87a2-a4377e6e6c78" ], + "x-ms-client-request-id": [ "bd7fc173-8775-40a0-8f49-bf11af3e7d6e_RP" ], + "x-ms-messaging-activity-id": [ "b906b0ec-b0f4-4dd0-990c-895db6208cc7" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T05:40:47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "73d1d014-df0a-4097-87a2-a4377e6e6c78" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054047Z:73d1d014-df0a-4097-87a2-a4377e6e6c78" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:55:39 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4C850ED5A7834328BC3C68440B7052BA Ref B: SEL221051504035 Ref C: 2024-04-30T05:40:44Z" ], + "Date": [ "Tue, 30 Apr 2024 05:40:46 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "948" ], + "Content-Length": [ "950" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subToRemove\",\"name\":\"subToRemove\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T13:55:40.5002987Z\",\"updatedAt\":\"2023-02-19T13:55:40.5002987Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subToRemove\",\"name\":\"subToRemove\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T05:40:47.5383232Z\",\"updatedAt\":\"2024-04-30T05:40:47.5383232Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", "isContentBase64": false } }, - "Remove-AzServiceBusSubscription+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview+2": { + "Remove-AzServiceBusSubscription+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "234" ], - "x-ms-client-request-id": [ "e4e8daeb-dd14-49cd-a99a-9aa51578ca5a" ], + "x-ms-unique-id": [ "190" ], + "x-ms-client-request-id": [ "86b319cf-a5f6-4b6c-ab25-32ea4e1e788b" ], "CommandName": [ "Remove-AzServiceBusSubscription" ], "FullCommandName": [ "Remove-AzServiceBusSubscription_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -175,14 +195,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14984" ], - "x-ms-request-id": [ "5f910c70-e70a-4822-ae21-5df1d34bfc12" ], - "x-ms-correlation-request-id": [ "5f910c70-e70a-4822-ae21-5df1d34bfc12" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135541Z:5f910c70-e70a-4822-ae21-5df1d34bfc12" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000001728" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000001728" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000001728" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T05:40:49" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "d8a86004-585c-4f11-bf37-ce987646a885" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T054049Z:d8a86004-585c-4f11-bf37-ce987646a885" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:55:41 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9B7B63BCB6F741EDA5508EABB0B1A236 Ref B: SEL221051504035 Ref C: 2024-04-30T05:40:47Z" ], + "Date": [ "Tue, 30 Apr 2024 05:40:48 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -192,19 +217,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusSubscription+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview+3": { + "Remove-AzServiceBusSubscription+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subToRemove?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "235" ], - "x-ms-client-request-id": [ "b030b712-85aa-4abf-81b9-79d2f6e10821" ], + "x-ms-unique-id": [ "191" ], + "x-ms-client-request-id": [ "f01a9287-b3c6-4e2a-a68d-9be35fc74826" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -215,14 +240,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11801" ], - "x-ms-request-id": [ "de8695ea-b965-475b-9be4-a9befc8879df" ], - "x-ms-correlation-request-id": [ "de8695ea-b965-475b-9be4-a9befc8879df" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135542Z:de8695ea-b965-475b-9be4-a9befc8879df" ], + "x-ms-correlation-request-id": [ "d3fb02b4-6d4c-43b2-b582-e83bc001e349" ], + "x-ms-client-request-id": [ "f01a9287-b3c6-4e2a-a68d-9be35fc74826_RP" ], + "x-ms-messaging-activity-id": [ "fab5f14c-e3f7-4099-afd6-4ad40e95b385" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:40:52" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "d3fb02b4-6d4c-43b2-b582-e83bc001e349" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T054052Z:d3fb02b4-6d4c-43b2-b582-e83bc001e349" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:55:42 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6216DFB0EA3C4D9DBE2F7BBE903B2A2D Ref B: SEL221051504035 Ref C: 2024-04-30T05:40:49Z" ], + "Date": [ "Tue, 30 Apr 2024 05:40:51 GMT" ] }, "ContentHeaders": { "Content-Length": [ "81" ], diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusSubscription.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusSubscription.Tests.ps1 index c1765be27964..8a4995ba4d41 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusSubscription.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusSubscription.Tests.ps1 @@ -18,12 +18,12 @@ Describe 'Remove-AzServiceBusSubscription' { It 'Delete' { New-AzServiceBusSubscription -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 -Name subToRemove Remove-AzServiceBusSubscription -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 -Name subToRemove - { Get-AzServiceBusSubscription -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 -Name subToRemove } | Should -Throw + { Get-AzServiceBusSubscription -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 -Name subToRemove -ErrorAction Stop } | Should -Throw } It 'DeleteViaIdentity' { $sub = New-AzServiceBusSubscription -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TopicName topic1 -Name subToRemove Remove-AzServiceBusSubscription -InputObject $sub - { Get-AzServiceBusSubscription -InputObject $sub } | Should -Throw + { Get-AzServiceBusSubscription -InputObject $sub -ErrorAction Stop } | Should -Throw } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusTopic.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusTopic.Recording.json index 601ca567d676..871636e4db2e 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusTopic.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusTopic.Recording.json @@ -1,8 +1,8 @@ { - "Remove-AzServiceBusTopic+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToRemove?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusTopic+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToRemove?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToRemove?api-version=2022-10-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -17,37 +17,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1167" ], - "x-ms-request-id": [ "e34e2c7b-5bd0-4823-b658-36f41a3a40a4" ], - "x-ms-correlation-request-id": [ "e34e2c7b-5bd0-4823-b658-36f41a3a40a4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135558Z:e34e2c7b-5bd0-4823-b658-36f41a3a40a4" ], + "x-ms-correlation-request-id": [ "97ef6d31-8016-458f-9c85-12d22b89b6e5" ], + "x-ms-client-request-id": [ "cf02596e-ed80-45ff-a9b8-c89bd7dad1f7_RP" ], + "x-ms-messaging-activity-id": [ "36f9c236-aaeb-4b9d-8473-1c488216b801" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T05:41:09" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "97ef6d31-8016-458f-9c85-12d22b89b6e5" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054109Z:97ef6d31-8016-458f-9c85-12d22b89b6e5" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:55:58 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FA27962056C646F7A3598C14688F45F0 Ref B: SEL221051504035 Ref C: 2024-04-30T05:41:05Z" ], + "Date": [ "Tue, 30 Apr 2024 05:41:08 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "957" ], + "Content-Length": [ "963" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToRemove\",\"name\":\"topicToRemove\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T13:55:57.917Z\",\"updatedAt\":\"2023-02-19T13:55:58Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToRemove\",\"name\":\"topicToRemove\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T05:41:08.867Z\",\"updatedAt\":\"2024-04-30T05:41:08.963Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Remove-AzServiceBusTopic+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToRemove?api-version=2022-10-01-preview+2": { + "Remove-AzServiceBusTopic+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToRemove?api-version=2022-10-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToRemove?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "237" ], - "x-ms-client-request-id": [ "37751aff-dbac-4f88-b782-2c6ad5b9fd1b" ], + "x-ms-unique-id": [ "193" ], + "x-ms-client-request-id": [ "c6a00eb7-3162-4726-a8a5-c86ed1033058" ], "CommandName": [ "Remove-AzServiceBusTopic" ], "FullCommandName": [ "Remove-AzServiceBusTopic_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -58,14 +63,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14983" ], - "x-ms-request-id": [ "1e65c065-05dc-46cb-998c-cfc55aad7167" ], - "x-ms-correlation-request-id": [ "1e65c065-05dc-46cb-998c-cfc55aad7167" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135559Z:1e65c065-05dc-46cb-998c-cfc55aad7167" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005980" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005980" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005980" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T05:41:12" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "43b77510-2fb2-44ef-853b-e630ce8f244b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054112Z:43b77510-2fb2-44ef-853b-e630ce8f244b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:55:59 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F62777CEA7FD4BCE997943DAF1EC3A22 Ref B: SEL221051504035 Ref C: 2024-04-30T05:41:10Z" ], + "Date": [ "Tue, 30 Apr 2024 05:41:11 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -75,19 +85,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusTopic+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToRemove?api-version=2022-10-01-preview+3": { + "Remove-AzServiceBusTopic+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToRemove?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToRemove?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "238" ], - "x-ms-client-request-id": [ "80951ecd-beac-440f-acb6-5de817dd10d9" ], + "x-ms-unique-id": [ "194" ], + "x-ms-client-request-id": [ "56103546-2896-4880-a584-baf428e8c7ef" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -98,14 +108,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11800" ], - "x-ms-request-id": [ "ed80a59b-e1b7-4fb3-b44e-47eff8bf738c" ], - "x-ms-correlation-request-id": [ "ed80a59b-e1b7-4fb3-b44e-47eff8bf738c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135601Z:ed80a59b-e1b7-4fb3-b44e-47eff8bf738c" ], + "x-ms-correlation-request-id": [ "28d17aea-518a-4529-9fe7-8362434e6b21" ], + "x-ms-client-request-id": [ "56103546-2896-4880-a584-baf428e8c7ef_RP" ], + "x-ms-messaging-activity-id": [ "bbd1c185-9ac2-449c-8593-5e267d3014c2" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T05:41:14" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "28d17aea-518a-4529-9fe7-8362434e6b21" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054115Z:28d17aea-518a-4529-9fe7-8362434e6b21" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:00 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3B552EA764C048729B7D5BCB3FB2D389 Ref B: SEL221051504035 Ref C: 2024-04-30T05:41:12Z" ], + "Date": [ "Tue, 30 Apr 2024 05:41:14 GMT" ] }, "ContentHeaders": { "Content-Length": [ "68" ], @@ -116,10 +131,10 @@ "isContentBase64": false } }, - "Remove-AzServiceBusTopic+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToRemove?api-version=2022-10-01-preview+1": { + "Remove-AzServiceBusTopic+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToRemove?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToRemove?api-version=2022-10-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -134,37 +149,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1166" ], - "x-ms-request-id": [ "143fb794-de26-42f9-9bed-0bab521dd3b4" ], - "x-ms-correlation-request-id": [ "143fb794-de26-42f9-9bed-0bab521dd3b4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135603Z:143fb794-de26-42f9-9bed-0bab521dd3b4" ], + "x-ms-correlation-request-id": [ "a6e88938-aad2-4974-91ac-03207a3f6647" ], + "x-ms-client-request-id": [ "c9b6f668-8d64-4fb7-87f4-57d69a6ffd75_RP" ], + "x-ms-messaging-activity-id": [ "4a877735-6871-4052-b423-9b78cf1f717f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T05:41:18" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "a6e88938-aad2-4974-91ac-03207a3f6647" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054118Z:a6e88938-aad2-4974-91ac-03207a3f6647" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:02 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9F27A9DABD0642BDAEB64903E9FC9C41 Ref B: SEL221051504035 Ref C: 2024-04-30T05:41:15Z" ], + "Date": [ "Tue, 30 Apr 2024 05:41:17 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "960" ], + "Content-Length": [ "962" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToRemove\",\"name\":\"topicToRemove\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T13:56:02.997Z\",\"updatedAt\":\"2023-02-19T13:56:03.08Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToRemove\",\"name\":\"topicToRemove\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T05:41:18.12Z\",\"updatedAt\":\"2024-04-30T05:41:18.217Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Remove-AzServiceBusTopic+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToRemove?api-version=2022-10-01-preview+2": { + "Remove-AzServiceBusTopic+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToRemove?api-version=2022-10-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToRemove?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "240" ], - "x-ms-client-request-id": [ "a594f9b6-6a78-421d-896a-3eb91cd9b323" ], + "x-ms-unique-id": [ "196" ], + "x-ms-client-request-id": [ "b60ac343-e55f-4a01-aa50-8070ff8ecff1" ], "CommandName": [ "Remove-AzServiceBusTopic" ], "FullCommandName": [ "Remove-AzServiceBusTopic_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -175,14 +195,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14982" ], - "x-ms-request-id": [ "5cf5b0ca-4136-45d7-89d5-7429cd50faa6" ], - "x-ms-correlation-request-id": [ "5cf5b0ca-4136-45d7-89d5-7429cd50faa6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135604Z:5cf5b0ca-4136-45d7-89d5-7429cd50faa6" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000006908" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000006908" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000006908" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T05:41:21" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "4bec150f-b082-4e19-83d4-d2efc24e8fed" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054121Z:4bec150f-b082-4e19-83d4-d2efc24e8fed" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:04 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F1BBEF2456C8488CBDC0DB1E0EADE13C Ref B: SEL221051504035 Ref C: 2024-04-30T05:41:19Z" ], + "Date": [ "Tue, 30 Apr 2024 05:41:20 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -192,19 +217,19 @@ "isContentBase64": false } }, - "Remove-AzServiceBusTopic+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToRemove?api-version=2022-10-01-preview+3": { + "Remove-AzServiceBusTopic+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToRemove?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToRemove?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToRemove?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "241" ], - "x-ms-client-request-id": [ "3099bceb-d03e-4d08-8787-82e79d054a5b" ], + "x-ms-unique-id": [ "197" ], + "x-ms-client-request-id": [ "16d36278-4eae-43f1-ad98-afeaf4def4c8" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -215,14 +240,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11799" ], - "x-ms-request-id": [ "250b2302-fcdf-418f-b74c-ec937bc4a2e5" ], - "x-ms-correlation-request-id": [ "250b2302-fcdf-418f-b74c-ec937bc4a2e5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135606Z:250b2302-fcdf-418f-b74c-ec937bc4a2e5" ], + "x-ms-correlation-request-id": [ "ac51b821-b64b-44c7-ae46-761fbf3a9bc4" ], + "x-ms-client-request-id": [ "16d36278-4eae-43f1-ad98-afeaf4def4c8_RP" ], + "x-ms-messaging-activity-id": [ "3eec2e32-4f6c-4675-8b95-6837107d8085" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T05:41:23" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "ac51b821-b64b-44c7-ae46-761fbf3a9bc4" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054123Z:ac51b821-b64b-44c7-ae46-761fbf3a9bc4" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:05 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C6A50A419A5A4632A92BC3EAA5C20EF7 Ref B: SEL221051504035 Ref C: 2024-04-30T05:41:21Z" ], + "Date": [ "Tue, 30 Apr 2024 05:41:22 GMT" ] }, "ContentHeaders": { "Content-Length": [ "68" ], diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusTopic.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusTopic.Tests.ps1 index 54365a160655..c58400a13f36 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusTopic.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Remove-AzServiceBusTopic.Tests.ps1 @@ -18,12 +18,12 @@ Describe 'Remove-AzServiceBusTopic' { It 'Delete' { New-AzServiceBusTopic -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name topicToRemove Remove-AzServiceBusTopic -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name topicToRemove - { Get-AzServiceBusTopic -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name topicToRemove } | Should -Throw + { Get-AzServiceBusTopic -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name topicToRemove -ErrorAction Stop } | Should -Throw } It 'DeleteViaIdentity' { $topic = New-AzServiceBusTopic -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name topicToRemove Remove-AzServiceBusTopic -InputObject $topic - { Get-AzServiceBusTopic -InputObject $topic } | Should -Throw + { Get-AzServiceBusTopic -InputObject $topic -ErrorAction Stop } | Should -Throw } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusAuthorizationRule.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusAuthorizationRule.Recording.json index 14781dedc18f..d83a16966769 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusAuthorizationRule.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusAuthorizationRule.Recording.json @@ -1,17 +1,17 @@ { - "Set-AzServiceBusAuthorizationRule+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusAuthorizationRule+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "242" ], - "x-ms-client-request-id": [ "ee4e422d-d9a0-41b9-baf9-8ceac75f496c" ], + "x-ms-unique-id": [ "198" ], + "x-ms-client-request-id": [ "50e89669-3a47-466e-88fb-7f7baf5e928d" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzServiceBusNamespaceAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,28 +22,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11798" ], - "x-ms-request-id": [ "dbf90b20-2374-4859-997a-cdbd01ed4d3b" ], - "x-ms-correlation-request-id": [ "dbf90b20-2374-4859-997a-cdbd01ed4d3b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135620Z:dbf90b20-2374-4859-997a-cdbd01ed4d3b" ], + "x-ms-correlation-request-id": [ "348c6ba9-9998-4f14-a276-a1c7bc50ffed" ], + "x-ms-client-request-id": [ "50e89669-3a47-466e-88fb-7f7baf5e928d_RP" ], + "x-ms-messaging-activity-id": [ "c669479c-989e-4e65-a50c-c820b6b8a65a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T05:41:37" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-request-id": [ "348c6ba9-9998-4f14-a276-a1c7bc50ffed" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054138Z:348c6ba9-9998-4f14-a276-a1c7bc50ffed" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:20 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3AB3383FFC014587A55F3E9DAE833778 Ref B: SEL221051504035 Ref C: 2024-04-30T05:41:36Z" ], + "Date": [ "Tue, 30 Apr 2024 05:41:38 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "362" ], + "Content-Length": [ "364" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } }, - "Set-AzServiceBusAuthorizationRule+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusAuthorizationRule+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Send\", \"Listen\", \"Manage\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -58,37 +63,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1165" ], - "x-ms-request-id": [ "cd03ecbb-bf7d-47dd-ba15-ce9001e771e0" ], - "x-ms-correlation-request-id": [ "cd03ecbb-bf7d-47dd-ba15-ce9001e771e0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135621Z:cd03ecbb-bf7d-47dd-ba15-ce9001e771e0" ], + "x-ms-correlation-request-id": [ "52842261-4d5f-470c-8e4e-873f09966c89" ], + "x-ms-client-request-id": [ "b6e47e3a-9a32-43c7-9cf6-b0fe65df1a3b_RP" ], + "x-ms-messaging-activity-id": [ "9a39e217-ca36-4e26-b286-bfacc3aa8c09" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T05:41:40" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "52842261-4d5f-470c-8e4e-873f09966c89" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054140Z:52842261-4d5f-470c-8e4e-873f09966c89" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:21 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E1600F12EE0D4EEC8586FE0DF5354819 Ref B: SEL221051504035 Ref C: 2024-04-30T05:41:38Z" ], + "Date": [ "Tue, 30 Apr 2024 05:41:40 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "362" ], + "Content-Length": [ "364" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\",\"Listen\",\"Manage\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\",\"Listen\",\"Manage\"]}}", "isContentBase64": false } }, - "Set-AzServiceBusAuthorizationRule+[NoContext]+SetExpandedQueue+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusAuthorizationRule+[NoContext]+SetExpandedQueue+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "244" ], - "x-ms-client-request-id": [ "8f7e4128-01f9-4513-8622-8cc16b15b57b" ], + "x-ms-unique-id": [ "200" ], + "x-ms-client-request-id": [ "d0be696c-345b-47f8-be90-87233c95386a" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusQueueAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzServiceBusQueueAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -99,28 +109,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11797" ], - "x-ms-request-id": [ "a8da7603-ed38-4e79-8d59-8cecb148929b" ], - "x-ms-correlation-request-id": [ "a8da7603-ed38-4e79-8d59-8cecb148929b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135622Z:a8da7603-ed38-4e79-8d59-8cecb148929b" ], + "x-ms-correlation-request-id": [ "3b25ae3a-6d42-4a66-b7ed-18d966af7508" ], + "x-ms-client-request-id": [ "d0be696c-345b-47f8-be90-87233c95386a_RP" ], + "x-ms-messaging-activity-id": [ "7e50ad17-7337-4876-9b8d-92ab06e62e3a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T05:41:43" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "3b25ae3a-6d42-4a66-b7ed-18d966af7508" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054143Z:3b25ae3a-6d42-4a66-b7ed-18d966af7508" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:21 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CCB6AB3BE3D941E7901DD004EF9266BB Ref B: SEL221051504035 Ref C: 2024-04-30T05:41:41Z" ], + "Date": [ "Tue, 30 Apr 2024 05:41:43 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "375" ], + "Content-Length": [ "377" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } }, - "Set-AzServiceBusAuthorizationRule+[NoContext]+SetExpandedQueue+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusAuthorizationRule+[NoContext]+SetExpandedQueue+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Send\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -135,37 +150,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1164" ], - "x-ms-request-id": [ "2caa2c64-9ad2-4ad4-b1fb-db24a4c8a0df" ], - "x-ms-correlation-request-id": [ "2caa2c64-9ad2-4ad4-b1fb-db24a4c8a0df" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135622Z:2caa2c64-9ad2-4ad4-b1fb-db24a4c8a0df" ], + "x-ms-correlation-request-id": [ "ab874eb6-37f4-40a9-a25b-316912de7ed2" ], + "x-ms-client-request-id": [ "f4219563-fff5-4205-8920-6ad9a4c87fd9_RP" ], + "x-ms-messaging-activity-id": [ "3af8f153-60ff-4fe2-bd80-9d5611a955c8" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T05:41:45" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "ab874eb6-37f4-40a9-a25b-316912de7ed2" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054145Z:ab874eb6-37f4-40a9-a25b-316912de7ed2" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:22 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6579683BED884D35A24E8271E0636AC4 Ref B: SEL221051504035 Ref C: 2024-04-30T05:41:43Z" ], + "Date": [ "Tue, 30 Apr 2024 05:41:45 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "337" ], + "Content-Length": [ "339" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"properties\":{\"rights\":[\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"properties\":{\"rights\":[\"Send\"]}}", "isContentBase64": false } }, - "Set-AzServiceBusAuthorizationRule+[NoContext]+SetExpandedTopic+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusAuthorizationRule+[NoContext]+SetExpandedTopic+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "246" ], - "x-ms-client-request-id": [ "3eef8f57-1dbb-4f3e-a6b4-5593699dd400" ], + "x-ms-unique-id": [ "202" ], + "x-ms-client-request-id": [ "4f730ccf-2ef1-4263-a52b-fc8432eab2c8" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusTopicAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzServiceBusTopicAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -176,28 +196,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11796" ], - "x-ms-request-id": [ "07bef4dd-aedd-49b3-9d3e-0001bd9d5098" ], - "x-ms-correlation-request-id": [ "07bef4dd-aedd-49b3-9d3e-0001bd9d5098" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135623Z:07bef4dd-aedd-49b3-9d3e-0001bd9d5098" ], + "x-ms-correlation-request-id": [ "f8488b0a-eab9-45f3-8832-5e5735221148" ], + "x-ms-client-request-id": [ "4f730ccf-2ef1-4263-a52b-fc8432eab2c8_RP" ], + "x-ms-messaging-activity-id": [ "831c026f-5cb7-4b0d-ade3-f992a861a469" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T05:41:47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "f8488b0a-eab9-45f3-8832-5e5735221148" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054147Z:f8488b0a-eab9-45f3-8832-5e5735221148" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:23 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EB086A5BAADF4371A0C5ABCFDFCA8234 Ref B: SEL221051504035 Ref C: 2024-04-30T05:41:45Z" ], + "Date": [ "Tue, 30 Apr 2024 05:41:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "375" ], + "Content-Length": [ "377" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } }, - "Set-AzServiceBusAuthorizationRule+[NoContext]+SetExpandedTopic+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusAuthorizationRule+[NoContext]+SetExpandedTopic+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Listen\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -212,37 +237,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1163" ], - "x-ms-request-id": [ "6ef38dec-4837-442e-b750-81a54d5e05bc" ], - "x-ms-correlation-request-id": [ "6ef38dec-4837-442e-b750-81a54d5e05bc" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135624Z:6ef38dec-4837-442e-b750-81a54d5e05bc" ], + "x-ms-correlation-request-id": [ "8b724c3b-6f43-433c-bdf9-63e49a499296" ], + "x-ms-client-request-id": [ "9150aa44-a627-41e5-8587-9b7f4f072202_RP" ], + "x-ms-messaging-activity-id": [ "ed3a4db7-648c-4cf7-84cc-cd80c984fa01" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T05:41:49" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "8b724c3b-6f43-433c-bdf9-63e49a499296" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054150Z:8b724c3b-6f43-433c-bdf9-63e49a499296" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:24 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3E31559D1298474DA23E70D066C9A9D4 Ref B: SEL221051504035 Ref C: 2024-04-30T05:41:47Z" ], + "Date": [ "Tue, 30 Apr 2024 05:41:50 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "339" ], + "Content-Length": [ "341" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"properties\":{\"rights\":[\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"properties\":{\"rights\":[\"Listen\"]}}", "isContentBase64": false } }, - "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "248" ], - "x-ms-client-request-id": [ "73dfdd12-3c66-4cfe-b06f-59360830fb1f" ], + "x-ms-unique-id": [ "204" ], + "x-ms-client-request-id": [ "435dd8d0-e72f-441c-9730-97e392537364" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzServiceBusNamespaceAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -253,37 +283,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11795" ], - "x-ms-request-id": [ "048f94b9-a751-457d-b5da-9a1d3b71cf1b" ], - "x-ms-correlation-request-id": [ "048f94b9-a751-457d-b5da-9a1d3b71cf1b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135625Z:048f94b9-a751-457d-b5da-9a1d3b71cf1b" ], + "x-ms-correlation-request-id": [ "0b696f11-df7d-4515-b081-90f5ae1da8fa" ], + "x-ms-client-request-id": [ "435dd8d0-e72f-441c-9730-97e392537364_RP" ], + "x-ms-messaging-activity-id": [ "1f1627c3-2138-4440-8941-acbe8368ca46" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T05:41:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "0b696f11-df7d-4515-b081-90f5ae1da8fa" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054151Z:0b696f11-df7d-4515-b081-90f5ae1da8fa" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:25 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DD6EDDD8DC9F4947B3060CB8B569EFAE Ref B: SEL221051504035 Ref C: 2024-04-30T05:41:50Z" ], + "Date": [ "Tue, 30 Apr 2024 05:41:52 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "362" ], + "Content-Length": [ "364" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } }, - "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "249" ], - "x-ms-client-request-id": [ "f3d82bcd-63a7-441c-a730-48b5ea50ea75" ], + "x-ms-unique-id": [ "205" ], + "x-ms-client-request-id": [ "9f15c8fb-dbb2-422c-8671-f9cb1307c185" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusNamespaceAuthorizationRule_GetViaIdentity" ], "FullCommandName": [ "Get-AzServiceBusNamespaceAuthorizationRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -294,28 +329,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11794" ], - "x-ms-request-id": [ "6bc6e97a-b0d6-49b6-a9ea-2c374f53ad01" ], - "x-ms-correlation-request-id": [ "6bc6e97a-b0d6-49b6-a9ea-2c374f53ad01" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135626Z:6bc6e97a-b0d6-49b6-a9ea-2c374f53ad01" ], + "x-ms-correlation-request-id": [ "9697c0c6-a94d-44d1-ac76-0f8d304e7ce7" ], + "x-ms-client-request-id": [ "9f15c8fb-dbb2-422c-8671-f9cb1307c185_RP" ], + "x-ms-messaging-activity-id": [ "73cd19b5-9d2a-4369-8b68-9c0f6b91e7a0" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T05:41:53" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "9697c0c6-a94d-44d1-ac76-0f8d304e7ce7" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054153Z:9697c0c6-a94d-44d1-ac76-0f8d304e7ce7" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:26 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: ECEC3BBC8D5546D3995E9D79C4806CC5 Ref B: SEL221051504035 Ref C: 2024-04-30T05:41:52Z" ], + "Date": [ "Tue, 30 Apr 2024 05:41:53 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "362" ], + "Content-Length": [ "364" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } }, - "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview+3": { + "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview+3": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Send\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -330,37 +370,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1162" ], - "x-ms-request-id": [ "2686c617-2a1e-4910-b141-507f7d2718c1" ], - "x-ms-correlation-request-id": [ "2686c617-2a1e-4910-b141-507f7d2718c1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135633Z:2686c617-2a1e-4910-b141-507f7d2718c1" ], + "x-ms-correlation-request-id": [ "418de07a-32ac-494e-b428-160571f220ff" ], + "x-ms-client-request-id": [ "599ab75c-4e3e-4ae4-9db9-f105a6104fc8_RP" ], + "x-ms-messaging-activity-id": [ "4161b783-6cce-405b-9b2a-5c8327a7d075" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T05:42:03" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "418de07a-32ac-494e-b428-160571f220ff" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T054203Z:418de07a-32ac-494e-b428-160571f220ff" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:32 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7AD7B04A73D94A7FBDBEDB4B2B308AB2 Ref B: SEL221051504035 Ref C: 2024-04-30T05:41:53Z" ], + "Date": [ "Tue, 30 Apr 2024 05:42:03 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "344" ], + "Content-Length": [ "346" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/AuthorizationRules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/AuthorizationRules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}", "isContentBase64": false } }, - "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview+4": { + "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "251" ], - "x-ms-client-request-id": [ "fb051005-b82d-4014-8029-793741b42818" ], + "x-ms-unique-id": [ "207" ], + "x-ms-client-request-id": [ "a4dd9e60-6f6c-4808-b21b-cb07babf6005" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusQueueAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzServiceBusQueueAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -371,37 +416,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11793" ], - "x-ms-request-id": [ "f44b7100-de77-4fb7-a3f4-54e327da8ab3" ], - "x-ms-correlation-request-id": [ "f44b7100-de77-4fb7-a3f4-54e327da8ab3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135633Z:f44b7100-de77-4fb7-a3f4-54e327da8ab3" ], + "x-ms-correlation-request-id": [ "6dfbe136-95bb-42f1-99be-ac808f35f570" ], + "x-ms-client-request-id": [ "a4dd9e60-6f6c-4808-b21b-cb07babf6005_RP" ], + "x-ms-messaging-activity-id": [ "51d2ed28-d092-43a8-a716-28e8942ed035" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T05:42:03" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "6dfbe136-95bb-42f1-99be-ac808f35f570" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054204Z:6dfbe136-95bb-42f1-99be-ac808f35f570" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:33 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9477AF11ED1146E8BEBF3CEC67A56D7C Ref B: SEL221051504035 Ref C: 2024-04-30T05:42:03Z" ], + "Date": [ "Tue, 30 Apr 2024 05:42:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "357" ], + "Content-Length": [ "359" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}", "isContentBase64": false } }, - "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview+5": { + "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "252" ], - "x-ms-client-request-id": [ "58daebf1-c91c-4acc-a63b-42a9c5279f4b" ], + "x-ms-unique-id": [ "208" ], + "x-ms-client-request-id": [ "82822d08-1f49-4e00-aeb2-1ddbba517687" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusQueueAuthorizationRule_GetViaIdentity" ], "FullCommandName": [ "Get-AzServiceBusQueueAuthorizationRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -412,28 +462,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11792" ], - "x-ms-request-id": [ "191e2caa-86fa-4a1f-9450-a8d9f4fa5a58" ], - "x-ms-correlation-request-id": [ "191e2caa-86fa-4a1f-9450-a8d9f4fa5a58" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135634Z:191e2caa-86fa-4a1f-9450-a8d9f4fa5a58" ], + "x-ms-correlation-request-id": [ "6645111f-9ad3-4671-8747-76708fe94fa3" ], + "x-ms-client-request-id": [ "82822d08-1f49-4e00-aeb2-1ddbba517687_RP" ], + "x-ms-messaging-activity-id": [ "7efba34f-13cf-453b-bf92-726ec62088c6" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:42:05" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "6645111f-9ad3-4671-8747-76708fe94fa3" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054205Z:6645111f-9ad3-4671-8747-76708fe94fa3" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:34 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C07AC826B8F6410EAF151365BB417900 Ref B: SEL221051504035 Ref C: 2024-04-30T05:42:04Z" ], + "Date": [ "Tue, 30 Apr 2024 05:42:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "357" ], + "Content-Length": [ "359" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationrules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}", "isContentBase64": false } }, - "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview+6": { + "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview+6": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Listen\", \"Manage\", \"Send\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -448,28 +503,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1161" ], - "x-ms-request-id": [ "f0d266c5-0477-4550-8ef6-eb1350386f70" ], - "x-ms-correlation-request-id": [ "f0d266c5-0477-4550-8ef6-eb1350386f70" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135635Z:f0d266c5-0477-4550-8ef6-eb1350386f70" ], + "x-ms-correlation-request-id": [ "318f899e-f607-45e3-be60-a2cf95079d01" ], + "x-ms-client-request-id": [ "61144c6f-5138-478d-8ea4-5feb4fdea9bd_RP" ], + "x-ms-messaging-activity-id": [ "be782e5e-82fb-473e-b6d6-10aae6369f95" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:42:07" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "318f899e-f607-45e3-be60-a2cf95079d01" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054207Z:318f899e-f607-45e3-be60-a2cf95079d01" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:34 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 795CA274E1B44B57AD2A64586E933D08 Ref B: SEL221051504035 Ref C: 2024-04-30T05:42:05Z" ], + "Date": [ "Tue, 30 Apr 2024 05:42:07 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "355" ], + "Content-Length": [ "357" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue1/authorizationRules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue1/authorizationRules/queueAuthRule1\",\"name\":\"queueAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}", "isContentBase64": false } }, - "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview+7": { + "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview+7": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Send\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -484,37 +544,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1160" ], - "x-ms-request-id": [ "4bafe601-b89d-4e87-b4ae-aec188836f1d" ], - "x-ms-correlation-request-id": [ "4bafe601-b89d-4e87-b4ae-aec188836f1d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135636Z:4bafe601-b89d-4e87-b4ae-aec188836f1d" ], + "x-ms-correlation-request-id": [ "5cf2884c-3632-47c2-8019-7f1f4c48c67c" ], + "x-ms-client-request-id": [ "c7914381-155a-49e7-ae45-b5a3561df0be_RP" ], + "x-ms-messaging-activity-id": [ "aa908f93-0e0c-49ce-b0c8-bdac3b14832c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T05:42:09" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "5cf2884c-3632-47c2-8019-7f1f4c48c67c" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054209Z:5cf2884c-3632-47c2-8019-7f1f4c48c67c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:35 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F540874AF73F4A90A20CF1FCFCFFEF00 Ref B: SEL221051504035 Ref C: 2024-04-30T05:42:07Z" ], + "Date": [ "Tue, 30 Apr 2024 05:42:09 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "337" ], + "Content-Length": [ "339" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"properties\":{\"rights\":[\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"properties\":{\"rights\":[\"Send\"]}}", "isContentBase64": false } }, - "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview+8": { + "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "255" ], - "x-ms-client-request-id": [ "f0cc4ebf-818d-4593-a151-d82d9529ef76" ], + "x-ms-unique-id": [ "211" ], + "x-ms-client-request-id": [ "e8b3bb65-b244-4304-a400-054b6ba0edfe" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusTopicAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzServiceBusTopicAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -525,37 +590,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11791" ], - "x-ms-request-id": [ "317db732-0651-4d61-b8f9-ac281316d5cc" ], - "x-ms-correlation-request-id": [ "317db732-0651-4d61-b8f9-ac281316d5cc" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135636Z:317db732-0651-4d61-b8f9-ac281316d5cc" ], + "x-ms-correlation-request-id": [ "0f1e2138-fd08-4454-acf8-07a1c1786bfe" ], + "x-ms-client-request-id": [ "e8b3bb65-b244-4304-a400-054b6ba0edfe_RP" ], + "x-ms-messaging-activity-id": [ "9a3f40a0-134e-4f26-b586-0f3e057a1917" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T05:42:11" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-request-id": [ "0f1e2138-fd08-4454-acf8-07a1c1786bfe" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054211Z:0f1e2138-fd08-4454-acf8-07a1c1786bfe" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:36 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 592F41C48412487B950558C8BC76D5A6 Ref B: SEL221051504035 Ref C: 2024-04-30T05:42:09Z" ], + "Date": [ "Tue, 30 Apr 2024 05:42:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "357" ], + "Content-Length": [ "359" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}", "isContentBase64": false } }, - "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview+9": { + "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "256" ], - "x-ms-client-request-id": [ "f9336086-f775-4c70-93a5-7777ec33117b" ], + "x-ms-unique-id": [ "212" ], + "x-ms-client-request-id": [ "feb2ab49-e2fa-4eed-abd6-c039ed42b595" ], "CommandName": [ "Az.ServiceBus.private\\Get-AzServiceBusTopicAuthorizationRule_GetViaIdentity" ], "FullCommandName": [ "Get-AzServiceBusTopicAuthorizationRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -566,28 +636,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11790" ], - "x-ms-request-id": [ "a381c6c2-02d2-4d9f-8078-959a5e5cc5ec" ], - "x-ms-correlation-request-id": [ "a381c6c2-02d2-4d9f-8078-959a5e5cc5ec" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135637Z:a381c6c2-02d2-4d9f-8078-959a5e5cc5ec" ], + "x-ms-correlation-request-id": [ "4e110a38-6f67-4d86-8a8c-7a3d70e52045" ], + "x-ms-client-request-id": [ "feb2ab49-e2fa-4eed-abd6-c039ed42b595_RP" ], + "x-ms-messaging-activity-id": [ "f46078e9-91c2-4d92-a483-d614b67fe609" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T05:42:12" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "4e110a38-6f67-4d86-8a8c-7a3d70e52045" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054212Z:4e110a38-6f67-4d86-8a8c-7a3d70e52045" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:37 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B61D86A998E945A78A9A3A129BE480EB Ref B: SEL221051504035 Ref C: 2024-04-30T05:42:11Z" ], + "Date": [ "Tue, 30 Apr 2024 05:42:12 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "357" ], + "Content-Length": [ "359" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationrules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}", "isContentBase64": false } }, - "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview+10": { + "Set-AzServiceBusAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview+10": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Listen\", \"Manage\", \"Send\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -602,21 +677,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1159" ], - "x-ms-request-id": [ "d7b5d364-677c-4e31-b333-14f95bdaaf1b" ], - "x-ms-correlation-request-id": [ "d7b5d364-677c-4e31-b333-14f95bdaaf1b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135638Z:d7b5d364-677c-4e31-b333-14f95bdaaf1b" ], + "x-ms-correlation-request-id": [ "6d31c691-e25e-489f-a984-25b49d75968f" ], + "x-ms-client-request-id": [ "c6152efc-9f3d-47b5-b89c-fccf76eb381d_RP" ], + "x-ms-messaging-activity-id": [ "9b1c206a-4892-4909-92ce-ff5602fc3f3c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T05:42:15" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "6d31c691-e25e-489f-a984-25b49d75968f" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054215Z:6d31c691-e25e-489f-a984-25b49d75968f" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:37 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BBE4F77CAACE446FA063E2DD85773015 Ref B: SEL221051504035 Ref C: 2024-04-30T05:42:13Z" ], + "Date": [ "Tue, 30 Apr 2024 05:42:15 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "355" ], + "Content-Length": [ "357" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/authorizationRules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/authorizationRules/topicAuthRule1\",\"name\":\"topicAuthRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusGeoDRConfigurationBreakPair.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusGeoDRConfigurationBreakPair.Recording.json index 898910c1cc0d..3def6cd7ce47 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusGeoDRConfigurationBreakPair.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusGeoDRConfigurationBreakPair.Recording.json @@ -1,17 +1,17 @@ { - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "258" ], - "x-ms-client-request-id": [ "439d8359-9235-458c-98eb-891da13a9335" ], + "x-ms-unique-id": [ "214" ], + "x-ms-client-request-id": [ "9e1aa3a4-a001-42b8-a259-b29751339042" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,38 +22,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a5a4b00a-f553-4c92-a786-5bdd19261b43_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11789" ], - "x-ms-correlation-request-id": [ "601332a6-5839-4fe4-901c-a90d9f23e098" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135653Z:601332a6-5839-4fe4-901c-a90d9f23e098" ], + "x-ms-request-id": [ "716ed419-fecf-472e-8c3f-a2224e55cd56_M0CH3_M0CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-correlation-request-id": [ "8fcbe401-2895-4a62-a1c8-a66b4358d18b" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054230Z:8fcbe401-2895-4a62-a1c8-a66b4358d18b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:53 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F6166EC73EA64A049DF1C7D60DCA0891 Ref B: SEL221051504035 Ref C: 2024-04-30T05:42:29Z" ], + "Date": [ "Tue, 30 Apr 2024 05:42:30 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "590" ], + "Content-Length": [ "594" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1/breakPairing?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm/breakPairing?api-version=2022-10-01-preview+2": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1/breakPairing?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm/breakPairing?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "259" ], - "x-ms-client-request-id": [ "955144b1-9d4f-4e7b-b475-324c6bf169b1" ], + "x-ms-unique-id": [ "215" ], + "x-ms-client-request-id": [ "9c05da5a-98dc-4a3b-9085-95abfb4179ea" ], "CommandName": [ "Az.ServiceBus.private\\Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing_Break" ], "FullCommandName": [ "Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing_Break" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,15 +66,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "89c0b04e-9f6d-47d1-a1f4-dd32cd2e71cc_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1178" ], - "x-ms-correlation-request-id": [ "e10dc06b-551d-4356-8d39-5f446dfce205" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135654Z:e10dc06b-551d-4356-8d39-5f446dfce205" ], + "x-ms-request-id": [ "503f2625-82cf-4bae-989c-f28b2a0dd519_M7CH3_M7CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "73c70a3d-8ea5-46cd-a06d-2b507c5302f6" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054233Z:73c70a3d-8ea5-46cd-a06d-2b507c5302f6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:53 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F159587CB8B7494CA04DE51E8AB85FEC Ref B: SEL221051504035 Ref C: 2024-04-30T05:42:30Z" ], + "Date": [ "Tue, 30 Apr 2024 05:42:33 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -82,19 +86,19 @@ "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+3": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "260" ], - "x-ms-client-request-id": [ "18f98600-4b16-4a6e-ae51-56a286e77496" ], + "x-ms-unique-id": [ "216" ], + "x-ms-client-request-id": [ "14792105-59c8-48de-a7e9-e8de9a41d658" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -105,38 +109,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a47cee5c-a087-4dd0-a872-d237768444df_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11788" ], - "x-ms-correlation-request-id": [ "e360286b-4fd7-4ba1-89ed-0d55fcff5dd6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135654Z:e360286b-4fd7-4ba1-89ed-0d55fcff5dd6" ], + "x-ms-request-id": [ "2eed2ca7-fdd4-41e9-83cd-de7d98b456a4_M0CH3_M0CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "de493183-e3d5-4f16-ba77-b91cb830cc7d" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T054234Z:de493183-e3d5-4f16-ba77-b91cb830cc7d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:56:54 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9934FBDC6417455EB1596BDB53C0AAB4 Ref B: SEL221051504035 Ref C: 2024-04-30T05:42:33Z" ], + "Date": [ "Tue, 30 Apr 2024 05:42:34 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+4": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "261" ], - "x-ms-client-request-id": [ "3e6dd6f4-2791-4a2d-8a36-6dcd63df99d7" ], + "x-ms-unique-id": [ "217" ], + "x-ms-client-request-id": [ "032eae14-c5c1-4ac6-a07e-def64a57320a" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -147,38 +153,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5662d37a-ebbb-4c6a-9166-3a498cf80e7c_M6SN1_M6SN1" ], + "x-ms-request-id": [ "0eedbda6-2e49-46e9-8deb-a881137f194b_M10SN1_M10SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11787" ], - "x-ms-correlation-request-id": [ "a552bfd3-dff0-4c56-86cc-3094036fd9e6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135705Z:a552bfd3-dff0-4c56-86cc-3094036fd9e6" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], + "x-ms-correlation-request-id": [ "2b51c003-f652-4ca7-a646-7eafd577a225" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054246Z:2b51c003-f652-4ca7-a646-7eafd577a225" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:57:05 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 51DAC97A84E94D29B25576568FBABBAC Ref B: SEL221051504035 Ref C: 2024-04-30T05:42:44Z" ], + "Date": [ "Tue, 30 Apr 2024 05:42:46 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+5": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "262" ], - "x-ms-client-request-id": [ "68d24985-fb16-46a9-ab1f-02238dc09a2e" ], + "x-ms-unique-id": [ "218" ], + "x-ms-client-request-id": [ "5219a5af-d3c7-4c05-8017-18cf3c7f870f" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -189,38 +197,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "474c9351-2b6a-46ad-8387-522d77e74504_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11786" ], - "x-ms-correlation-request-id": [ "75d2ed2e-3676-43b9-954e-952d3f18c9ca" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135716Z:75d2ed2e-3676-43b9-954e-952d3f18c9ca" ], + "x-ms-request-id": [ "e3616634-e348-4cde-a9b3-0f0ba6616f6e_M5CH3_M5CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "8cf9dd15-5578-40d9-8603-c066daf84f6e" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054257Z:8cf9dd15-5578-40d9-8603-c066daf84f6e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:57:15 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9B7B8009BFBD41CF8841A784A0421CD6 Ref B: SEL221051504035 Ref C: 2024-04-30T05:42:56Z" ], + "Date": [ "Tue, 30 Apr 2024 05:42:57 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+6": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "263" ], - "x-ms-client-request-id": [ "7990b0fa-6350-465e-b485-5f72356c7c03" ], + "x-ms-unique-id": [ "219" ], + "x-ms-client-request-id": [ "4a2d9377-f1d9-410d-a888-3ec050dafdd6" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -231,38 +241,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d6aacefc-0f4e-41cc-b6cf-59fc68928ce3_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11785" ], - "x-ms-correlation-request-id": [ "2703fa02-6221-4898-942c-8b10544558d3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135726Z:2703fa02-6221-4898-942c-8b10544558d3" ], + "x-ms-request-id": [ "72c9a6b9-a28b-4962-b64a-90a9d6a9d34d_M11CH3_M11CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "4c7743ab-8ac7-4b88-8d88-67f5f1d6f48a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054308Z:4c7743ab-8ac7-4b88-8d88-67f5f1d6f48a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:57:25 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 62F61A1D9CE3400894DD64BFFC1E4E86 Ref B: SEL221051504035 Ref C: 2024-04-30T05:43:07Z" ], + "Date": [ "Tue, 30 Apr 2024 05:43:08 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+7": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "264" ], - "x-ms-client-request-id": [ "c9502016-2004-4672-9fa0-61ffc32fc6dd" ], + "x-ms-unique-id": [ "220" ], + "x-ms-client-request-id": [ "32343ca4-7716-4b54-bac1-38e6699282ba" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -273,38 +285,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ff90ef74-429d-4a13-b59a-c641fd74326b_M6SN1_M6SN1" ], + "x-ms-request-id": [ "9cabc662-01b9-4527-b2c8-6ed3f5584195_M10SN1_M10SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11784" ], - "x-ms-correlation-request-id": [ "712045ba-af80-43d6-b260-c30034d1ac17" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135737Z:712045ba-af80-43d6-b260-c30034d1ac17" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "1274721a-0bcf-4457-abda-7268aa86b6e7" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054320Z:1274721a-0bcf-4457-abda-7268aa86b6e7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:57:37 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: AB9EE2E1D25645B59402A93AB52CA7F9 Ref B: SEL221051504035 Ref C: 2024-04-30T05:43:18Z" ], + "Date": [ "Tue, 30 Apr 2024 05:43:20 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+8": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "265" ], - "x-ms-client-request-id": [ "06f2dc0b-d40d-4508-a51f-d693d0d9e73e" ], + "x-ms-unique-id": [ "221" ], + "x-ms-client-request-id": [ "e3af5e20-6fa8-4cb4-abe4-3162c8c357f9" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -315,38 +329,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a8d87122-d716-4c14-9713-a8d51a157e3c_M6SN1_M6SN1" ], + "x-ms-request-id": [ "3e9a7df9-aa5a-42c1-9323-e572771b4870_M8SN1_M8SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11783" ], - "x-ms-correlation-request-id": [ "338e940f-6ffa-4a0e-9442-ec639383bdd5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135748Z:338e940f-6ffa-4a0e-9442-ec639383bdd5" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-correlation-request-id": [ "477b4930-a811-41b8-b772-eb152473674a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054332Z:477b4930-a811-41b8-b772-eb152473674a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:57:47 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2F26C864248148A789AA21CF7C68DDF5 Ref B: SEL221051504035 Ref C: 2024-04-30T05:43:30Z" ], + "Date": [ "Tue, 30 Apr 2024 05:43:32 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+9": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "266" ], - "x-ms-client-request-id": [ "460b0860-981c-432b-8c3e-ebf78b76fa51" ], + "x-ms-unique-id": [ "222" ], + "x-ms-client-request-id": [ "2d1331a1-c4e2-40c8-b7da-488c7d2548ea" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -357,38 +373,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7da562dd-2a97-46a4-ac7e-a1ce2efc16cd_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11782" ], - "x-ms-correlation-request-id": [ "127a1562-b75e-4cee-a639-321c96fef56c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135758Z:127a1562-b75e-4cee-a639-321c96fef56c" ], + "x-ms-request-id": [ "20809925-207f-4974-ae62-616653765ab2_M2CH3_M2CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "d33de413-99d9-4d32-867e-ccc1bde1918b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054343Z:d33de413-99d9-4d32-867e-ccc1bde1918b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:57:58 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F2251E49D1BC4792AD60733DD1E8AB97 Ref B: SEL221051504035 Ref C: 2024-04-30T05:43:42Z" ], + "Date": [ "Tue, 30 Apr 2024 05:43:43 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+10": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "267" ], - "x-ms-client-request-id": [ "a6c10a32-90f9-4503-8b78-ce4e9a70da0a" ], + "x-ms-unique-id": [ "223" ], + "x-ms-client-request-id": [ "e3ff5c90-5921-4426-b5f8-a4a2cb207645" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -399,38 +417,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "760bedfe-77c0-4c7c-94f2-24f05b5b41c7_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11781" ], - "x-ms-correlation-request-id": [ "f160039a-fc89-4476-9061-cf8931af897c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135809Z:f160039a-fc89-4476-9061-cf8931af897c" ], + "x-ms-request-id": [ "8895e055-96c8-4f1f-80f7-a80b37b944b0_M0CH3_M0CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "f4642e76-874b-4f6a-94ee-f58e67690dd8" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054356Z:f4642e76-874b-4f6a-94ee-f58e67690dd8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:58:08 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5BE31F3E8FA14EFD9F9E9CADFDE30401 Ref B: SEL221051504035 Ref C: 2024-04-30T05:43:53Z" ], + "Date": [ "Tue, 30 Apr 2024 05:43:55 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "413" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+11": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+11": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "268" ], - "x-ms-client-request-id": [ "bfd4d95b-eff4-480e-8821-be2c4f4260b8" ], + "x-ms-unique-id": [ "224" ], + "x-ms-client-request-id": [ "0897a81c-864a-4ef1-925f-0bce49cfbc5a" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -441,36 +461,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "89da3fbd-a517-43eb-a71c-d714a28c21ea_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11780" ], - "x-ms-correlation-request-id": [ "5ec7a640-5071-4bd5-8ba4-23655cfa48e3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135820Z:5ec7a640-5071-4bd5-8ba4-23655cfa48e3" ], + "x-ms-request-id": [ "27bcf590-845b-4a34-8cbe-8f3189429436_M9CH3_M9CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "b36b808a-f890-4718-a871-283b60f2c411" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054407Z:b36b808a-f890-4718-a871-283b60f2c411" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:58:20 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8658664705E04D3FAFF9B7E4A66783D8 Ref B: SEL221051504035 Ref C: 2024-04-30T05:44:06Z" ], + "Date": [ "Tue, 30 Apr 2024 05:44:07 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "412" ], + "Content-Length": [ "414" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+12": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+12": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"partnerNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"partnerNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "206" ] + "Content-Length": [ "208" ] } }, "Response": { @@ -478,38 +500,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "59d52b7e-c33b-415a-9308-b205f2c2c04c_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1158" ], - "x-ms-correlation-request-id": [ "6e43654e-8001-4e14-af94-54254513f59a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135840Z:6e43654e-8001-4e14-af94-54254513f59a" ], + "x-ms-request-id": [ "061e97ba-e914-475b-807e-c978d272df12_M1CH3_M1CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-correlation-request-id": [ "804e687e-7839-4709-b589-21ac4397016f" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054426Z:804e687e-7839-4709-b589-21ac4397016f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:58:40 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3B7022233F8748878C675E7AE49797CD Ref B: SEL221051504035 Ref C: 2024-04-30T05:44:17Z" ], + "Date": [ "Tue, 30 Apr 2024 05:44:26 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+13": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+13": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "270" ], - "x-ms-client-request-id": [ "3e4d879a-3c6d-4207-a6e6-bdee525c0e9f" ], + "x-ms-unique-id": [ "226" ], + "x-ms-client-request-id": [ "5e6bc485-6ef2-42ce-9802-2c42a1c52e19" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -520,38 +544,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "94e5bd38-bb02-48d0-bc8e-36e2944d7b6e_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11779" ], - "x-ms-correlation-request-id": [ "fb894e25-89b5-440c-8db4-16d1cdc47c7c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135843Z:fb894e25-89b5-440c-8db4-16d1cdc47c7c" ], + "x-ms-request-id": [ "f85cbbcd-6ffc-4a35-95b4-9766558c27ba_M5CH3_M5CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "41cc591c-ae51-44c7-b5f0-7b5731422b3f" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054428Z:41cc591c-ae51-44c7-b5f0-7b5731422b3f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:58:42 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FF4323D8303347EEBF5FE3E1E3DAA140 Ref B: SEL221051504035 Ref C: 2024-04-30T05:44:26Z" ], + "Date": [ "Tue, 30 Apr 2024 05:44:27 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+14": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "271" ], - "x-ms-client-request-id": [ "d306b204-4216-4f0a-8468-9acfb2e6d8e5" ], + "x-ms-unique-id": [ "227" ], + "x-ms-client-request-id": [ "bbef7b48-0029-4fd6-98d7-893ddf05653a" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -562,38 +588,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "4ffa0559-80af-464c-b052-01948441619e_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11778" ], - "x-ms-correlation-request-id": [ "4104e280-818e-4c4d-b0b8-209eff62395d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135853Z:4104e280-818e-4c4d-b0b8-209eff62395d" ], + "x-ms-request-id": [ "3719031a-f6c0-4d19-93a0-2762593aec67_M3CH3_M3CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "7703b829-9af8-4ae7-83cc-6180a95b5c09" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054439Z:7703b829-9af8-4ae7-83cc-6180a95b5c09" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:58:53 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 96BDF2C8DACD470B989C5A3AAA8773D5 Ref B: SEL221051504035 Ref C: 2024-04-30T05:44:38Z" ], + "Date": [ "Tue, 30 Apr 2024 05:44:39 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+15": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+15": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "272" ], - "x-ms-client-request-id": [ "b30a95ef-3696-4185-b779-f53083b8ae68" ], + "x-ms-unique-id": [ "228" ], + "x-ms-client-request-id": [ "66771dfc-97c1-4a91-8e3e-482a663ddc64" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -604,38 +632,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5b478227-a4d0-4e00-9bb4-e159999eb3ac_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11777" ], - "x-ms-correlation-request-id": [ "747b6810-196b-440a-aa7f-e0d9730f8634" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135904Z:747b6810-196b-440a-aa7f-e0d9730f8634" ], + "x-ms-request-id": [ "569fc112-d0c2-44ec-9426-fd7e3847a9d0_M11CH3_M11CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "4a332099-13b3-47e2-8ce4-b7a2ee0d1941" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054451Z:4a332099-13b3-47e2-8ce4-b7a2ee0d1941" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:59:03 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6E0EC431B9F84EAAB1C919662E49F2A3 Ref B: SEL221051504035 Ref C: 2024-04-30T05:44:49Z" ], + "Date": [ "Tue, 30 Apr 2024 05:44:51 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+16": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+16": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "273" ], - "x-ms-client-request-id": [ "784185a4-4ad1-4127-acb7-e73c4bc78a64" ], + "x-ms-unique-id": [ "229" ], + "x-ms-client-request-id": [ "a31d5a7d-7d41-4f59-b291-12b8d51f789f" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -646,38 +676,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "42d09bb4-959b-4512-aa7a-979583163665_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11776" ], - "x-ms-correlation-request-id": [ "80a5b4c3-a267-4659-b32b-96327917958e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135915Z:80a5b4c3-a267-4659-b32b-96327917958e" ], + "x-ms-request-id": [ "33ee2e14-2b70-47d6-aff0-08be3a726842_M1CH3_M1CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "7cb31885-e5fd-48a9-b537-450c7e5962f1" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054502Z:7cb31885-e5fd-48a9-b537-450c7e5962f1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:59:14 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F8132DCBA2AD4382B7E90E958D43FF87 Ref B: SEL221051504035 Ref C: 2024-04-30T05:45:01Z" ], + "Date": [ "Tue, 30 Apr 2024 05:45:02 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+17": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+17": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "274" ], - "x-ms-client-request-id": [ "21894f70-6bc8-4659-9a98-ea137a2207ba" ], + "x-ms-unique-id": [ "230" ], + "x-ms-client-request-id": [ "89f21ebe-7137-4f89-a5e6-3fae95810524" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -688,38 +720,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1ac76e14-8bb8-42e2-b440-ad3f70b8cfaa_M6SN1_M6SN1" ], + "x-ms-request-id": [ "a7c14741-fd8c-4264-b53f-3d5e8d81aa0d_M5SN1_M5SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11775" ], - "x-ms-correlation-request-id": [ "442d8e84-6788-4446-a0c3-8a755afe51c2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135925Z:442d8e84-6788-4446-a0c3-8a755afe51c2" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "54c1408f-a8ed-486a-8a5a-ed34936d0aad" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054514Z:54c1408f-a8ed-486a-8a5a-ed34936d0aad" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:59:25 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8F463B1A813B420EA7A2EC7622AFCDB2 Ref B: SEL221051504035 Ref C: 2024-04-30T05:45:12Z" ], + "Date": [ "Tue, 30 Apr 2024 05:45:14 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+18": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+18": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "275" ], - "x-ms-client-request-id": [ "42b2549c-f43f-479a-aae1-5e1bc9b073ca" ], + "x-ms-unique-id": [ "231" ], + "x-ms-client-request-id": [ "cd7f0fe3-4a41-4f00-a6c7-993817ec41de" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -730,38 +764,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "37d1f53e-6b80-4f8e-a8cd-19bdfc1bbb27_M6SN1_M6SN1" ], + "x-ms-request-id": [ "e147c6ee-56d1-4ac3-a2a9-333d99785836_M4SN1_M4SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11774" ], - "x-ms-correlation-request-id": [ "1adaa37f-6162-470a-80a9-65ab400e6d4e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135936Z:1adaa37f-6162-470a-80a9-65ab400e6d4e" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "186eea59-e9fa-4161-9f84-18a061dfa8bd" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T054526Z:186eea59-e9fa-4161-9f84-18a061dfa8bd" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:59:35 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 86DABE882F494E8480A8B09313C9E723 Ref B: SEL221051504035 Ref C: 2024-04-30T05:45:24Z" ], + "Date": [ "Tue, 30 Apr 2024 05:45:25 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+19": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+19": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "276" ], - "x-ms-client-request-id": [ "2467bec9-e71b-47f9-ba6a-9d654d466e01" ], + "x-ms-unique-id": [ "232" ], + "x-ms-client-request-id": [ "d51af5de-326c-4079-b89f-6dfc575d7a86" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -772,38 +808,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7bf27265-500e-406a-a06b-4f8475a41aee_M6SN1_M6SN1" ], + "x-ms-request-id": [ "15d9c09f-c7e7-4795-9411-fae54d3fda92_M10SN1_M10SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11773" ], - "x-ms-correlation-request-id": [ "24297306-5db4-49ae-b882-a9328b19f096" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135947Z:24297306-5db4-49ae-b882-a9328b19f096" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "bce2a03e-ba27-412a-abd0-8bd71d3c493d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054537Z:bce2a03e-ba27-412a-abd0-8bd71d3c493d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:59:46 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3CE49BF3324B4100926110CE9127D223 Ref B: SEL221051504035 Ref C: 2024-04-30T05:45:36Z" ], + "Date": [ "Tue, 30 Apr 2024 05:45:37 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+20": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+20": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "277" ], - "x-ms-client-request-id": [ "e7ffee57-b2db-49f8-ae3f-3b072963c652" ], + "x-ms-unique-id": [ "233" ], + "x-ms-client-request-id": [ "ef450e04-6c91-4270-b588-631235b8610e" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -814,38 +852,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3ccabc1f-9603-42ba-9dd4-38c732db7805_M6SN1_M6SN1" ], + "x-ms-request-id": [ "4dca2ac1-838f-4853-91c4-7e266db3ad04_M11SN1_M11SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11772" ], - "x-ms-correlation-request-id": [ "175148b3-87b2-42d3-b851-2a3b57296c09" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T135958Z:175148b3-87b2-42d3-b851-2a3b57296c09" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "e1bac57b-2495-4f50-a466-8ad296e9fa92" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054549Z:e1bac57b-2495-4f50-a466-8ad296e9fa92" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 13:59:58 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D8AFA17E72FB4BABB09B37B701F2F953 Ref B: SEL221051504035 Ref C: 2024-04-30T05:45:47Z" ], + "Date": [ "Tue, 30 Apr 2024 05:45:49 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+21": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+21": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "278" ], - "x-ms-client-request-id": [ "9d0189e6-d53f-4d73-83db-2f65c23c7105" ], + "x-ms-unique-id": [ "234" ], + "x-ms-client-request-id": [ "eba817ac-bc08-40b9-91d1-058d5d28e646" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -856,38 +896,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "59ae2b7f-b9b0-417a-9167-1d940f3acb4a_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11771" ], - "x-ms-correlation-request-id": [ "8f09e7a5-fb63-4c4f-9852-7fcf2e204999" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140010Z:8f09e7a5-fb63-4c4f-9852-7fcf2e204999" ], + "x-ms-request-id": [ "b4fd7f39-8400-4701-98e9-590adc8b0500_M6CH3_M6CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "2b37f881-8090-4cbe-afdb-155b7e7e9dc1" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054601Z:2b37f881-8090-4cbe-afdb-155b7e7e9dc1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:00:10 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8C6FC5BC2D0C46FC9081EEC445BBE34B Ref B: SEL221051504035 Ref C: 2024-04-30T05:45:59Z" ], + "Date": [ "Tue, 30 Apr 2024 05:46:01 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "590" ], + "Content-Length": [ "594" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "279" ], - "x-ms-client-request-id": [ "297933e3-d544-4ba6-8f3f-87a88a78bd96" ], + "x-ms-unique-id": [ "235" ], + "x-ms-client-request-id": [ "d0e37449-6bd5-4d9b-b402-fcb3327f3cb1" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -898,38 +940,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "dfd3bd74-7087-44f2-a6c7-3198b6093ff1_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11770" ], - "x-ms-correlation-request-id": [ "a298e578-42b2-4895-8eec-4ae634f39066" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140022Z:a298e578-42b2-4895-8eec-4ae634f39066" ], + "x-ms-request-id": [ "6ddb07b9-9705-416b-a951-569d6d112946_M0CH3_M0CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "28af70e0-25ae-4e79-973d-3ac036b2847d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054613Z:28af70e0-25ae-4e79-973d-3ac036b2847d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:00:21 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 938ABB05DC644D9DBC3A596DB4D8EA5B Ref B: SEL221051504035 Ref C: 2024-04-30T05:46:11Z" ], + "Date": [ "Tue, 30 Apr 2024 05:46:13 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "590" ], + "Content-Length": [ "594" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "280" ], - "x-ms-client-request-id": [ "aac9d9d8-17db-4c02-9cbf-a7bfca488066" ], + "x-ms-unique-id": [ "236" ], + "x-ms-client-request-id": [ "a93be403-16d9-4866-b927-513eced894c1" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -940,38 +984,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ac0a6543-a17f-4fa1-8c60-3d59fdad1e45_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11769" ], - "x-ms-correlation-request-id": [ "eff73732-c134-48dd-8331-48993d489782" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140023Z:eff73732-c134-48dd-8331-48993d489782" ], + "x-ms-request-id": [ "03360648-b303-491b-80df-63f829b6414f_M7CH3_M7CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "3523ca9e-5d38-4538-a37a-9285bae170d7" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054616Z:3523ca9e-5d38-4538-a37a-9285bae170d7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:00:22 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CC943DF8F94F4973BDB2639C6C697FFA Ref B: SEL221051504035 Ref C: 2024-04-30T05:46:13Z" ], + "Date": [ "Tue, 30 Apr 2024 05:46:15 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "590" ], + "Content-Length": [ "594" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourcegroupautorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primarynsd7oma3/disasterRecoveryConfigs/aliasq6x0t1/breakPairing?api-version=2022-10-01-preview+3": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primarynsibt9vz/disasterRecoveryConfigs/aliastkildm/breakPairing?api-version=2022-10-01-preview+3": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourcegroupautorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primarynsd7oma3/disasterRecoveryConfigs/aliasq6x0t1/breakPairing?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primarynsibt9vz/disasterRecoveryConfigs/aliastkildm/breakPairing?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "281" ], - "x-ms-client-request-id": [ "a0885c14-5e02-430e-8e05-cc01485dacbc" ], + "x-ms-unique-id": [ "237" ], + "x-ms-client-request-id": [ "e9840b5a-862f-4f0b-a59c-e7e539fc1a54" ], "CommandName": [ "Az.ServiceBus.private\\Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing_Break" ], "FullCommandName": [ "Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing_Break" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -982,15 +1028,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1e8b95b3-4f47-4e35-93bc-a4b3df8d003d_M6SN1_M6SN1" ], + "x-ms-request-id": [ "6c9349b1-25ef-4c00-aab2-70625713c072_M6SN1_M6SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1177" ], - "x-ms-correlation-request-id": [ "fc444921-42c8-4767-a991-1806aa526d66" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140024Z:fc444921-42c8-4767-a991-1806aa526d66" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "ea8f6931-beef-46fe-b24e-ed628b910017" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T054618Z:ea8f6931-beef-46fe-b24e-ed628b910017" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:00:23 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7364C79397AF4F04BC92D1ECEF3410BA Ref B: SEL221051504035 Ref C: 2024-04-30T05:46:16Z" ], + "Date": [ "Tue, 30 Apr 2024 05:46:18 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -1000,61 +1048,19 @@ "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+4": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "282" ], - "x-ms-client-request-id": [ "ca4ee5b3-3a89-4a80-b766-8c404affa2d2" ], - "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], - "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "56de6c11-e85e-468c-b758-3a5a91a87403_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11768" ], - "x-ms-correlation-request-id": [ "ffbe1a3e-a784-4d54-ab23-de568a4708b4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140024Z:ffbe1a3e-a784-4d54-ab23-de568a4708b4" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:00:24 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "551" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+5": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "283" ], - "x-ms-client-request-id": [ "bb1ad768-baf3-4b86-9ed2-5ab9a3d2712a" ], + "x-ms-unique-id": [ "238" ], + "x-ms-client-request-id": [ "0fdc3bfe-9242-4099-8b4c-39c2fa06f277" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1065,38 +1071,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "756d4187-40f8-4f65-982e-bbf77039a086_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11767" ], - "x-ms-correlation-request-id": [ "1bb5b342-552b-4028-b8f8-e2a09d88a80e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140035Z:1bb5b342-552b-4028-b8f8-e2a09d88a80e" ], + "x-ms-request-id": [ "c1f88e00-4323-445b-8185-996c295521d0_M9CH3_M9CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "e9002b0f-a3f8-44fb-a143-fa245b556df2" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054620Z:e9002b0f-a3f8-44fb-a143-fa245b556df2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:00:34 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9C7D2979B8D54D4391055F7FBD71243C Ref B: SEL221051504035 Ref C: 2024-04-30T05:46:18Z" ], + "Date": [ "Tue, 30 Apr 2024 05:46:20 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+6": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "284" ], - "x-ms-client-request-id": [ "bda5e599-5c1e-4459-b89a-1824fdbf4369" ], + "x-ms-unique-id": [ "239" ], + "x-ms-client-request-id": [ "43c6c4e0-a1b4-406a-be71-4069c80ec915" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1107,38 +1115,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "66737578-3b23-4a15-bd59-cfbdd7401279_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11766" ], - "x-ms-correlation-request-id": [ "77d4584c-ac97-4e23-8191-6658c5c594a8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140046Z:77d4584c-ac97-4e23-8191-6658c5c594a8" ], + "x-ms-request-id": [ "0868f144-4fea-4cfa-8888-487dd5ee7181_M1CH3_M1CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-correlation-request-id": [ "447bb929-c21a-4f79-89e2-8d4253340582" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054631Z:447bb929-c21a-4f79-89e2-8d4253340582" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:00:46 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EEE3AADEB5B947A0A066A86A118C473B Ref B: SEL221051504035 Ref C: 2024-04-30T05:46:30Z" ], + "Date": [ "Tue, 30 Apr 2024 05:46:31 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+7": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "285" ], - "x-ms-client-request-id": [ "507fd457-2a4b-4bec-86ae-b599bf8fdd73" ], + "x-ms-unique-id": [ "240" ], + "x-ms-client-request-id": [ "91980508-16b8-418a-8f6a-f141d3d0ec5c" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1149,38 +1159,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "389c675c-5b20-4f7b-89e8-60ebbdcc446c_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11765" ], - "x-ms-correlation-request-id": [ "1dfb5b25-0446-45a3-b0e4-5f750c71f85a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140057Z:1dfb5b25-0446-45a3-b0e4-5f750c71f85a" ], + "x-ms-request-id": [ "189bf853-a244-4db1-942f-6ced42cc414c_M11CH3_M11CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "ab73e00e-f7eb-4541-90fb-add7c9d251a0" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T054643Z:ab73e00e-f7eb-4541-90fb-add7c9d251a0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:00:56 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1373A91AF3D14FA5853E6292809E3A1C Ref B: SEL221051504035 Ref C: 2024-04-30T05:46:42Z" ], + "Date": [ "Tue, 30 Apr 2024 05:46:42 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+8": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "286" ], - "x-ms-client-request-id": [ "5185cc2e-9bb4-4319-82fe-db4965d2d6c2" ], + "x-ms-unique-id": [ "241" ], + "x-ms-client-request-id": [ "fe55901d-683b-4a78-83c1-5568bf8e2b73" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1191,38 +1203,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6b178a16-15a2-485b-881a-4206e01a4fa1_M6SN1_M6SN1" ], + "x-ms-request-id": [ "9382c74b-a48a-45ae-8a76-67e09a04956b_M11SN1_M11SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11764" ], - "x-ms-correlation-request-id": [ "f5045138-9d14-4d79-a794-c2799763547f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140107Z:f5045138-9d14-4d79-a794-c2799763547f" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "d575902f-ce52-4891-9996-e43bf0cd2921" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054654Z:d575902f-ce52-4891-9996-e43bf0cd2921" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:01:07 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D9D577343C1B4C4C89F4B923245CE8A6 Ref B: SEL221051504035 Ref C: 2024-04-30T05:46:53Z" ], + "Date": [ "Tue, 30 Apr 2024 05:46:54 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+9": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "287" ], - "x-ms-client-request-id": [ "97316b99-917f-4062-86b6-153af7f265f5" ], + "x-ms-unique-id": [ "242" ], + "x-ms-client-request-id": [ "cf91c187-06b2-41ce-993c-22ce09ad8757" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1233,38 +1247,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "dd51bdaf-850b-412c-9aed-934a690099cd_M1CH3_M1CH3" ], + "x-ms-request-id": [ "189a32ad-38c8-4f9c-b75a-bb6f48d126e4_M9CH3_M9CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11763" ], - "x-ms-correlation-request-id": [ "e2bcbead-a49c-454f-a323-f3136d276b0a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140119Z:e2bcbead-a49c-454f-a323-f3136d276b0a" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-correlation-request-id": [ "582fd4e0-f2eb-4236-b380-3d7da4e5c440" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054706Z:582fd4e0-f2eb-4236-b380-3d7da4e5c440" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:01:18 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B944ED57004D4F06A1257B27E3D3EF30 Ref B: SEL221051504035 Ref C: 2024-04-30T05:47:04Z" ], + "Date": [ "Tue, 30 Apr 2024 05:47:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+10": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "288" ], - "x-ms-client-request-id": [ "8f6f98da-a4a3-4e2d-a6cb-3f0d9b6e1b6c" ], + "x-ms-unique-id": [ "243" ], + "x-ms-client-request-id": [ "1e0abff1-35dc-4599-b90a-e0548a15bf32" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1275,38 +1291,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a8d59e6e-4b7c-488c-bb6c-b545757edcd8_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11762" ], - "x-ms-correlation-request-id": [ "6cb2dfa3-6800-4e0b-a72d-4af64d67583b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140131Z:6cb2dfa3-6800-4e0b-a72d-4af64d67583b" ], + "x-ms-request-id": [ "d2cc5a23-2b53-440f-ac8d-5eda29583b88_M4SN1_M4SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "975d995b-10d5-4b79-b701-4ba05890ed91" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054717Z:975d995b-10d5-4b79-b701-4ba05890ed91" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:01:30 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 77D3FA9FB215411CABA7422E2383DAC7 Ref B: SEL221051504035 Ref C: 2024-04-30T05:47:16Z" ], + "Date": [ "Tue, 30 Apr 2024 05:47:17 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+11": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "289" ], - "x-ms-client-request-id": [ "83dd050d-8275-4a4e-8bb8-1e1e187d1212" ], + "x-ms-unique-id": [ "244" ], + "x-ms-client-request-id": [ "5adfc76c-14d9-4077-858f-1f47567b9fea" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1317,38 +1335,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a50c36cf-c6fe-40e1-ab3a-c6b50abdb3be_M11CH3_M11CH3" ], + "x-ms-request-id": [ "66ad755f-6b0f-45d8-8b8a-977788ff6ae5_M10CH3_M10CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11761" ], - "x-ms-correlation-request-id": [ "6858b718-fc15-43ac-983d-09f3efa11e66" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140141Z:6858b718-fc15-43ac-983d-09f3efa11e66" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "ff1d2423-854b-4ad0-a119-0824115c02c1" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054729Z:ff1d2423-854b-4ad0-a119-0824115c02c1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:01:41 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 331EE4C332F34DF5949E17E3D0761A91 Ref B: SEL221051504035 Ref C: 2024-04-30T05:47:27Z" ], + "Date": [ "Tue, 30 Apr 2024 05:47:29 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+12": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+11": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "290" ], - "x-ms-client-request-id": [ "b5c0e9fb-3892-4da1-88a6-10a6b477fa8d" ], + "x-ms-unique-id": [ "245" ], + "x-ms-client-request-id": [ "3a3edf23-2484-4220-ae5c-36edef045500" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1359,78 +1379,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3538e713-d2a8-49d9-b403-936c6adc7a83_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11760" ], - "x-ms-correlation-request-id": [ "e7b80f71-0a60-440e-bf3c-a7f94b9dad3e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140152Z:e7b80f71-0a60-440e-bf3c-a7f94b9dad3e" ], + "x-ms-request-id": [ "c20e42ed-fc3c-49dc-8e87-b11569d4bcc8_M11SN1_M11SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "9cf0c905-73d6-4f6f-ab60-364cdf596b9c" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054740Z:9cf0c905-73d6-4f6f-ab60-364cdf596b9c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:01:51 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 54A932FD052E4B88BDA33C5CA727235D Ref B: SEL221051504035 Ref C: 2024-04-30T05:47:39Z" ], + "Date": [ "Tue, 30 Apr 2024 05:47:40 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "412" ], + "Content-Length": [ "414" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+13": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+12": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"partnerNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"partnerNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "206" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c17c7e78-44ac-4ebf-a45b-c3b61f199791_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1157" ], - "x-ms-correlation-request-id": [ "edae75e5-34df-456f-8ff1-231d539ae6fd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140209Z:edae75e5-34df-456f-8ff1-231d539ae6fd" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:02:08 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "551" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+14": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "292" ], - "x-ms-client-request-id": [ "a9fcfb7a-f07f-4acc-b198-0d15478d0edb" ], - "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], - "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { + "Content-Length": [ "208" ] } }, "Response": { @@ -1438,38 +1418,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7ec1f60a-2793-4fc2-88d6-a3ae65163a56_M11CH3_M11CH3" ], + "x-ms-request-id": [ "c7841ead-0509-4386-a1db-b0499bf64766_M6CH3_M6CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11759" ], - "x-ms-correlation-request-id": [ "42f7fa30-a432-48d2-bc1e-4c6f3dda4ef1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140209Z:42f7fa30-a432-48d2-bc1e-4c6f3dda4ef1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "caea4f06-55f9-406b-b9f4-3f90dde90692" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054758Z:caea4f06-55f9-406b-b9f4-3f90dde90692" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:02:08 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F8297ACB751A4555B3EBD76D208CC046 Ref B: SEL221051504035 Ref C: 2024-04-30T05:47:50Z" ], + "Date": [ "Tue, 30 Apr 2024 05:47:58 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+15": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+13": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "293" ], - "x-ms-client-request-id": [ "71dae123-fa02-4418-9491-5b591f308aa4" ], + "x-ms-unique-id": [ "247" ], + "x-ms-client-request-id": [ "3e55fb10-ce3f-4a41-bd25-2bd203cedc5f" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1480,38 +1462,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "cf8f3ea9-2a4b-45d0-a209-c4489f2a5302_M11CH3_M11CH3" ], + "x-ms-request-id": [ "9982b702-570a-4af8-9d7c-893113680c9a_M9CH3_M9CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11758" ], - "x-ms-correlation-request-id": [ "705fb469-616e-49a4-8132-a74dac363883" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140220Z:705fb469-616e-49a4-8132-a74dac363883" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "4d211da5-8e0f-45fb-915c-bebfb75e4291" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054759Z:4d211da5-8e0f-45fb-915c-bebfb75e4291" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:02:20 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F41DD728823149699423572D0C6DABD8 Ref B: SEL221051504035 Ref C: 2024-04-30T05:47:58Z" ], + "Date": [ "Tue, 30 Apr 2024 05:47:59 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+16": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "294" ], - "x-ms-client-request-id": [ "3abe6464-a02f-4da7-8feb-130698b88b1d" ], + "x-ms-unique-id": [ "248" ], + "x-ms-client-request-id": [ "4403af33-3637-41eb-b7fa-962e92f82685" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1522,38 +1506,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ab11c42b-cd0e-4832-9c3c-a7ebb4a225cb_M11CH3_M11CH3" ], + "x-ms-request-id": [ "a966fad0-d108-41dc-9fb8-eafb5de1ae17_M2CH3_M2CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11757" ], - "x-ms-correlation-request-id": [ "f9138cf1-b7c7-49d0-a9df-053180d1d105" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140231Z:f9138cf1-b7c7-49d0-a9df-053180d1d105" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "b2d67cda-5e6d-4eed-9319-f03aee48a655" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T054811Z:b2d67cda-5e6d-4eed-9319-f03aee48a655" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:02:30 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A8F627242397487DAB9979FAA3AD7603 Ref B: SEL221051504035 Ref C: 2024-04-30T05:48:09Z" ], + "Date": [ "Tue, 30 Apr 2024 05:48:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+17": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+15": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "295" ], - "x-ms-client-request-id": [ "a434b430-9cdf-467c-bebd-67c7d4adf423" ], + "x-ms-unique-id": [ "249" ], + "x-ms-client-request-id": [ "846db36f-0d70-4dc4-96c2-5aa974181caf" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1564,38 +1550,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a966b4e4-6f6c-44ea-be43-b6ae8966fdb4_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11756" ], - "x-ms-correlation-request-id": [ "b487994d-2ff6-482f-a88b-c36f9d03192b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140241Z:b487994d-2ff6-482f-a88b-c36f9d03192b" ], + "x-ms-request-id": [ "7769ffeb-29c3-4e0e-aa1b-85f2b1920e63_M5SN1_M5SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], + "x-ms-correlation-request-id": [ "163dde76-fba4-4db9-8698-6db855c91dda" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054823Z:163dde76-fba4-4db9-8698-6db855c91dda" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:02:41 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0928E985FA4B414AAF76F56B02584FD5 Ref B: SEL221051504035 Ref C: 2024-04-30T05:48:21Z" ], + "Date": [ "Tue, 30 Apr 2024 05:48:22 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+18": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+16": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "296" ], - "x-ms-client-request-id": [ "017d934a-8cf1-4941-ae33-5a45f170fa39" ], + "x-ms-unique-id": [ "250" ], + "x-ms-client-request-id": [ "458292ca-665e-4b45-9c36-8e56ede4a8a8" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1606,38 +1594,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "8c415519-2ae4-4a78-b45f-b1cc6dd14278_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11755" ], - "x-ms-correlation-request-id": [ "17c5d95e-150b-4c87-851b-f13844dda706" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140252Z:17c5d95e-150b-4c87-851b-f13844dda706" ], + "x-ms-request-id": [ "04452825-fec9-4d82-926b-6a6206562e98_M11SN1_M11SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "0c6b8958-508f-45a1-b259-07de6c10593e" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T054834Z:0c6b8958-508f-45a1-b259-07de6c10593e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:02:51 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6BF72C7CB5A34C3DBE883B02B00CFEBD Ref B: SEL221051504035 Ref C: 2024-04-30T05:48:33Z" ], + "Date": [ "Tue, 30 Apr 2024 05:48:33 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+19": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+17": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "297" ], - "x-ms-client-request-id": [ "92729aa2-4800-4b6f-909b-d1ff11a1fbb0" ], + "x-ms-unique-id": [ "251" ], + "x-ms-client-request-id": [ "90c91032-4c7b-46cf-b941-c76fbfc91a31" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1648,38 +1638,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fbd00efe-f8a4-4d4c-962b-1c2c407222e8_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11754" ], - "x-ms-correlation-request-id": [ "8d70a0c1-b3cd-449c-b19f-3ef5045660d4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140303Z:8d70a0c1-b3cd-449c-b19f-3ef5045660d4" ], + "x-ms-request-id": [ "51756aae-730a-4eda-b90e-0752f325a633_M7SN1_M7SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "f37256b9-277c-4b3b-8c8d-51e842ce18e2" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054845Z:f37256b9-277c-4b3b-8c8d-51e842ce18e2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:03:03 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FEEBF1C86A3E43EAA389FEA0447FD818 Ref B: SEL221051504035 Ref C: 2024-04-30T05:48:44Z" ], + "Date": [ "Tue, 30 Apr 2024 05:48:45 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+20": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+18": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "298" ], - "x-ms-client-request-id": [ "e5c55631-03c2-417a-bb34-1227d6a4dfcf" ], + "x-ms-unique-id": [ "252" ], + "x-ms-client-request-id": [ "2223cee1-ead2-42bb-8c75-5b75d0335555" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1690,38 +1682,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "56020d18-f34a-4ed5-aa1c-6cd8a124f7cd_M11CH3_M11CH3" ], + "x-ms-request-id": [ "3b178278-fd7e-4e76-8ce7-77b1141ddbe5_M2CH3_M2CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11753" ], - "x-ms-correlation-request-id": [ "2e4224e6-a69a-46f6-9446-f4a738fb7932" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140314Z:2e4224e6-a69a-46f6-9446-f4a738fb7932" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "68721999-9261-40e1-bd6e-c2bfbebdfd9a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054857Z:68721999-9261-40e1-bd6e-c2bfbebdfd9a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:03:13 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8C54098DD0D840DDB24EAE886767E014 Ref B: SEL221051504035 Ref C: 2024-04-30T05:48:55Z" ], + "Date": [ "Tue, 30 Apr 2024 05:48:57 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+21": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+19": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "299" ], - "x-ms-client-request-id": [ "44d1c400-c8c2-4756-add4-cf535ae861d5" ], + "x-ms-unique-id": [ "253" ], + "x-ms-client-request-id": [ "482ba026-e80f-414a-8695-173c8fdc877f" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1732,38 +1726,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "33043279-9bda-4e77-84c3-b4119c983b3d_M11CH3_M11CH3" ], + "x-ms-request-id": [ "904e5d88-f882-416f-8cf5-0281259bde31_M8CH3_M8CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11752" ], - "x-ms-correlation-request-id": [ "a1238242-9b67-4ca3-af1f-27a7bb11c5ca" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140324Z:a1238242-9b67-4ca3-af1f-27a7bb11c5ca" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "8cd77a75-e4d2-4411-a10f-8dc70cedf7ff" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T054908Z:8cd77a75-e4d2-4411-a10f-8dc70cedf7ff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:03:24 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9E842C5DF5FE402893A5EB5B57343F81 Ref B: SEL221051504035 Ref C: 2024-04-30T05:49:07Z" ], + "Date": [ "Tue, 30 Apr 2024 05:49:08 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+22": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+20": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "300" ], - "x-ms-client-request-id": [ "9f2179b8-b3a6-4bad-bc84-0a54145d4561" ], + "x-ms-unique-id": [ "254" ], + "x-ms-client-request-id": [ "13be6411-2fe9-4a11-a096-841a99ac4926" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1774,38 +1770,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "da52ad40-6e4c-4c04-a40f-d49b0f7eb91f_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11751" ], - "x-ms-correlation-request-id": [ "ccee6070-62f8-4f9f-955a-5af7a4651bf8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140335Z:ccee6070-62f8-4f9f-955a-5af7a4651bf8" ], + "x-ms-request-id": [ "54dc9de2-8e81-4821-b92b-a7cde9f3c96f_M7SN1_M7SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-correlation-request-id": [ "aac43275-e578-4058-b61c-bd29eb879898" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054920Z:aac43275-e578-4058-b61c-bd29eb879898" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:03:34 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6675BCFF52ED4BF0844BE0E4A0D59342 Ref B: SEL221051504035 Ref C: 2024-04-30T05:49:19Z" ], + "Date": [ "Tue, 30 Apr 2024 05:49:20 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+23": { + "Set-AzServiceBusGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+21": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "301" ], - "x-ms-client-request-id": [ "f2218269-b51d-4417-8f3d-c426a84f0d7b" ], + "x-ms-unique-id": [ "255" ], + "x-ms-client-request-id": [ "97818e4b-807c-4812-8a7e-810d8869d910" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1816,22 +1814,24 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "32dcd7be-a950-4c89-89b2-ec20e05fac3c_M11CH3_M11CH3" ], + "x-ms-request-id": [ "c9dcf8af-675c-483e-8416-c8c4874ad319_M2CH3_M2CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11750" ], - "x-ms-correlation-request-id": [ "bc3bebcb-ca92-4f0c-857a-eda7e5c65edd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140346Z:bc3bebcb-ca92-4f0c-857a-eda7e5c65edd" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "189b7448-1e79-40c0-8164-768a737257b2" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054931Z:189b7448-1e79-40c0-8164-768a737257b2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:03:46 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BFE75CF7C16B4349AFA88C81D8F73EFD Ref B: SEL221051504035 Ref C: 2024-04-30T05:49:30Z" ], + "Date": [ "Tue, 30 Apr 2024 05:49:31 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "590" ], + "Content-Length": [ "594" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusGeoDRConfigurationBreakPair.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusGeoDRConfigurationBreakPair.Tests.ps1 index d6bb55b3f2c8..9ae502cfbb6f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusGeoDRConfigurationBreakPair.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusGeoDRConfigurationBreakPair.Tests.ps1 @@ -15,13 +15,13 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzServiceBusGeoDRConfigur } Describe 'Set-AzServiceBusGeoDRConfigurationBreakPair' { - It 'Break' { + It 'Break' -skip:$($env.secondaryLocation -eq '') { Set-AzServiceBusGeoDRConfigurationBreakPair -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace -Name $env.alias - + while($drConfig.ProvisioningState -ne "Succeeded"){ $drConfig = Get-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace if ($TestMode -ne 'playback') { - Start-TestSleep 10 + Start-Sleep 10 } } @@ -31,24 +31,24 @@ Describe 'Set-AzServiceBusGeoDRConfigurationBreakPair' { $drConfig.Role | Should -Be "PrimaryNotReplicating" $drConfig = New-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace -PartnerNamespace $env.secondaryNamespaceResourceId - + while($drConfig.ProvisioningState -ne "Succeeded"){ $drConfig = Get-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace if ($TestMode -ne 'playback') { - Start-TestSleep 10 + Start-Sleep 10 } } } - It 'BreakViaIdentity' { + It 'BreakViaIdentity' -skip:$($env.secondaryLocation -eq '') { $drConfig = Get-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace Set-AzServiceBusGeoDRConfigurationBreakPair -InputObject $drConfig - + do{ $drConfig = Get-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace if ($TestMode -ne 'playback') { - Start-TestSleep 10 + Start-Sleep 10 } } while($drConfig.ProvisioningState -ne "Succeeded") @@ -58,11 +58,11 @@ Describe 'Set-AzServiceBusGeoDRConfigurationBreakPair' { $drConfig.Role | Should -Be "PrimaryNotReplicating" $drConfig = New-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace -PartnerNamespace $env.secondaryNamespaceResourceId - + while($drConfig.ProvisioningState -ne "Succeeded"){ $drConfig = Get-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace if ($TestMode -ne 'playback') { - Start-TestSleep 10 + Start-Sleep 10 } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusGeoDRConfigurationFailOver.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusGeoDRConfigurationFailOver.Recording.json index cd55c31cc326..0436d989d41f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusGeoDRConfigurationFailOver.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusGeoDRConfigurationFailOver.Recording.json @@ -1,17 +1,17 @@ { - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "302" ], - "x-ms-client-request-id": [ "8c238ad4-94b8-432f-b876-1e8b0c3e414c" ], + "x-ms-unique-id": [ "256" ], + "x-ms-client-request-id": [ "a93d4533-66e7-4a85-9788-afaa21c07c55" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,29 +22,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "980a136d-9ac7-4ffc-9aca-01f7a51f95b9_M11CH3_M11CH3" ], + "x-ms-request-id": [ "da049c91-4c71-4467-af70-19f3884f8d17_M5CH3_M5CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11749" ], - "x-ms-correlation-request-id": [ "26aa9987-53f7-4793-b8ce-80361e122b3d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140411Z:26aa9987-53f7-4793-b8ce-80361e122b3d" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-correlation-request-id": [ "8171af51-e340-4582-9bc5-0c6ec67a77dd" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T054957Z:8171af51-e340-4582-9bc5-0c6ec67a77dd" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:04:10 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EAB627A649684CDBAA3CB851EC0D5E00 Ref B: SEL221051504035 Ref C: 2024-04-30T05:49:55Z" ], + "Date": [ "Tue, 30 Apr 2024 05:49:56 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "554" ], + "Content-Length": [ "558" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1/failover?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm/failover?api-version=2022-10-01-preview+2": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1/failover?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm/failover?api-version=2022-10-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -59,15 +61,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ddb3d3b2-d1c8-4d9a-bc07-1eaf8c082dc0_M11CH3_M11CH3" ], + "x-ms-request-id": [ "9915471e-03a9-45e7-aa90-611f1df866e1_M2CH3_M2CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1176" ], - "x-ms-correlation-request-id": [ "6b968f91-47a1-4bc8-9120-78cc6a77d188" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140411Z:6b968f91-47a1-4bc8-9120-78cc6a77d188" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "df71400e-c61f-4c20-b101-c37c0e5436c8" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T054959Z:df71400e-c61f-4c20-b101-c37c0e5436c8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:04:10 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A381DA10A81C4E1D9A953861C7C74209 Ref B: SEL221051504035 Ref C: 2024-04-30T05:49:57Z" ], + "Date": [ "Tue, 30 Apr 2024 05:49:59 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -77,61 +81,19 @@ "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+3": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "304" ], - "x-ms-client-request-id": [ "c5e8bea6-02e3-451d-b575-3239925c5cf8" ], - "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], - "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2149b5d1-5ebb-4757-96a1-df9c15d40b05_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11748" ], - "x-ms-correlation-request-id": [ "8a5a1b57-fc41-48e9-a641-72194c8d6a6d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140412Z:8a5a1b57-fc41-48e9-a641-72194c8d6a6d" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:04:11 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "553" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+4": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "305" ], - "x-ms-client-request-id": [ "742f26bb-ad78-488d-b4b4-1cd3d65deca8" ], + "x-ms-unique-id": [ "258" ], + "x-ms-client-request-id": [ "1f1f1937-4376-4d2e-8f29-554e72f50b11" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -142,38 +104,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "cb863faa-6c52-4b53-b197-f51218e0adad_M11CH3_M11CH3" ], + "x-ms-request-id": [ "3cbdfe17-38f3-47e2-b553-a8de63dbdb81_M2CH3_M2CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11747" ], - "x-ms-correlation-request-id": [ "2d17aa9c-9d62-49a9-ba49-0c5c74cc6898" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140422Z:2d17aa9c-9d62-49a9-ba49-0c5c74cc6898" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "3ba52b9d-e79f-424d-a18f-f57bfa3fb991" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T055002Z:3ba52b9d-e79f-424d-a18f-f57bfa3fb991" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:04:22 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E902B2F879E94A44A613073929F973E1 Ref B: SEL221051504035 Ref C: 2024-04-30T05:50:00Z" ], + "Date": [ "Tue, 30 Apr 2024 05:50:01 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "553" ], + "Content-Length": [ "557" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+5": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "306" ], - "x-ms-client-request-id": [ "7913e909-a867-4d4e-8ae2-2721c768170b" ], + "x-ms-unique-id": [ "259" ], + "x-ms-client-request-id": [ "f2926fa7-6b0f-49e5-85d0-d3a0e4b43bb2" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -184,38 +148,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "eaa25504-92cf-4bfe-a9de-d29c0eb83d62_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11746" ], - "x-ms-correlation-request-id": [ "037e9c0c-4341-4168-912d-7a1fe68d9e37" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140433Z:037e9c0c-4341-4168-912d-7a1fe68d9e37" ], + "x-ms-request-id": [ "b0ef345e-a693-4357-b68e-dddafb36fbc2_M1SN1_M1SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "dd1c4816-0392-4c46-bceb-1d7c00028b8b" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T055014Z:dd1c4816-0392-4c46-bceb-1d7c00028b8b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:04:32 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 26B3BCD08CCA49F9B2FC6E82BE81A0BF Ref B: SEL221051504035 Ref C: 2024-04-30T05:50:12Z" ], + "Date": [ "Tue, 30 Apr 2024 05:50:13 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "553" ], + "Content-Length": [ "557" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+6": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "307" ], - "x-ms-client-request-id": [ "bc9ecc3a-c758-4b87-9637-736126497b59" ], + "x-ms-unique-id": [ "260" ], + "x-ms-client-request-id": [ "fc2a0b95-2cde-4961-bb7d-0ba51c411695" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -226,38 +192,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "8c1c3528-eae5-4e5e-a109-c602608cc46e_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11745" ], - "x-ms-correlation-request-id": [ "0462c43d-eace-4bb5-b1dd-cdd7fad1fbc6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140443Z:0462c43d-eace-4bb5-b1dd-cdd7fad1fbc6" ], + "x-ms-request-id": [ "f64f0af0-3db7-4152-9b01-43219121128d_M11SN1_M11SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "c056f61c-a880-4055-8328-e83bebd72742" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T055025Z:c056f61c-a880-4055-8328-e83bebd72742" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:04:43 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 14F0A7DD9C4748DCB31730C9C740AFCA Ref B: SEL221051504035 Ref C: 2024-04-30T05:50:24Z" ], + "Date": [ "Tue, 30 Apr 2024 05:50:25 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "553" ], + "Content-Length": [ "557" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+7": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "308" ], - "x-ms-client-request-id": [ "f6138b02-88a1-4f1f-9f9e-89d56740ded2" ], + "x-ms-unique-id": [ "261" ], + "x-ms-client-request-id": [ "1eaed0ab-5f55-42c8-abb3-4e5afc0d6357" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -268,38 +236,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "590430d9-4495-447d-b995-138ae9112906_M11CH3_M11CH3" ], + "x-ms-request-id": [ "76ab53e5-9aea-4209-8150-8413e923d7d5_M2CH3_M2CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11744" ], - "x-ms-correlation-request-id": [ "3d5b76d2-c051-49f6-b59d-8197602346cc" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140454Z:3d5b76d2-c051-49f6-b59d-8197602346cc" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "5341d5f8-6cd9-4f1b-a057-73feed69e53e" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T055036Z:5341d5f8-6cd9-4f1b-a057-73feed69e53e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:04:53 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6583564851514A70B525AE087C84DFF1 Ref B: SEL221051504035 Ref C: 2024-04-30T05:50:35Z" ], + "Date": [ "Tue, 30 Apr 2024 05:50:36 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "553" ], + "Content-Length": [ "557" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+8": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "309" ], - "x-ms-client-request-id": [ "2250b0a5-671b-4fe5-a254-cda326a9f9d9" ], + "x-ms-unique-id": [ "262" ], + "x-ms-client-request-id": [ "92a226f9-121d-4974-90f6-7a19f7e707f0" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -310,38 +280,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "98466443-6c56-4924-b68b-4dee147bf49f_M11CH3_M11CH3" ], + "x-ms-request-id": [ "1a75b6c2-ccf5-4030-979a-85d9bdb124ee_M2CH3_M2CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11773" ], - "x-ms-correlation-request-id": [ "0301c2bd-1288-4396-adf0-1c1845b596b3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140505Z:0301c2bd-1288-4396-adf0-1c1845b596b3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "27db9ff2-b32d-41ea-b2e5-081152ea5440" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T055048Z:27db9ff2-b32d-41ea-b2e5-081152ea5440" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:05:04 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CB2F6766D7E944908CC6D00D3240760A Ref B: SEL221051504035 Ref C: 2024-04-30T05:50:47Z" ], + "Date": [ "Tue, 30 Apr 2024 05:50:48 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "553" ], + "Content-Length": [ "557" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+9": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "310" ], - "x-ms-client-request-id": [ "f182132d-0bad-4abe-aceb-80777914f4f7" ], + "x-ms-unique-id": [ "263" ], + "x-ms-client-request-id": [ "4bbbe61b-197c-4563-8169-54104fb6cb40" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -352,38 +324,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "896f1092-f890-42c2-8c96-f8b693e58754_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11772" ], - "x-ms-correlation-request-id": [ "7c6f6110-a9ef-4568-aeef-a9261f463c80" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140515Z:7c6f6110-a9ef-4568-aeef-a9261f463c80" ], + "x-ms-request-id": [ "42949fe6-897c-47a1-a44c-ced60aa17aaf_M2SN1_M2SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "676e5b3e-de47-458b-8ef6-e8d85fd05b7d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T055100Z:676e5b3e-de47-458b-8ef6-e8d85fd05b7d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:05:15 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 53C44F40E5DE4C2090A44B21F4450F9D Ref B: SEL221051504035 Ref C: 2024-04-30T05:50:58Z" ], + "Date": [ "Tue, 30 Apr 2024 05:50:59 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "553" ], + "Content-Length": [ "557" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+10": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "311" ], - "x-ms-client-request-id": [ "5a0b3232-2225-421c-ba24-af1d30116b5d" ], + "x-ms-unique-id": [ "264" ], + "x-ms-client-request-id": [ "28a149c9-fe1e-49ca-b08c-ca5179fca236" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -394,38 +368,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a0051308-edca-4a53-bf12-c7d2e42b6adf_M11CH3_M11CH3" ], + "x-ms-request-id": [ "6fbe3528-348d-424a-bc22-283a6acd68b0_M3CH3_M3CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11771" ], - "x-ms-correlation-request-id": [ "fc76073e-80e1-43fa-93bc-d20da2fd6c04" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140526Z:fc76073e-80e1-43fa-93bc-d20da2fd6c04" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "701de6af-e9eb-4fc6-a918-09a42f5ead26" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T055111Z:701de6af-e9eb-4fc6-a918-09a42f5ead26" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:05:25 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 88F06AE88D1245D58643374CF712ED82 Ref B: SEL221051504035 Ref C: 2024-04-30T05:51:10Z" ], + "Date": [ "Tue, 30 Apr 2024 05:51:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "553" ], + "Content-Length": [ "557" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+11": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "312" ], - "x-ms-client-request-id": [ "1b3298ba-3683-46fb-b0ea-a56784ce0037" ], + "x-ms-unique-id": [ "265" ], + "x-ms-client-request-id": [ "4077a2da-1162-4688-83e5-4790305f154e" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -436,38 +412,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "066a34d3-00f6-403c-89c9-cd9c874aa212_M11CH3_M11CH3" ], + "x-ms-request-id": [ "51f97490-4c4f-4d63-977d-db98f25c6603_M9CH3_M9CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11770" ], - "x-ms-correlation-request-id": [ "104fb279-5c70-4adf-b30f-8de7db2ddb7e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140537Z:104fb279-5c70-4adf-b30f-8de7db2ddb7e" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "371d1061-b94c-4276-8127-b34ebf5bcfb1" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T055122Z:371d1061-b94c-4276-8127-b34ebf5bcfb1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:05:36 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B67162E086F845AA869CAA26D19E505F Ref B: SEL221051504035 Ref C: 2024-04-30T05:51:21Z" ], + "Date": [ "Tue, 30 Apr 2024 05:51:22 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "414" ], + "Content-Length": [ "416" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+12": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+11": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "313" ], - "x-ms-client-request-id": [ "c9d40d4b-27ee-4778-9f5d-9de0ab7607ec" ], + "x-ms-unique-id": [ "266" ], + "x-ms-client-request-id": [ "4cadf6d7-e710-4b38-8f8f-e7a556a5f871" ], "CommandName": [ "Remove-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Remove-AzServiceBusGeoDRConfiguration_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -478,15 +456,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "58c28003-2ca6-4b6a-8d7c-f4b2490eef76_M11CH3_M11CH3" ], + "x-ms-request-id": [ "b73261d8-9003-400f-ab25-10e7a06ecfe0_M5CH3_M5CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14981" ], - "x-ms-correlation-request-id": [ "dfeab7fc-51f4-4f88-b827-536f25a003e2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140547Z:dfeab7fc-51f4-4f88-b827-536f25a003e2" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-correlation-request-id": [ "67db0a3f-8eab-4aaf-ab52-5b7205699b7c" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T055135Z:67db0a3f-8eab-4aaf-ab52-5b7205699b7c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:05:46 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D77184841EBF4662B11B8565AFB04EDA Ref B: SEL221051504035 Ref C: 2024-04-30T05:51:32Z" ], + "Date": [ "Tue, 30 Apr 2024 05:51:34 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -496,17 +476,17 @@ "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+13": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+12": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"partnerNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"partnerNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "206" ] + "Content-Length": [ "208" ] } }, "Response": { @@ -514,38 +494,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "88e0d4d9-921e-4044-9725-aca6613112f8_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "2db7706a-a9d2-4e9b-a22a-8b8bdab7fdc9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140857Z:2db7706a-a9d2-4e9b-a22a-8b8bdab7fdc9" ], + "x-ms-request-id": [ "62cf80ef-b5d4-4ebd-a21d-79b480526208_M9CH3_M9CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-correlation-request-id": [ "85454c6c-d983-4bd0-951a-7ac3e9549da4" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T055445Z:85454c6c-d983-4bd0-951a-7ac3e9549da4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:08:56 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 191CF8AA829541C8BB8659123E3C4AFF Ref B: SEL221051504017 Ref C: 2024-04-30T05:54:35Z" ], + "Date": [ "Tue, 30 Apr 2024 05:54:45 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+14": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+13": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "315" ], - "x-ms-client-request-id": [ "0b4892ef-b1a3-45ec-90dd-87bbf150c946" ], + "x-ms-unique-id": [ "268" ], + "x-ms-client-request-id": [ "058ec525-8081-4f9a-90a2-582937a1260a" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -556,38 +538,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "96e2dfc6-fe47-47ff-9883-b202037b7aaa_M5SN1_M5SN1" ], + "x-ms-request-id": [ "1cbc34f9-3ab0-4f10-9e13-0e1f6f0c8633_M4SN1_M4SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], - "x-ms-correlation-request-id": [ "cacf877a-6f7e-4039-9965-9342c28c51a2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140858Z:cacf877a-6f7e-4039-9965-9342c28c51a2" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "c3f76c43-e43b-48da-8877-93cbcf9c9ba5" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T055446Z:c3f76c43-e43b-48da-8877-93cbcf9c9ba5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:08:57 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E9955F767B1D40169451B1840037EC94 Ref B: SEL221051504017 Ref C: 2024-04-30T05:54:45Z" ], + "Date": [ "Tue, 30 Apr 2024 05:54:46 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+15": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "316" ], - "x-ms-client-request-id": [ "6eb5cdd8-9e79-4b00-bd8b-fa8626f75d17" ], + "x-ms-unique-id": [ "269" ], + "x-ms-client-request-id": [ "38ca1000-45ba-4ef9-b8e5-53f140384912" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -598,38 +582,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d59374b6-16b6-4f22-b2cb-f3bd4327f6b9_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], - "x-ms-correlation-request-id": [ "02ed736f-2403-42ce-b2df-afce21472753" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140909Z:02ed736f-2403-42ce-b2df-afce21472753" ], + "x-ms-request-id": [ "e518bb5a-c37d-4fb9-a20f-2d422b2f4199_M0CH3_M0CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "e03c7fa0-1301-4e03-af0d-0dd5f37a1544" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T055458Z:e03c7fa0-1301-4e03-af0d-0dd5f37a1544" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:09:09 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9C4299CB6F8F44E4B8A73BFB685DC692 Ref B: SEL221051504017 Ref C: 2024-04-30T05:54:56Z" ], + "Date": [ "Tue, 30 Apr 2024 05:54:58 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+16": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+15": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "317" ], - "x-ms-client-request-id": [ "922060c0-a0ae-496d-8e61-417691b6d782" ], + "x-ms-unique-id": [ "270" ], + "x-ms-client-request-id": [ "0e03847f-c552-4eef-a704-3e0f28fca922" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -640,38 +626,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3487b42f-e6e1-4c72-9eeb-4cb5004e9f56_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], + "x-ms-request-id": [ "04d80dcd-c514-4bc1-8639-98bcc91a3bce_M3CH3_M3CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], - "x-ms-correlation-request-id": [ "f4b5520e-15ca-4cc8-a7fc-9490ad3b5e51" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140920Z:f4b5520e-15ca-4cc8-a7fc-9490ad3b5e51" ], + "x-ms-correlation-request-id": [ "069377ad-ffe1-402a-9d1e-aa336a312170" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T055509Z:069377ad-ffe1-402a-9d1e-aa336a312170" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:09:19 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7E3E4C1CA20A4B028400677C60EA824C Ref B: SEL221051504017 Ref C: 2024-04-30T05:55:08Z" ], + "Date": [ "Tue, 30 Apr 2024 05:55:09 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+17": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+16": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "318" ], - "x-ms-client-request-id": [ "cbb0c72c-26e5-4a76-bd43-b298238868b4" ], + "x-ms-unique-id": [ "271" ], + "x-ms-client-request-id": [ "a1e87f77-2b24-4f8c-b643-6083e6d02a30" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -682,38 +670,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0d8711d5-ffd2-43f4-a957-fbc30d081bcc_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11985" ], - "x-ms-correlation-request-id": [ "ec8b1485-0978-4c48-b154-faeac415354c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140930Z:ec8b1485-0978-4c48-b154-faeac415354c" ], + "x-ms-request-id": [ "3475f9d1-9965-4edb-82f9-710418547ac7_M3CH3_M3CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "aa263b1e-cdb7-44ee-8ac2-c637eff34c89" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T055521Z:aa263b1e-cdb7-44ee-8ac2-c637eff34c89" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:09:30 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 923E1FA8EB544CDC80BA49AC25150ADD Ref B: SEL221051504017 Ref C: 2024-04-30T05:55:19Z" ], + "Date": [ "Tue, 30 Apr 2024 05:55:21 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+18": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+17": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "319" ], - "x-ms-client-request-id": [ "3b65d2e0-1f3e-4804-a6d4-4c57bf0b7517" ], + "x-ms-unique-id": [ "272" ], + "x-ms-client-request-id": [ "20ab78d7-5dad-4fb8-9e7d-b836924a307a" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -724,38 +714,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a6a36f84-7427-4ef5-95e0-26bc5fb3ba54_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11984" ], - "x-ms-correlation-request-id": [ "edef4c6c-3d3b-4df9-89b8-e6789fbc1353" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140941Z:edef4c6c-3d3b-4df9-89b8-e6789fbc1353" ], + "x-ms-request-id": [ "63273d08-ca84-49c3-8ad3-8ed6c76b1220_M2CH3_M2CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-correlation-request-id": [ "6b295daf-6042-4884-9682-8ac3ed5eaaa3" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T055532Z:6b295daf-6042-4884-9682-8ac3ed5eaaa3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:09:40 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CC0FDE91FDE140E6B47DDD32FEAE1B2C Ref B: SEL221051504017 Ref C: 2024-04-30T05:55:31Z" ], + "Date": [ "Tue, 30 Apr 2024 05:55:32 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+19": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+18": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "320" ], - "x-ms-client-request-id": [ "b1b1a947-ad05-42ff-9241-c3ae764a8cab" ], + "x-ms-unique-id": [ "273" ], + "x-ms-client-request-id": [ "e83cadd3-6b18-48dd-a41a-e2dca3dbd764" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -766,38 +758,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "576b82e4-5c14-42e0-be24-6909a4dce8c9_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11983" ], - "x-ms-correlation-request-id": [ "60971787-66ba-4433-b849-adc801a96f50" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T140952Z:60971787-66ba-4433-b849-adc801a96f50" ], + "x-ms-request-id": [ "9276af8b-a8fe-4233-bede-4585af0147ea_M3CH3_M3CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "d7a79128-a35a-4efa-8e32-e07db3fefce6" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T055544Z:d7a79128-a35a-4efa-8e32-e07db3fefce6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:09:51 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DEC1F1C51E264A6196881E94DAB9164D Ref B: SEL221051504017 Ref C: 2024-04-30T05:55:42Z" ], + "Date": [ "Tue, 30 Apr 2024 05:55:44 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+20": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+19": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "321" ], - "x-ms-client-request-id": [ "77c29471-5934-46d0-8df0-4b9dd45e18d5" ], + "x-ms-unique-id": [ "274" ], + "x-ms-client-request-id": [ "5df24a56-c163-4293-8a8a-f57ea0a1dd42" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -808,38 +802,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c2965424-db96-49c1-9b06-63da35b80eb8_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "185437d9-1e1f-4571-801c-0134d76dbf19" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141003Z:185437d9-1e1f-4571-801c-0134d76dbf19" ], + "x-ms-request-id": [ "5e763236-b14a-4bec-b10e-c453e723bd3f_M0CH3_M0CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-correlation-request-id": [ "8116a861-f12f-4bad-a3f9-f1ccaf7cf996" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T055555Z:8116a861-f12f-4bad-a3f9-f1ccaf7cf996" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:10:02 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F775FE8AD18D44A08F7EF4DDE62188D2 Ref B: SEL221051504017 Ref C: 2024-04-30T05:55:54Z" ], + "Date": [ "Tue, 30 Apr 2024 05:55:55 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+21": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+20": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "322" ], - "x-ms-client-request-id": [ "4d6f3e0d-956c-4779-bbf8-addca292d6ef" ], + "x-ms-unique-id": [ "275" ], + "x-ms-client-request-id": [ "622160ea-45a7-4264-bc0a-2463e293d2f4" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -850,38 +846,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "efa450b8-e214-4773-aaae-059c3e18573d_M5SN1_M5SN1" ], + "x-ms-request-id": [ "88e3a188-a728-4d2d-93d2-f60ac0f85a6e_M10SN1_M10SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "b16255ce-8e5d-463e-ac9d-c8c7528b360b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141018Z:b16255ce-8e5d-463e-ac9d-c8c7528b360b" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "379d1adc-2746-4b17-9c9f-82f906eaa52a" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T055606Z:379d1adc-2746-4b17-9c9f-82f906eaa52a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:10:17 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 54235FB3299F4087BBFC8A3353FC5CCD Ref B: SEL221051504017 Ref C: 2024-04-30T05:56:05Z" ], + "Date": [ "Tue, 30 Apr 2024 05:56:06 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "551" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+22": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+21": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "323" ], - "x-ms-client-request-id": [ "1d9c7c6e-0ac9-4d56-a299-bc7df00bcdd3" ], + "x-ms-unique-id": [ "276" ], + "x-ms-client-request-id": [ "4d35af7c-cdec-46e9-9030-6f1bb51291a0" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -892,38 +890,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "96d74546-6f32-413f-ba9e-3fd92b22a213_M1SN1_M1SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "e475af1d-1df6-4b11-8390-6ad85f63f0cf" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141029Z:e475af1d-1df6-4b11-8390-6ad85f63f0cf" ], + "x-ms-request-id": [ "1a1bba71-b838-482d-a09b-65fa1105ac04_M5CH3_M5CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-correlation-request-id": [ "27652764-8af5-4ae5-b7ab-9e5cb06abb1f" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T055618Z:27652764-8af5-4ae5-b7ab-9e5cb06abb1f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:10:28 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3BE7CA93EF9D4EA1A7628C659CB2846D Ref B: SEL221051504017 Ref C: 2024-04-30T05:56:16Z" ], + "Date": [ "Tue, 30 Apr 2024 05:56:18 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "590" ], + "Content-Length": [ "594" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "324" ], - "x-ms-client-request-id": [ "2d6d6f3c-edd0-4414-ac9a-c0c820d1f5e5" ], + "x-ms-unique-id": [ "277" ], + "x-ms-client-request-id": [ "536b60fa-9487-4950-bde4-37706550a5eb" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -934,38 +934,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3f7c810f-60b2-46cb-b894-73d3e4ca7a51_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-correlation-request-id": [ "bae4ad1b-f2c1-4d70-904a-7beea63fedc7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141041Z:bae4ad1b-f2c1-4d70-904a-7beea63fedc7" ], + "x-ms-request-id": [ "be9bfe58-dc18-42f3-8f71-93a298b453d9_M6CH3_M6CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-correlation-request-id": [ "ebbb8bcf-e72c-487d-bbcd-be2763dee36b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T055629Z:ebbb8bcf-e72c-487d-bbcd-be2763dee36b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:10:41 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 345C248E61D04AF5935868598FFA3AD4 Ref B: SEL221051504017 Ref C: 2024-04-30T05:56:28Z" ], + "Date": [ "Tue, 30 Apr 2024 05:56:29 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "554" ], + "Content-Length": [ "558" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "325" ], - "x-ms-client-request-id": [ "02275f8d-4ccd-4d3c-b777-129417b9c8ae" ], + "x-ms-unique-id": [ "278" ], + "x-ms-client-request-id": [ "f4d8da32-c825-46b5-a94c-4721e412d92a" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -976,29 +978,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5173f414-776b-4d76-b6e1-9c57e36efee4_M2SN1_M2SN1" ], + "x-ms-request-id": [ "cda929bf-e2e0-43ae-a5af-c830372a3983_M8SN1_M8SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], - "x-ms-correlation-request-id": [ "aa05c65c-a17b-4051-9ea6-c96eaeb17309" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141041Z:aa05c65c-a17b-4051-9ea6-c96eaeb17309" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-correlation-request-id": [ "77cfd52d-aac5-4b8a-8c1b-c71b7125bd74" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T055631Z:77cfd52d-aac5-4b8a-8c1b-c71b7125bd74" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:10:41 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9585870DE11E4CB582415F5159F76C99 Ref B: SEL221051504017 Ref C: 2024-04-30T05:56:30Z" ], + "Date": [ "Tue, 30 Apr 2024 05:56:31 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "554" ], + "Content-Length": [ "558" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourcegroupautorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondarynsjazpct/disasterRecoveryConfigs/aliasq6x0t1/failover?api-version=2022-10-01-preview+3": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondarynskhnx2q/disasterRecoveryConfigs/aliastkildm/failover?api-version=2022-10-01-preview+3": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourcegroupautorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondarynsjazpct/disasterRecoveryConfigs/aliasq6x0t1/failover?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondarynskhnx2q/disasterRecoveryConfigs/aliastkildm/failover?api-version=2022-10-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -1013,15 +1017,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fda87c08-335c-46fe-be38-8bb90760347b_M2SN1_M2SN1" ], + "x-ms-request-id": [ "79a26c9f-4bfa-447b-ab76-fe9eca9e2d3c_M11SN1_M11SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "f734a2ea-35d8-43c1-930e-ce3cb010aeee" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141042Z:f734a2ea-35d8-43c1-930e-ce3cb010aeee" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-correlation-request-id": [ "a4e4cf1c-2283-4b86-a3f5-6e3e57c74c27" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T055634Z:a4e4cf1c-2283-4b86-a3f5-6e3e57c74c27" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:10:42 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F60DA7AE564440DD8CD3E6BBDFF00ABB Ref B: SEL221051504017 Ref C: 2024-04-30T05:56:31Z" ], + "Date": [ "Tue, 30 Apr 2024 05:56:33 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -1031,19 +1037,19 @@ "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+4": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "327" ], - "x-ms-client-request-id": [ "41de0634-d171-4cb5-bfb7-0fdf208fa147" ], + "x-ms-unique-id": [ "280" ], + "x-ms-client-request-id": [ "ecb69371-77d1-4ec2-b8ad-3661478bf4fa" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1054,38 +1060,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1f3970a1-a9c5-4053-a540-a9206f99f725_M2SN1_M2SN1" ], + "x-ms-request-id": [ "9b3952ea-c696-4b8c-964f-c293524bcc79_M4SN1_M4SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], - "x-ms-correlation-request-id": [ "b5a1a2a7-2f9c-451c-b373-cdf662475be3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141043Z:b5a1a2a7-2f9c-451c-b373-cdf662475be3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-correlation-request-id": [ "ea18b084-6567-4330-855a-a485cb3e46f3" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T055635Z:ea18b084-6567-4330-855a-a485cb3e46f3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:10:43 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 26FA574194504FDE9ACE1709419CB581 Ref B: SEL221051504017 Ref C: 2024-04-30T05:56:34Z" ], + "Date": [ "Tue, 30 Apr 2024 05:56:35 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "553" ], + "Content-Length": [ "557" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+5": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "328" ], - "x-ms-client-request-id": [ "69a7118b-7a40-4b5f-a2a3-4fca3b4a85f0" ], + "x-ms-unique-id": [ "281" ], + "x-ms-client-request-id": [ "4f8ddbc3-8921-4ad0-a858-ef9fc93ac839" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1096,38 +1104,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "424a59de-cfe3-4b30-a16a-f8fb02f1094a_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], - "x-ms-correlation-request-id": [ "7abc5b5d-873c-4b23-8d3b-4080f7a7f79f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141054Z:7abc5b5d-873c-4b23-8d3b-4080f7a7f79f" ], + "x-ms-request-id": [ "b7c5576d-7764-4579-a5be-d95e6a3f3418_M2CH3_M2CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "8daa0316-20f5-4273-95f0-03cdf2df3b20" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T055647Z:8daa0316-20f5-4273-95f0-03cdf2df3b20" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:10:53 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1D382083CB9C425489332C33EFEE7BDA Ref B: SEL221051504017 Ref C: 2024-04-30T05:56:45Z" ], + "Date": [ "Tue, 30 Apr 2024 05:56:46 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "553" ], + "Content-Length": [ "557" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+6": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "329" ], - "x-ms-client-request-id": [ "687a4ecf-4af9-435a-9392-68774352d868" ], + "x-ms-unique-id": [ "282" ], + "x-ms-client-request-id": [ "df02a552-6497-49ba-ad01-52637bd93dc0" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1138,38 +1148,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3e16b7f1-2c0c-4a7d-b36c-d79e6079d9b6_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], - "x-ms-correlation-request-id": [ "1067aff4-d581-48ec-a426-45592c5f6cb6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141105Z:1067aff4-d581-48ec-a426-45592c5f6cb6" ], + "x-ms-request-id": [ "7208b232-f8b4-471f-bc7b-358acac71688_M1CH3_M1CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-correlation-request-id": [ "dbb12a49-d111-44b8-a086-d2562e6a8dba" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T055658Z:dbb12a49-d111-44b8-a086-d2562e6a8dba" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:11:04 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 659D785E977C4E92AB5B085577F99A4C Ref B: SEL221051504017 Ref C: 2024-04-30T05:56:57Z" ], + "Date": [ "Tue, 30 Apr 2024 05:56:58 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "553" ], + "Content-Length": [ "557" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+7": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "330" ], - "x-ms-client-request-id": [ "6952c16e-ebc3-4233-a2d0-82cf2b2c5931" ], + "x-ms-unique-id": [ "283" ], + "x-ms-client-request-id": [ "3dac45b0-088a-4454-858d-1e0e179106f3" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1180,80 +1192,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "46d6ab6a-abcd-424b-b2bb-afefce21b01f_M2SN1_M2SN1" ], + "x-ms-request-id": [ "d486820c-e0d5-42e8-a061-b1b0c5d4d8ac_M6SN1_M6SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11985" ], - "x-ms-correlation-request-id": [ "1554ed21-a34c-4cab-9b25-8872cabe6a9f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141115Z:1554ed21-a34c-4cab-9b25-8872cabe6a9f" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:11:15 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "553" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+8": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "331" ], - "x-ms-client-request-id": [ "2619bed9-59f2-4571-a824-97be5ea059bc" ], - "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], - "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "09056a0e-c212-49cd-b68f-2a380968d9cf_M3CH3_M3CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11984" ], - "x-ms-correlation-request-id": [ "38b25691-cf31-45ea-8749-d30e742f7f4b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141127Z:38b25691-cf31-45ea-8749-d30e742f7f4b" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "d4ec0670-9d42-41d4-a1ff-34db2d8c38f8" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T055710Z:d4ec0670-9d42-41d4-a1ff-34db2d8c38f8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:11:26 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3A0D3A01543140EF9528EA4DD66835EC Ref B: SEL221051504017 Ref C: 2024-04-30T05:57:08Z" ], + "Date": [ "Tue, 30 Apr 2024 05:57:10 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "553" ], + "Content-Length": [ "557" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+9": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "332" ], - "x-ms-client-request-id": [ "6f027490-835c-412a-b7f6-c6f2466b069e" ], + "x-ms-unique-id": [ "284" ], + "x-ms-client-request-id": [ "2711db76-8294-45e2-bbf6-5be801d41671" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1264,38 +1236,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "88b8bbb9-2ea2-4d65-b0c8-65fb756dd69b_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11983" ], - "x-ms-correlation-request-id": [ "061906a3-3084-423f-bca9-ef4de41cd868" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141138Z:061906a3-3084-423f-bca9-ef4de41cd868" ], + "x-ms-request-id": [ "63ebf904-19df-4e86-97ba-e5165c0e30e7_M4SN1_M4SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "f7ba08c9-fa0c-4574-bdf4-6897c8d82613" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T055722Z:f7ba08c9-fa0c-4574-bdf4-6897c8d82613" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:11:38 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C9A5DE92CF6B46F28967E61B8035C67C Ref B: SEL221051504017 Ref C: 2024-04-30T05:57:20Z" ], + "Date": [ "Tue, 30 Apr 2024 05:57:21 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "553" ], + "Content-Length": [ "557" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+10": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "333" ], - "x-ms-client-request-id": [ "43890419-ccb1-4919-8598-a97955b90538" ], + "x-ms-unique-id": [ "285" ], + "x-ms-client-request-id": [ "817bf22a-722e-4034-9462-f7342c107c43" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1306,38 +1280,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ffdd613d-58f6-497f-b98b-a28ccf7cfb5b_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11982" ], - "x-ms-correlation-request-id": [ "3d2d3ced-5a00-449a-8d8c-595153b6761f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141149Z:3d2d3ced-5a00-449a-8d8c-595153b6761f" ], + "x-ms-request-id": [ "f697ebfa-0575-4348-ad20-ccb250dae6e6_M11SN1_M11SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-correlation-request-id": [ "05980833-932b-4e30-9753-05a7f8122523" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T055733Z:05980833-932b-4e30-9753-05a7f8122523" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:11:48 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 58E224DF6ECD43E3B29B1B44AA9DD3A3 Ref B: SEL221051504017 Ref C: 2024-04-30T05:57:32Z" ], + "Date": [ "Tue, 30 Apr 2024 05:57:33 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "553" ], + "Content-Length": [ "557" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+11": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "334" ], - "x-ms-client-request-id": [ "fa615826-4f4d-45db-a4f5-9b72ad8231de" ], + "x-ms-unique-id": [ "286" ], + "x-ms-client-request-id": [ "2655d335-c9f6-4a19-b573-1ddf083e0720" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1348,38 +1324,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "16d0b905-baeb-4742-9527-7ae227f5917c_M6CH3_M6CH3" ], + "x-ms-request-id": [ "f52dff68-78a3-4416-b3b6-5a4000e70b78_M11CH3_M11CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11981" ], - "x-ms-correlation-request-id": [ "e132bc3d-3463-4c70-a611-bf59ad95cfc3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141159Z:e132bc3d-3463-4c70-a611-bf59ad95cfc3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-correlation-request-id": [ "7c046a2c-2b5c-43df-a7ee-f834cb3b6923" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T055744Z:7c046a2c-2b5c-43df-a7ee-f834cb3b6923" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:11:59 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 00BD68B4E50F43B7BFD33950EDA3C061 Ref B: SEL221051504017 Ref C: 2024-04-30T05:57:43Z" ], + "Date": [ "Tue, 30 Apr 2024 05:57:44 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "553" ], + "Content-Length": [ "557" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+12": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+11": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "335" ], - "x-ms-client-request-id": [ "d41f9fed-2b18-4026-b746-56b4d4168be8" ], + "x-ms-unique-id": [ "287" ], + "x-ms-client-request-id": [ "9686169e-4725-484e-ab8c-4f5acaefa3ae" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1390,38 +1368,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0cacc798-5190-4871-9b87-c6d92293024e_M6CH3_M6CH3" ], + "x-ms-request-id": [ "47af0e4d-5ea5-46c7-b5c6-2650ddca2d40_M6CH3_M6CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11980" ], - "x-ms-correlation-request-id": [ "2f5de624-5c30-4f29-a562-6794a1f49f39" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141210Z:2f5de624-5c30-4f29-a562-6794a1f49f39" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "90284c5a-1f9e-436c-ad15-1af494a92c77" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T055756Z:90284c5a-1f9e-436c-ad15-1af494a92c77" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:12:09 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9548452C86EE445EBF31D2802DAD853A Ref B: SEL221051504017 Ref C: 2024-04-30T05:57:54Z" ], + "Date": [ "Tue, 30 Apr 2024 05:57:56 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "414" ], + "Content-Length": [ "416" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1\",\"name\":\"aliasq6x0t1\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm\",\"name\":\"aliastkildm\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+13": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+12": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "336" ], - "x-ms-client-request-id": [ "3b6a6e64-6361-4ab0-a78c-84e8d83cf963" ], + "x-ms-unique-id": [ "288" ], + "x-ms-client-request-id": [ "630f876f-504f-479a-9425-53973a2ee44d" ], "CommandName": [ "Remove-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Remove-AzServiceBusGeoDRConfiguration_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1432,15 +1412,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "379ef14a-32bd-4e3d-8a91-3dc3659ddcfb_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], + "x-ms-request-id": [ "f4dd8eb0-37d5-4ab1-bdcf-a2d58ac8baff_M8SN1_M8SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-correlation-request-id": [ "2ab83f01-e1c5-4b47-aa2a-3cd43304c7a5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141221Z:2ab83f01-e1c5-4b47-aa2a-3cd43304c7a5" ], + "x-ms-correlation-request-id": [ "a253d187-9e08-4088-b074-b7dbc0246cb9" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T055809Z:a253d187-9e08-4088-b074-b7dbc0246cb9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:12:20 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1530549F78E548A6938ADB63498691FF Ref B: SEL221051504017 Ref C: 2024-04-30T05:58:06Z" ], + "Date": [ "Tue, 30 Apr 2024 05:58:08 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -1450,19 +1432,19 @@ "isContentBase64": false } }, - "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview+14": { + "Set-AzServiceBusGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview+13": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3/disasterRecoveryConfigs/aliasq6x0t1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz/disasterRecoveryConfigs/aliastkildm?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "337" ], - "x-ms-client-request-id": [ "400dfc85-a969-4e61-b6c5-c03254060cbc" ], + "x-ms-unique-id": [ "289" ], + "x-ms-client-request-id": [ "93c0407a-49dd-4201-9d12-d995a0c3952e" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1473,22 +1455,24 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7861433e-9daa-420d-9f83-069637c782be_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "a5ec9cf7-792d-4e0a-89c6-fcba322d9d14" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141522Z:a5ec9cf7-792d-4e0a-89c6-fcba322d9d14" ], + "x-ms-request-id": [ "95326d4b-9dc1-449a-bf09-bb6da413f306_M6CH3_M6CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "1a709640-c869-47cf-9b87-d19a6ea5b435" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060110Z:1a709640-c869-47cf-9b87-d19a6ea5b435" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:15:22 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3EDE9F0FC63F48F59A53A7B3F402ED81 Ref B: SEL221051503025 Ref C: 2024-04-30T06:01:09Z" ], + "Date": [ "Tue, 30 Apr 2024 06:01:10 GMT" ] }, "ContentHeaders": { "Content-Length": [ "183" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"error\":{\"message\":\"Alias \u0027aliasq6x0t1\u0027 does not exist or is not associated with namespace \u0027primaryNSd7oma3\u0027. CorrelationId: a5ec9cf7-792d-4e0a-89c6-fcba322d9d14\",\"code\":\"NotFound\"}}", + "Content": "{\"error\":{\"message\":\"Alias \u0027aliastkildm\u0027 does not exist or is not associated with namespace \u0027primaryNSibt9vz\u0027. CorrelationId: 1a709640-c869-47cf-9b87-d19a6ea5b435\",\"code\":\"NotFound\"}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusGeoDRConfigurationFailOver.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusGeoDRConfigurationFailOver.Tests.ps1 index b659270bc2e2..c55353d46bbb 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusGeoDRConfigurationFailOver.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusGeoDRConfigurationFailOver.Tests.ps1 @@ -15,13 +15,13 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzServiceBusGeoDRConfigur } Describe 'Set-AzServiceBusGeoDRConfigurationFailOver' { - It 'Fail' { + It 'Fail' -skip:$($env.secondaryLocation -eq '') { Set-AzServiceBusGeoDRConfigurationFailOver -ResourceGroupName $env.resourceGroup -NamespaceName $env.secondaryNamespace -Name $env.alias - + while($drConfig.ProvisioningState -ne "Succeeded"){ $drConfig = Get-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.secondaryNamespace if ($TestMode -ne 'playback') { - Start-TestSleep 10 + Start-Sleep 10 } } @@ -32,26 +32,26 @@ Describe 'Set-AzServiceBusGeoDRConfigurationFailOver' { $drConfig = Remove-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.secondaryNamespace if ($TestMode -ne 'playback') { - Start-TestSleep 180 + Start-Sleep 180 } $drConfig = New-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace -PartnerNamespace $env.secondaryNamespaceResourceId - + while($drConfig.ProvisioningState -ne "Succeeded"){ $drConfig = Get-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace if ($TestMode -ne 'playback') { - Start-TestSleep 10 + Start-Sleep 10 } } } - It 'FailViaIdentity' { + It 'FailViaIdentity' -skip:$($env.secondaryLocation -eq '') { $drConfig = Get-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.secondaryNamespace - + Set-AzServiceBusGeoDRConfigurationFailOver -InputObject $drConfig - + do { $drConfig = Get-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.secondaryNamespace if ($TestMode -ne 'playback') { - Start-TestSleep 10 + Start-Sleep 10 } } while($drConfig.ProvisioningState -ne "Succeeded") @@ -61,11 +61,11 @@ Describe 'Set-AzServiceBusGeoDRConfigurationFailOver' { $drConfig.Role | Should -Be "PrimaryNotReplicating" $drConfig = Remove-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.secondaryNamespace - + if ($TestMode -ne 'playback') { - Start-TestSleep 180 + Start-Sleep 180 } - { Get-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace } | Should -Throw + { Get-AzServiceBusGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace -ErrorAction Stop } | Should -Throw } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusNamespaceV2.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusNamespaceV2.Recording.json index 27bcba1258a3..4bb2e92fae86 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusNamespaceV2.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusNamespaceV2.Recording.json @@ -1,17 +1,17 @@ { - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "338" ], - "x-ms-client-request-id": [ "9c8dc758-58cf-43e5-b2f4-50ba0a2e7713" ], + "x-ms-unique-id": [ "290" ], + "x-ms-client-request-id": [ "6ae1c95f-5e91-4ddc-9583-f034a0454009" ], "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_Get" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,38 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "4773fc45-56f6-49d4-b227-68f82a490eae_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "0cc07038-ba37-4b78-ae75-0c7822d20728" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141537Z:0cc07038-ba37-4b78-ae75-0c7822d20728" ], + "x-ms-correlation-request-id": [ "d3849651-497e-4293-9d9c-c78247bf5082" ], + "x-ms-client-request-id": [ "6ae1c95f-5e91-4ddc-9583-f034a0454009_RP" ], + "x-ms-messaging-activity-id": [ "d3f5f84e-be7c-4fa5-ab5d-49375885b95e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T06:01:41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "d3849651-497e-4293-9d9c-c78247bf5082" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060141Z:d3849651-497e-4293-9d9c-c78247bf5082" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:15:37 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 01FA125487C04DE8AA28851202BAC21F Ref B: SEL221051503025 Ref C: 2024-04-30T06:01:39Z" ], + "Date": [ "Tue, 30 Apr 2024 06:01:41 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2009" ], + "Content-Length": [ "2094" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:38:24.377Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki\",\"name\":\"namespaceV5x9bvki\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5x9bvki\",\"serviceBusEndpoint\":\"https://namespaceV5x9bvki.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:27:45.0047748Z\",\"updatedAt\":\"2024-04-30T05:28:49.072472Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "339" ], - "x-ms-client-request-id": [ "ede61b8f-8501-4955-b317-2d19aeb46b7d" ], - "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_Get" ], + "x-ms-unique-id": [ "291" ], + "x-ms-client-request-id": [ "2cf1a462-6d5e-4f43-b55f-4438a56f81fd" ], + "CommandName": [ "Get-AzServiceBusNamespace" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,36 +68,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c2caf3a9-9210-4025-a003-1c537fa3cf07_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "900af5e3-6817-43a9-af2c-129753b5a49c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141538Z:900af5e3-6817-43a9-af2c-129753b5a49c" ], + "x-ms-correlation-request-id": [ "d7d374bf-d693-419f-bb6c-d4cd2b3efedf" ], + "x-ms-client-request-id": [ "2cf1a462-6d5e-4f43-b55f-4438a56f81fd_RP" ], + "x-ms-messaging-activity-id": [ "9bdf908d-aaf4-4dea-9d30-afce22fd0c30" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T06:01:42" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-request-id": [ "d7d374bf-d693-419f-bb6c-d4cd2b3efedf" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060143Z:d7d374bf-d693-419f-bb6c-d4cd2b3efedf" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:15:38 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 17F69B162E8449FDAFB81455C32CFAF6 Ref B: SEL221051503025 Ref C: 2024-04-30T06:01:41Z" ], + "Date": [ "Tue, 30 Apr 2024 06:01:42 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2009" ], + "Content-Length": [ "2094" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T13:38:24.377Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki\",\"name\":\"namespaceV5x9bvki\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5x9bvki\",\"serviceBusEndpoint\":\"https://namespaceV5x9bvki.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:27:45.0047748Z\",\"updatedAt\":\"2024-04-30T05:28:49.072472Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+3": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview+3": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"North Europe\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\": {\n },\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"\n },\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://keyvaultnamedur8ab.vault.azure.net\",\n \"keyVersion\": \"\"\n },\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"\n },\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://keyvaultnamedur8ab.vault.azure.net\",\n \"keyVersion\": \"\"\n },\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"\n },\n \"keyName\": \"key4\",\n \"keyVaultUri\": \"https://keyVaultNamedur8ab.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": false\n },\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": false,\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 1\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\": {\n },\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"\n },\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n },\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"\n },\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n },\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"\n },\n \"keyName\": \"key4\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": false\n },\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": false,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 1\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1986" ] + "Content-Length": [ "2064" ] } }, "Response": { @@ -101,39 +109,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "237a1af4-57f2-4eed-999b-15d6f96257cb_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "00fe79c1-d5db-4172-86ff-b917c375e1a0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141553Z:00fe79c1-d5db-4172-86ff-b917c375e1a0" ], + "x-ms-correlation-request-id": [ "a480b1d9-7b2a-4ee0-9541-d4ece900c408" ], + "x-ms-client-request-id": [ "bf957a75-3228-437a-b1c3-78398034ae50_RP" ], + "x-ms-messaging-activity-id": [ "bf3e8ff2-4120-42b6-a2e4-cb7a90b48fd5" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T06:01:47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "a480b1d9-7b2a-4ee0-9541-d4ece900c408" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060147Z:a480b1d9-7b2a-4ee0-9541-d4ece900c408" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:15:52 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2705B6FD7B174A04A10BE8A06934A666 Ref B: SEL221051503025 Ref C: 2024-04-30T06:01:43Z" ], + "Date": [ "Tue, 30 Apr 2024 06:01:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2296" ], + "Content-Length": [ "2353" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key4\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T14:15:51.08Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki\",\"name\":\"namespaceV5x9bvki\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key4\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5x9bvki\",\"serviceBusEndpoint\":\"https://namespaceV5x9bvki.servicebus.windows.net:443/\",\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-30T05:27:45.0047748Z\",\"updatedAt\":\"2024-04-30T06:01:47.3778506Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+4": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "341" ], - "x-ms-client-request-id": [ "84191bf3-09a5-40f5-bd86-ab0f86bf7679" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "293" ], + "x-ms-client-request-id": [ "bf957a75-3228-437a-b1c3-78398034ae50" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -143,39 +155,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7942b508-9a6d-4181-b3c7-7c81be56b4bb_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "792f6540-f84c-48f0-8a04-7fcce05e3591" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141624Z:792f6540-f84c-48f0-8a04-7fcce05e3591" ], + "x-ms-correlation-request-id": [ "6a41c09d-6fa7-4ac8-ba7d-53548e1c6c30" ], + "x-ms-client-request-id": [ "bf957a75-3228-437a-b1c3-78398034ae50_RP" ], + "x-ms-messaging-activity-id": [ "bb6f6c63-5b00-4345-9aba-7b026a85e061" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T06:02:19" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "6a41c09d-6fa7-4ac8-ba7d-53548e1c6c30" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060219Z:6a41c09d-6fa7-4ac8-ba7d-53548e1c6c30" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:16:23 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FCB05BC1EEFA4DD8BE526EE7EBD8B658 Ref B: SEL221051503025 Ref C: 2024-04-30T06:02:18Z" ], + "Date": [ "Tue, 30 Apr 2024 06:02:19 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2294" ], + "Content-Length": [ "2384" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key4\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T14:15:54.383Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki\",\"name\":\"namespaceV5x9bvki\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key4\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5x9bvki\",\"serviceBusEndpoint\":\"https://namespaceV5x9bvki.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:27:45.0047748Z\",\"updatedAt\":\"2024-04-30T06:02:00.7777582Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview+5": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "342" ], - "x-ms-client-request-id": [ "84191bf3-09a5-40f5-bd86-ab0f86bf7679" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "294" ], + "x-ms-client-request-id": [ "bf957a75-3228-437a-b1c3-78398034ae50" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -185,38 +201,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "4994fe93-b73d-4329-988b-e16c4e3146df_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "0fc0cee0-d439-4bcb-9613-2a3704247f6b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141624Z:0fc0cee0-d439-4bcb-9613-2a3704247f6b" ], + "x-ms-correlation-request-id": [ "a2c7ceb1-6045-4ffd-8c0e-1470064c9764" ], + "x-ms-client-request-id": [ "bf957a75-3228-437a-b1c3-78398034ae50_RP" ], + "x-ms-messaging-activity-id": [ "4465d98f-6558-44a9-8c84-77bb0b09602b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T06:02:21" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "a2c7ceb1-6045-4ffd-8c0e-1470064c9764" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060221Z:a2c7ceb1-6045-4ffd-8c0e-1470064c9764" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:16:24 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BFF2083D71C346EFA3C2E1AE0B22EC95 Ref B: SEL221051503025 Ref C: 2024-04-30T06:02:19Z" ], + "Date": [ "Tue, 30 Apr 2024 06:02:20 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2294" ], + "Content-Length": [ "2384" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV5xdns25\",\"name\":\"namespaceV5xdns25\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key4\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5xdns25\",\"createdAt\":\"2023-02-19T13:31:01.857Z\",\"updatedAt\":\"2023-02-19T14:15:54.383Z\",\"serviceBusEndpoint\":\"https://namespaceV5xdns25.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV5x9bvki\",\"name\":\"namespaceV5x9bvki\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}},{\"keyName\":\"key4\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\"}}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5x9bvki\",\"serviceBusEndpoint\":\"https://namespaceV5x9bvki.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:27:45.0047748Z\",\"updatedAt\":\"2024-04-30T06:02:00.7777582Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+6": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "343" ], - "x-ms-client-request-id": [ "785b4bff-5039-4939-b0fa-95b28f45b772" ], + "x-ms-unique-id": [ "295" ], + "x-ms-client-request-id": [ "f19b0241-a03b-4167-885f-ff6e1430f2da" ], "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_Get" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -227,38 +247,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3ef1301f-5ce2-4a4b-912d-7572ca62588e_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "6d5bfe7b-1d12-401a-9753-f361daa4851a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141625Z:6d5bfe7b-1d12-401a-9753-f361daa4851a" ], + "x-ms-correlation-request-id": [ "efbf778c-60bb-4517-b0b4-8ae833403862" ], + "x-ms-client-request-id": [ "f19b0241-a03b-4167-885f-ff6e1430f2da_RP" ], + "x-ms-messaging-activity-id": [ "b945f968-28c0-41d8-832d-33e790949f0a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T06:02:23" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "efbf778c-60bb-4517-b0b4-8ae833403862" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060223Z:efbf778c-60bb-4517-b0b4-8ae833403862" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:16:24 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 63671ECAC3694861A3F45CC5DE40BBFE Ref B: SEL221051503025 Ref C: 2024-04-30T06:02:22Z" ], + "Date": [ "Tue, 30 Apr 2024 06:02:23 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "888" ], + "Content-Length": [ "929" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T13:08:35.657Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T05:06:48.3082869Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+7": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "344" ], - "x-ms-client-request-id": [ "6f48833b-8385-43ce-ba94-808eb329fdc5" ], - "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_Get" ], + "x-ms-unique-id": [ "296" ], + "x-ms-client-request-id": [ "da9c4b6b-2281-400d-be9c-abd44d41b108" ], + "CommandName": [ "Get-AzServiceBusNamespace" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -269,36 +293,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "27e837fb-da01-4455-99ef-6d5b9ac09877_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "8415ea51-6ad6-4bbe-916c-ee8354d6f6d6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141626Z:8415ea51-6ad6-4bbe-916c-ee8354d6f6d6" ], + "x-ms-correlation-request-id": [ "625bb5ea-0b8a-4128-8b2f-103fcad9790a" ], + "x-ms-client-request-id": [ "da9c4b6b-2281-400d-be9c-abd44d41b108_RP" ], + "x-ms-messaging-activity-id": [ "8823eb0c-45f1-4f26-a66d-494b8a5da879" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:02:26" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "625bb5ea-0b8a-4128-8b2f-103fcad9790a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060226Z:625bb5ea-0b8a-4128-8b2f-103fcad9790a" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:16:25 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E1A0AD6A81A3424BA7F08E950FA2CECF Ref B: SEL221051503025 Ref C: 2024-04-30T06:02:25Z" ], + "Date": [ "Tue, 30 Apr 2024 06:02:26 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "888" ], + "Content-Length": [ "929" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T13:08:35.657Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T05:06:48.3082869Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+8": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+8": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"East US\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://keyVaultNamedur8ab.vault.azure.net/\"\n },\n {\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://keyVaultNamedur8ab.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\"\n },\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": true,\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 1\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n },\n {\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\"\n },\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": true,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 1\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "691" ] + "Content-Length": [ "725" ] } }, "Response": { @@ -306,39 +334,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7eafdee6-1850-475e-a49f-1aaaeeca6dc8_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "57d4dd9d-ed35-4b8e-9862-d177ffc050c1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141637Z:57d4dd9d-ed35-4b8e-9862-d177ffc050c1" ], + "x-ms-correlation-request-id": [ "6d3d59d8-7957-41e9-9920-35e2435a653b" ], + "x-ms-client-request-id": [ "eb2fb3f6-01b2-4cb7-9549-2e2762a00b7d_RP" ], + "x-ms-messaging-activity-id": [ "88be74b4-9f24-49de-a64e-33fce9cd4424" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T06:02:31" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "6d3d59d8-7957-41e9-9920-35e2435a653b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060231Z:6d3d59d8-7957-41e9-9920-35e2435a653b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:16:37 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B1053DCB05AB4354810D7EF10A56F5FA Ref B: SEL221051503025 Ref C: 2024-04-30T06:02:26Z" ], + "Date": [ "Tue, 30 Apr 2024 06:02:31 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1190" ], + "Content-Length": [ "1182" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:16:36.553Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"ActivatingIdentity\",\"status\":\"ActivatingIdentity\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:02:31.514233Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+9": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "346" ], - "x-ms-client-request-id": [ "81694d76-552b-426e-884a-79bc5f5c54d2" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "298" ], + "x-ms-client-request-id": [ "eb2fb3f6-01b2-4cb7-9549-2e2762a00b7d" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -348,39 +380,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "bf3085e6-0cd3-4ed1-8e89-6fdeb63ca001_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "0fc03cd2-5561-42b9-9901-1c1a5e485039" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141708Z:0fc03cd2-5561-42b9-9901-1c1a5e485039" ], + "x-ms-correlation-request-id": [ "8192b0f9-72da-4d7c-918f-c8d933539e0e" ], + "x-ms-client-request-id": [ "eb2fb3f6-01b2-4cb7-9549-2e2762a00b7d_RP" ], + "x-ms-messaging-activity-id": [ "b9b36cde-27c3-4d00-a1b1-9f519c896d84" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:03:03" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "8192b0f9-72da-4d7c-918f-c8d933539e0e" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060303Z:8192b0f9-72da-4d7c-918f-c8d933539e0e" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:17:08 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 208B9FC42C3343C5BB894A7D34E758DC Ref B: SEL221051503025 Ref C: 2024-04-30T06:03:02Z" ], + "Date": [ "Tue, 30 Apr 2024 06:03:03 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1186" ], + "Content-Length": [ "1194" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:16:38.32Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:02:58.9143349Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+10": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "347" ], - "x-ms-client-request-id": [ "81694d76-552b-426e-884a-79bc5f5c54d2" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "299" ], + "x-ms-client-request-id": [ "eb2fb3f6-01b2-4cb7-9549-2e2762a00b7d" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -390,38 +426,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e16ba010-8ec3-4b66-a99f-acef3b3b462b_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "c79945fd-728a-45ff-8c22-5746dac90970" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141708Z:c79945fd-728a-45ff-8c22-5746dac90970" ], + "x-ms-correlation-request-id": [ "2ac9a8a2-1e6d-4567-b6b1-f52ab06d6f16" ], + "x-ms-client-request-id": [ "eb2fb3f6-01b2-4cb7-9549-2e2762a00b7d_RP" ], + "x-ms-messaging-activity-id": [ "9e1c9593-6a8c-4634-bb45-fb02090e8e3e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:03:05" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "2ac9a8a2-1e6d-4567-b6b1-f52ab06d6f16" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T060305Z:2ac9a8a2-1e6d-4567-b6b1-f52ab06d6f16" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:17:08 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B04F15EF6D8D4DF8A322B649C85D70F9 Ref B: SEL221051503025 Ref C: 2024-04-30T06:03:03Z" ], + "Date": [ "Tue, 30 Apr 2024 06:03:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1186" ], + "Content-Length": [ "1194" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:16:38.32Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:02:58.9143349Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+11": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+11": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "348" ], - "x-ms-client-request-id": [ "e7e0628c-66fe-4f86-be81-95cbff520fe9" ], - "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_Get" ], + "x-ms-unique-id": [ "300" ], + "x-ms-client-request-id": [ "3bae7cd4-8151-44a6-b9d2-29c6ed7d4f3a" ], + "CommandName": [ "Get-AzServiceBusNamespace" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -432,36 +472,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "47eccc0f-2f0a-44b9-b57a-fcbfd974afca_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-correlation-request-id": [ "1cb79a80-f3ea-43c3-90a5-98c0a040ba9a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141709Z:1cb79a80-f3ea-43c3-90a5-98c0a040ba9a" ], + "x-ms-correlation-request-id": [ "18b54f59-79f2-4b40-8383-c7e753ff4c1f" ], + "x-ms-client-request-id": [ "3bae7cd4-8151-44a6-b9d2-29c6ed7d4f3a_RP" ], + "x-ms-messaging-activity-id": [ "2fe9898c-7353-4d25-8631-290c7b57a44d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T06:03:06" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-request-id": [ "18b54f59-79f2-4b40-8383-c7e753ff4c1f" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060306Z:18b54f59-79f2-4b40-8383-c7e753ff4c1f" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:17:09 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7139DB50B13F4E83BCC6657C3086F51D Ref B: SEL221051503025 Ref C: 2024-04-30T06:03:05Z" ], + "Date": [ "Tue, 30 Apr 2024 06:03:06 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1186" ], + "Content-Length": [ "1194" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:16:38.32Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:02:58.9143349Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+12": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+12": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"East US\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://keyvaultnamedur8ab.vault.azure.net\",\n \"keyVersion\": \"\"\n },\n {\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://keyvaultnamedur8ab.vault.azure.net\",\n \"keyVersion\": \"\"\n },\n {\n \"keyName\": \"key3\",\n \"keyVaultUri\": \"https://keyVaultNamedur8ab.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": false\n },\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": true,\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 1\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n },\n {\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n },\n {\n \"keyName\": \"key3\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": false\n },\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": true,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 1\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "914" ] + "Content-Length": [ "892" ] } }, "Response": { @@ -469,39 +513,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f8d8170a-1461-4b73-afaf-c72054b8a6d3_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-correlation-request-id": [ "b55eb19a-335d-4b1a-8a25-1423156011cb" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141720Z:b55eb19a-335d-4b1a-8a25-1423156011cb" ], + "x-ms-correlation-request-id": [ "2d603fe1-79ec-44c7-b8b4-62cfdffa37e4" ], + "x-ms-client-request-id": [ "3eb025a1-26ec-4d33-ab30-addea60aa471_RP" ], + "x-ms-messaging-activity-id": [ "66803aad-ea5a-4e78-a264-c7d16d5416f3" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T06:03:11" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "2d603fe1-79ec-44c7-b8b4-62cfdffa37e4" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060311Z:2d603fe1-79ec-44c7-b8b4-62cfdffa37e4" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:17:19 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2A20E5F2CF554D7C875F450ADC548853 Ref B: SEL221051503025 Ref C: 2024-04-30T06:03:06Z" ], + "Date": [ "Tue, 30 Apr 2024 06:03:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1284" ], + "Content-Length": [ "1240" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:17:18.637Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:03:11.2042707Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+13": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+13": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "350" ], - "x-ms-client-request-id": [ "2737649d-91aa-4954-b996-802d9a58cd2b" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "302" ], + "x-ms-client-request-id": [ "3eb025a1-26ec-4d33-ab30-addea60aa471" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -511,39 +559,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0c74a122-ec74-4e94-98fe-75dee5d50b5a_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], - "x-ms-correlation-request-id": [ "07a12d62-4983-49b2-85b9-6b260174d975" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141751Z:07a12d62-4983-49b2-85b9-6b260174d975" ], + "x-ms-correlation-request-id": [ "c982fe12-55b0-4d85-b80b-bf4ff4ce60fa" ], + "x-ms-client-request-id": [ "3eb025a1-26ec-4d33-ab30-addea60aa471_RP" ], + "x-ms-messaging-activity-id": [ "96709d8e-f81d-43aa-b7c3-119eb1fd36ca" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T06:03:43" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "c982fe12-55b0-4d85-b80b-bf4ff4ce60fa" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060343Z:c982fe12-55b0-4d85-b80b-bf4ff4ce60fa" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:17:50 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4E3545C7D747472C8D9BE78EF12E8F0C Ref B: SEL221051503025 Ref C: 2024-04-30T06:03:41Z" ], + "Date": [ "Tue, 30 Apr 2024 06:03:43 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1280" ], + "Content-Length": [ "1271" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:17:21.11Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:03:27.4862323Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+14": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "351" ], - "x-ms-client-request-id": [ "2737649d-91aa-4954-b996-802d9a58cd2b" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "303" ], + "x-ms-client-request-id": [ "3eb025a1-26ec-4d33-ab30-addea60aa471" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -553,38 +605,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "80fc275a-9d0e-4916-911a-418c4647806a_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], - "x-ms-correlation-request-id": [ "331534ab-0645-40c3-861a-ac4dcf1f598f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141751Z:331534ab-0645-40c3-861a-ac4dcf1f598f" ], + "x-ms-correlation-request-id": [ "4423ea94-ae9e-4f44-9da6-8748d6376b0b" ], + "x-ms-client-request-id": [ "3eb025a1-26ec-4d33-ab30-addea60aa471_RP" ], + "x-ms-messaging-activity-id": [ "c7d00c50-f4c2-48b6-8bea-37e5dc58e4ab" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:03:44" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-request-id": [ "4423ea94-ae9e-4f44-9da6-8748d6376b0b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060345Z:4423ea94-ae9e-4f44-9da6-8748d6376b0b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:17:51 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BB22CF2F09B749C98268C1774DFCC7CC Ref B: SEL221051503025 Ref C: 2024-04-30T06:03:43Z" ], + "Date": [ "Tue, 30 Apr 2024 06:03:44 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1280" ], + "Content-Length": [ "1271" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:17:21.11Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:03:27.4862323Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+15": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+15": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "352" ], - "x-ms-client-request-id": [ "2b6da4d9-6f87-4d5f-b24f-f3ab200690b5" ], - "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_Get" ], + "x-ms-unique-id": [ "304" ], + "x-ms-client-request-id": [ "7705a3d3-dce5-421a-bb84-88e4a261a06b" ], + "CommandName": [ "Get-AzServiceBusNamespace" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -595,36 +651,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0b382bab-5dd7-4088-aed5-505f16acd80a_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], - "x-ms-correlation-request-id": [ "7bc8a47e-bd24-490c-b118-91a978a6b1ea" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141752Z:7bc8a47e-bd24-490c-b118-91a978a6b1ea" ], + "x-ms-correlation-request-id": [ "05c1f0c6-9f32-4c47-b836-77a2bfc50ae7" ], + "x-ms-client-request-id": [ "7705a3d3-dce5-421a-bb84-88e4a261a06b_RP" ], + "x-ms-messaging-activity-id": [ "6dc62ef0-394f-4471-a979-aac06524834f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T06:03:46" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "05c1f0c6-9f32-4c47-b836-77a2bfc50ae7" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060346Z:05c1f0c6-9f32-4c47-b836-77a2bfc50ae7" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:17:51 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DAA04B14FEC145EAA1E1D6377FF98F2A Ref B: SEL221051503025 Ref C: 2024-04-30T06:03:45Z" ], + "Date": [ "Tue, 30 Apr 2024 06:03:46 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1280" ], + "Content-Length": [ "1271" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:17:21.11Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:03:27.4862323Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+16": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+16": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"East US\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://keyvaultnamedur8ab.vault.azure.net\",\n \"keyVersion\": \"\"\n },\n {\n \"keyName\": \"key3\",\n \"keyVaultUri\": \"https://keyVaultNamedur8ab.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": false\n },\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": true,\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 1\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n },\n {\n \"keyName\": \"key3\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": false\n },\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": true,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 1\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "766" ] + "Content-Length": [ "773" ] } }, "Response": { @@ -632,39 +692,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6f56992e-1577-4c0f-8570-9ab33eb020fd_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], - "x-ms-correlation-request-id": [ "cd8df4cf-2b66-4dec-ba58-2047756d282b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141802Z:cd8df4cf-2b66-4dec-ba58-2047756d282b" ], + "x-ms-correlation-request-id": [ "15ee9857-1918-4168-967c-62519971f5ab" ], + "x-ms-client-request-id": [ "b4da82ef-2d5e-4b68-852d-fc7ba22ff46e_RP" ], + "x-ms-messaging-activity-id": [ "e7ae95ab-604e-4bb2-8852-1149753b62c1" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T06:03:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "15ee9857-1918-4168-967c-62519971f5ab" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060351Z:15ee9857-1918-4168-967c-62519971f5ab" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:18:01 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 98AD995CBEAE4B54A2846DA577D68CD5 Ref B: SEL221051503025 Ref C: 2024-04-30T06:03:46Z" ], + "Date": [ "Tue, 30 Apr 2024 06:03:51 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1189" ], + "Content-Length": [ "1163" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:18:01.02Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:03:51.3529445Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+17": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+17": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "354" ], - "x-ms-client-request-id": [ "c08f2b01-e91d-436e-a177-d61c72364bdb" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "306" ], + "x-ms-client-request-id": [ "b4da82ef-2d5e-4b68-852d-fc7ba22ff46e" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -674,39 +738,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "62608c59-030c-4c07-93b6-f95180b53ae6_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], - "x-ms-correlation-request-id": [ "11c3066c-b788-466d-8f7b-e0e839ad5208" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141832Z:11c3066c-b788-466d-8f7b-e0e839ad5208" ], + "x-ms-correlation-request-id": [ "9c04b3fb-a0a1-4b65-9ed3-507bd7932ff6" ], + "x-ms-client-request-id": [ "b4da82ef-2d5e-4b68-852d-fc7ba22ff46e_RP" ], + "x-ms-messaging-activity-id": [ "3696b511-2323-4f11-97d9-ee161fcb9d85" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T06:04:23" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "9c04b3fb-a0a1-4b65-9ed3-507bd7932ff6" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060423Z:9c04b3fb-a0a1-4b65-9ed3-507bd7932ff6" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:18:32 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C82C9B179EB548018E7393C11B1C563F Ref B: SEL221051503025 Ref C: 2024-04-30T06:04:21Z" ], + "Date": [ "Tue, 30 Apr 2024 06:04:23 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1187" ], + "Content-Length": [ "1194" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:18:04.127Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:04:11.8927587Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+18": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+18": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "355" ], - "x-ms-client-request-id": [ "c08f2b01-e91d-436e-a177-d61c72364bdb" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "307" ], + "x-ms-client-request-id": [ "b4da82ef-2d5e-4b68-852d-fc7ba22ff46e" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -716,38 +784,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "83ea9929-85bf-48a4-926e-2560b45014e7_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11985" ], - "x-ms-correlation-request-id": [ "5f3695fd-d479-4f6e-bcdf-9f8bd4b3f27d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141833Z:5f3695fd-d479-4f6e-bcdf-9f8bd4b3f27d" ], + "x-ms-correlation-request-id": [ "46f4fb97-f5df-45af-a8db-3ff6213b6363" ], + "x-ms-client-request-id": [ "b4da82ef-2d5e-4b68-852d-fc7ba22ff46e_RP" ], + "x-ms-messaging-activity-id": [ "cdffdd70-f80c-4781-90b7-e4a5ba58feff" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T06:04:24" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "46f4fb97-f5df-45af-a8db-3ff6213b6363" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060425Z:46f4fb97-f5df-45af-a8db-3ff6213b6363" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:18:32 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BB5CA0CB54C1409798DDF745DACE801C Ref B: SEL221051503025 Ref C: 2024-04-30T06:04:23Z" ], + "Date": [ "Tue, 30 Apr 2024 06:04:24 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1187" ], + "Content-Length": [ "1194" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:18:04.127Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:04:11.8927587Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+19": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+19": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "356" ], - "x-ms-client-request-id": [ "168a447a-1bb7-46bf-9cbc-fdfc6f8b001b" ], - "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_Get" ], + "x-ms-unique-id": [ "308" ], + "x-ms-client-request-id": [ "0e8e1fb3-23ef-4bd2-9285-d5e57fddfe49" ], + "CommandName": [ "Get-AzServiceBusNamespace" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -758,78 +830,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "97844ab8-684a-4a69-a357-93c427bf4ff3_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11984" ], - "x-ms-correlation-request-id": [ "1982323e-3dfe-41d2-beeb-3cb5cd8704bd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141833Z:1982323e-3dfe-41d2-beeb-3cb5cd8704bd" ], + "x-ms-correlation-request-id": [ "db1c0ad7-7012-4e1a-b87e-b4fe2b06e454" ], + "x-ms-client-request-id": [ "0e8e1fb3-23ef-4bd2-9285-d5e57fddfe49_RP" ], + "x-ms-messaging-activity-id": [ "03b99fe4-591b-46b0-b0d7-f31460d728fc" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:04:26" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-request-id": [ "db1c0ad7-7012-4e1a-b87e-b4fe2b06e454" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060426Z:db1c0ad7-7012-4e1a-b87e-b4fe2b06e454" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:18:33 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A8846D7AD74146129865D5037112693D Ref B: SEL221051503025 Ref C: 2024-04-30T06:04:25Z" ], + "Date": [ "Tue, 30 Apr 2024 06:04:26 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1187" ], + "Content-Length": [ "1194" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:18:04.127Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:04:11.8927587Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+20": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+20": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"East US\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"SystemAssigned, UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://keyvaultnamedur8ab.vault.azure.net\",\n \"keyVersion\": \"\"\n },\n {\n \"keyName\": \"key3\",\n \"keyVaultUri\": \"https://keyvaultnamedur8ab.vault.azure.net\",\n \"keyVersion\": \"\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": false\n },\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": true,\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 1\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"SystemAssigned, UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n },\n {\n \"keyName\": \"key3\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": false\n },\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": true,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 1\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1018" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "dfe59938-9025-4437-b134-e646c1d72e80_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], - "x-ms-correlation-request-id": [ "279b560b-ba7a-4a77-80b8-b4f3d603a8d9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141842Z:279b560b-ba7a-4a77-80b8-b4f3d603a8d9" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:18:42 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1204" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:18:41.687Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+21": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "358" ], - "x-ms-client-request-id": [ "4f621cb3-b415-4a86-8171-8aab34816326" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { + "Content-Length": [ "1019" ] } }, "Response": { @@ -837,39 +871,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fd5fb2f6-8824-462d-b589-1bbcb43aee02_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11983" ], - "x-ms-correlation-request-id": [ "9856742c-28d6-41fe-a4a4-1076ff429783" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141913Z:9856742c-28d6-41fe-a4a4-1076ff429783" ], + "x-ms-correlation-request-id": [ "6cc17d94-3c9a-4f3f-a24b-b8cf183eff66" ], + "x-ms-client-request-id": [ "69f8d950-c4b1-4ac4-abef-1b6991a11366_RP" ], + "x-ms-messaging-activity-id": [ "ee8d225e-035f-487a-a1e3-3687679fa4d6" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:04:30" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "6cc17d94-3c9a-4f3f-a24b-b8cf183eff66" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060431Z:6cc17d94-3c9a-4f3f-a24b-b8cf183eff66" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:19:12 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C28DDC969BBD493E9F351962C815031C Ref B: SEL221051503025 Ref C: 2024-04-30T06:04:26Z" ], + "Date": [ "Tue, 30 Apr 2024 06:04:30 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1395" ], + "Content-Length": [ "1505" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:18:44.473Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"ActivatingIdentity\",\"status\":\"ActivatingIdentity\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:04:30.6964141Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+22": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+21": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "359" ], - "x-ms-client-request-id": [ "4f621cb3-b415-4a86-8171-8aab34816326" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "310" ], + "x-ms-client-request-id": [ "69f8d950-c4b1-4ac4-abef-1b6991a11366" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -879,39 +917,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "19a936a9-88a4-4892-a39c-1fc40c908ff5_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11982" ], - "x-ms-correlation-request-id": [ "8b2cff69-5b9a-4e91-b55b-ec79205e7d52" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141944Z:8b2cff69-5b9a-4e91-b55b-ec79205e7d52" ], + "x-ms-correlation-request-id": [ "bc1f00d7-e273-4bd9-8dd0-b8bbe5926f6e" ], + "x-ms-client-request-id": [ "69f8d950-c4b1-4ac4-abef-1b6991a11366_RP" ], + "x-ms-messaging-activity-id": [ "c7c50a8d-ea9a-4b9d-a60f-2e88c37017a3" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T06:05:02" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "bc1f00d7-e273-4bd9-8dd0-b8bbe5926f6e" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060502Z:bc1f00d7-e273-4bd9-8dd0-b8bbe5926f6e" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:19:44 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 94059E23445042A3AF289452D7A9F87D Ref B: SEL221051503025 Ref C: 2024-04-30T06:05:01Z" ], + "Date": [ "Tue, 30 Apr 2024 06:05:02 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1488" ], + "Content-Length": [ "1516" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:19:42.723Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:04:56.5918791Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+23": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+22": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "360" ], - "x-ms-client-request-id": [ "4f621cb3-b415-4a86-8171-8aab34816326" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "311" ], + "x-ms-client-request-id": [ "69f8d950-c4b1-4ac4-abef-1b6991a11366" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -921,38 +963,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2e44d354-75da-4208-9f89-9dbfd6d4a0f9_M1CH3_M1CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11981" ], - "x-ms-correlation-request-id": [ "273d476c-b1be-4bd2-98fd-63a829d836dd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141946Z:273d476c-b1be-4bd2-98fd-63a829d836dd" ], + "x-ms-correlation-request-id": [ "50ec02c9-38fd-4a9d-a1a0-8749c35f8b84" ], + "x-ms-client-request-id": [ "69f8d950-c4b1-4ac4-abef-1b6991a11366_RP" ], + "x-ms-messaging-activity-id": [ "3f5b362f-e983-488f-a5ac-f93ec49ac0f4" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:05:04" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-request-id": [ "50ec02c9-38fd-4a9d-a1a0-8749c35f8b84" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060504Z:50ec02c9-38fd-4a9d-a1a0-8749c35f8b84" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:19:46 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C8A1AA1E8E4A4705A6CB07F30EC2A235 Ref B: SEL221051503025 Ref C: 2024-04-30T06:05:02Z" ], + "Date": [ "Tue, 30 Apr 2024 06:05:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1488" ], + "Content-Length": [ "1516" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:19:42.723Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:04:56.5918791Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+24": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+23": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "361" ], - "x-ms-client-request-id": [ "81e41aa3-47a2-4ad1-a3d0-f28e3df0c810" ], - "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_Get" ], + "x-ms-unique-id": [ "312" ], + "x-ms-client-request-id": [ "c6dd6413-5a9a-4426-887a-cd88e3f29a14" ], + "CommandName": [ "Get-AzServiceBusNamespace" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -963,36 +1009,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0cb01e5b-19e7-48bc-b30f-f61c5c3b925e_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11980" ], - "x-ms-correlation-request-id": [ "dbb43a33-fbb3-4b16-aec9-3f26c1f99302" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141947Z:dbb43a33-fbb3-4b16-aec9-3f26c1f99302" ], + "x-ms-correlation-request-id": [ "bf9162af-0e7e-4eed-8337-4dcdd13cd19c" ], + "x-ms-client-request-id": [ "c6dd6413-5a9a-4426-887a-cd88e3f29a14_RP" ], + "x-ms-messaging-activity-id": [ "ac5d537d-8c0d-432e-a745-425becad74e6" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T06:05:05" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-request-id": [ "bf9162af-0e7e-4eed-8337-4dcdd13cd19c" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T060506Z:bf9162af-0e7e-4eed-8337-4dcdd13cd19c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:19:47 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 98655C720EAB45689D3ADDAB18B55894 Ref B: SEL221051503025 Ref C: 2024-04-30T06:05:04Z" ], + "Date": [ "Tue, 30 Apr 2024 06:05:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1488" ], + "Content-Length": [ "1516" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:19:42.723Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:04:56.5918791Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+25": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+24": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"East US\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"SystemAssigned, UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\": {\n },\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://keyvaultnamedur8ab.vault.azure.net\",\n \"keyVersion\": \"\"\n },\n {\n \"keyName\": \"key3\",\n \"keyVaultUri\": \"https://keyvaultnamedur8ab.vault.azure.net\",\n \"keyVersion\": \"\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": false\n },\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": true,\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 1\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"SystemAssigned, UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\": {\n },\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n },\n {\n \"keyName\": \"key3\",\n \"keyVaultUri\": \"https://sb-ps-v8aenr-kv1.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": false\n },\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": true,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 1\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1191" ] + "Content-Length": [ "1213" ] } }, "Response": { @@ -1000,123 +1050,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "93fc88f5-50aa-4c65-8bd1-db8f1bf87675_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], - "x-ms-correlation-request-id": [ "58b53d3a-34aa-42bd-9015-58715e58f6c2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T141956Z:58b53d3a-34aa-42bd-9015-58715e58f6c2" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:19:56 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1490" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:19:55.41Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+26": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "363" ], - "x-ms-client-request-id": [ "5659079a-4253-44b7-afc6-cdac7ae5f8ce" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5476b6fe-1003-4193-bfe0-8d71fb2bcebe_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11979" ], - "x-ms-correlation-request-id": [ "bd27cbd8-2f39-4faf-a980-974d836f6938" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142027Z:bd27cbd8-2f39-4faf-a980-974d836f6938" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:20:27 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1655" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:19:57.147Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+27": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "364" ], - "x-ms-client-request-id": [ "5659079a-4253-44b7-afc6-cdac7ae5f8ce" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1a5bc34e-8c52-4b53-b2ba-543ba7535054_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11978" ], - "x-ms-correlation-request-id": [ "c6fc1314-919c-4e05-9f74-3d38e27e9e8f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142058Z:c6fc1314-919c-4e05-9f74-3d38e27e9e8f" ], + "x-ms-correlation-request-id": [ "fcdd77c0-6f69-457e-a23b-7aaba82795c6" ], + "x-ms-client-request-id": [ "267b226d-f7ff-4bca-a984-a071bf085cc5_RP" ], + "x-ms-messaging-activity-id": [ "ae9d50e0-396d-4454-96c7-2c175337e055" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T06:05:10" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "fcdd77c0-6f69-457e-a23b-7aaba82795c6" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060510Z:fcdd77c0-6f69-457e-a23b-7aaba82795c6" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:20:57 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CA60890862FA4C969B0F0EDD8E6E9A55 Ref B: SEL221051503025 Ref C: 2024-04-30T06:05:06Z" ], + "Date": [ "Tue, 30 Apr 2024 06:05:10 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1655" ], + "Content-Length": [ "1786" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:19:57.147Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"ActivatingIdentity\",\"status\":\"ActivatingIdentity\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:05:10.2952996Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+28": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+25": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "365" ], - "x-ms-client-request-id": [ "5659079a-4253-44b7-afc6-cdac7ae5f8ce" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "314" ], + "x-ms-client-request-id": [ "267b226d-f7ff-4bca-a984-a071bf085cc5" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -1126,39 +1096,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a1447d79-b496-4c92-8c1d-e1f5155ce044_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11977" ], - "x-ms-correlation-request-id": [ "b6b0061a-550d-488c-8b2d-c74a97dd3f6c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142128Z:b6b0061a-550d-488c-8b2d-c74a97dd3f6c" ], + "x-ms-correlation-request-id": [ "b4fadd5a-fca7-4623-b6e2-ec43550842c0" ], + "x-ms-client-request-id": [ "267b226d-f7ff-4bca-a984-a071bf085cc5_RP" ], + "x-ms-messaging-activity-id": [ "6a16d0af-0412-4d16-a663-99133488a3ab" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T06:05:42" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "b4fadd5a-fca7-4623-b6e2-ec43550842c0" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060542Z:b4fadd5a-fca7-4623-b6e2-ec43550842c0" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:21:28 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A0BAAD382B3249919EEB8095648A254B Ref B: SEL221051503025 Ref C: 2024-04-30T06:05:40Z" ], + "Date": [ "Tue, 30 Apr 2024 06:05:42 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1747" ], + "Content-Length": [ "1797" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:20:59.39Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:05:37.8800029Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview+29": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview+26": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "366" ], - "x-ms-client-request-id": [ "5659079a-4253-44b7-afc6-cdac7ae5f8ce" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "315" ], + "x-ms-client-request-id": [ "267b226d-f7ff-4bca-a984-a071bf085cc5" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -1168,580 +1142,84 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f189f49b-9485-424c-aa60-726ca73f9144_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11976" ], - "x-ms-correlation-request-id": [ "81dfc076-70fb-41ae-90e8-97e53e4f0aab" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142129Z:81dfc076-70fb-41ae-90e8-97e53e4f0aab" ], + "x-ms-correlation-request-id": [ "ef8dd268-7aaa-43ab-903c-ea58197fb61a" ], + "x-ms-client-request-id": [ "267b226d-f7ff-4bca-a984-a071bf085cc5_RP" ], + "x-ms-messaging-activity-id": [ "d9036260-17f3-4576-802b-f0e65d6718c3" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:05:44" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "ef8dd268-7aaa-43ab-903c-ea58197fb61a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060544Z:ef8dd268-7aaa-43ab-903c-ea58197fb61a" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:21:29 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A914132DBE3646899A509F49CD724509 Ref B: SEL221051503025 Ref C: 2024-04-30T06:05:42Z" ], + "Date": [ "Tue, 30 Apr 2024 06:05:44 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1747" ], + "Content-Length": [ "1797" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamembaip3\",\"name\":\"namespaceNamembaip3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"05ff947d-d140-41f0-8107-16ca5893799b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnamedur8ab.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamembaip3\",\"createdAt\":\"2023-02-19T13:01:17.353Z\",\"updatedAt\":\"2023-02-19T14:20:59.39Z\",\"serviceBusEndpoint\":\"https://namespaceNamembaip3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceName6auipl\",\"name\":\"namespaceName6auipl\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://sb-ps-v8aenr-kv1.vault.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6auipl\",\"serviceBusEndpoint\":\"https://namespaceName6auipl.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:05:46.6345263Z\",\"updatedAt\":\"2024-04-30T06:05:37.8800029Z\"},\"identity\":{\"principalId\":\"6243a94a-6c07-444d-b800-c2ceddb490a1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+30": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5?api-version=2022-10-01-preview+27": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"northeurope\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\"\n },\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\": {\n },\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\": {\n }\n }\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\"\n },\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\": {\n },\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\": {\n }\n }\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "524" ] + "Content-Length": [ "561" ] } }, "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "45d1ce39-62bf-4760-8b6d-27751ed2842d_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], - "x-ms-correlation-request-id": [ "076f3e1a-64e6-4b62-88e7-c7996466e7e7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142135Z:076f3e1a-64e6-4b62-88e7-c7996466e7e7" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:21:35 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "781" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\"},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:21:33.51Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+31": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "368" ], - "x-ms-client-request-id": [ "56cc31b0-7956-454c-bba1-fa60f3e427fa" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "722e7a6d-26bb-42f4-9d25-46b7a8d32245_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11975" ], - "x-ms-correlation-request-id": [ "edf8cdc9-2568-4315-bdc2-72f698b890b2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142206Z:edf8cdc9-2568-4315-bdc2-72f698b890b2" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:22:05 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1135" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:21:33.51Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+32": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "369" ], - "x-ms-client-request-id": [ "56cc31b0-7956-454c-bba1-fa60f3e427fa" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7a8cebde-dd6f-4903-b78d-ce8e7fce6ad3_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11974" ], - "x-ms-correlation-request-id": [ "4c306c33-e43f-40d6-8c51-847376894c8e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142237Z:4c306c33-e43f-40d6-8c51-847376894c8e" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:22:36 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1135" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:21:33.51Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+33": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "370" ], - "x-ms-client-request-id": [ "56cc31b0-7956-454c-bba1-fa60f3e427fa" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d05f21e3-5338-4e42-b0c1-47b7151fd301_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11973" ], - "x-ms-correlation-request-id": [ "88fc883b-4e82-4561-9b3c-de388fdee762" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142307Z:88fc883b-4e82-4561-9b3c-de388fdee762" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:23:07 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1132" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:22:50.437Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+34": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "371" ], - "x-ms-client-request-id": [ "56cc31b0-7956-454c-bba1-fa60f3e427fa" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3135ac0d-2ded-4986-a3ec-cac41ef3c5e4_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11972" ], - "x-ms-correlation-request-id": [ "e4cd68a3-98eb-4490-8ce3-eb3478e96967" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142338Z:e4cd68a3-98eb-4490-8ce3-eb3478e96967" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:23:37 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1132" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:22:50.437Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+35": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "372" ], - "x-ms-client-request-id": [ "56cc31b0-7956-454c-bba1-fa60f3e427fa" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "31072b18-814e-4f2d-a5e2-3ab5e02ab832_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11971" ], - "x-ms-correlation-request-id": [ "21a1c8e1-c958-471f-9737-07faf79b31c6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142408Z:21a1c8e1-c958-471f-9737-07faf79b31c6" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:24:08 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1132" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:22:50.437Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+36": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "373" ], - "x-ms-client-request-id": [ "56cc31b0-7956-454c-bba1-fa60f3e427fa" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "35bbeae9-0809-45ca-9151-787f07c39d03_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11970" ], - "x-ms-correlation-request-id": [ "90079753-045d-4ff5-a546-6d03c65590b5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142439Z:90079753-045d-4ff5-a546-6d03c65590b5" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:24:38 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1132" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:22:50.437Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+37": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "374" ], - "x-ms-client-request-id": [ "56cc31b0-7956-454c-bba1-fa60f3e427fa" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "502442eb-b2da-4bc2-b01e-c882468d552f_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11969" ], - "x-ms-correlation-request-id": [ "8e6d2527-e886-40e6-83e3-9df02ed5c125" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142509Z:8e6d2527-e886-40e6-83e3-9df02ed5c125" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:25:09 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1132" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:22:50.437Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+38": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "375" ], - "x-ms-client-request-id": [ "56cc31b0-7956-454c-bba1-fa60f3e427fa" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "71e2a076-33ed-493c-86da-dd23f1e39e7a_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11968" ], - "x-ms-correlation-request-id": [ "85a10e3f-627f-4737-8d7a-544236f2846b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142540Z:85a10e3f-627f-4737-8d7a-544236f2846b" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:25:40 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1132" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:22:50.437Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+39": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "376" ], - "x-ms-client-request-id": [ "56cc31b0-7956-454c-bba1-fa60f3e427fa" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "232d0fd5-ac4d-4f65-a23b-51930b05b6fe_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11967" ], - "x-ms-correlation-request-id": [ "65b2bdab-ff43-42f3-b09b-c9c27c915f66" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142610Z:65b2bdab-ff43-42f3-b09b-c9c27c915f66" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:26:10 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1132" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:22:50.437Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+40": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "377" ], - "x-ms-client-request-id": [ "56cc31b0-7956-454c-bba1-fa60f3e427fa" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9c49efbd-4f5d-4f4d-a750-ba6e1902a319_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11966" ], - "x-ms-correlation-request-id": [ "e5aad1c5-cf3f-480c-a95e-440cd386ce2e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142641Z:e5aad1c5-cf3f-480c-a95e-440cd386ce2e" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:26:41 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1132" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:22:50.437Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+41": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "378" ], - "x-ms-client-request-id": [ "56cc31b0-7956-454c-bba1-fa60f3e427fa" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "afd3a88e-9368-4916-b349-3d6c5e13b04a_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11965" ], - "x-ms-correlation-request-id": [ "1a729e36-f156-4f3b-a009-08657f610ca8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142711Z:1a729e36-f156-4f3b-a009-08657f610ca8" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:27:11 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1132" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:22:50.437Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+42": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "379" ], - "x-ms-client-request-id": [ "56cc31b0-7956-454c-bba1-fa60f3e427fa" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6dc35fa2-59c5-4b7e-8ea1-59e3046db92d_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11964" ], - "x-ms-correlation-request-id": [ "5c81f496-de7e-4582-b1b3-d03e4d7c2e87" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142742Z:5c81f496-de7e-4582-b1b3-d03e4d7c2e87" ], + "x-ms-correlation-request-id": [ "9ae29beb-df9f-4981-b9c9-c6076bb41c6c" ], + "x-ms-client-request-id": [ "48220e19-8c2c-4298-baf3-16bdd092b20e_RP" ], + "x-ms-messaging-activity-id": [ "dc1c39b0-2867-4217-95d6-beda24fc81be" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T06:05:49" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "9ae29beb-df9f-4981-b9c9-c6076bb41c6c" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060549Z:9ae29beb-df9f-4981-b9c9-c6076bb41c6c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:27:41 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 21B8BB129E574CBE828DB4E36279EE5C Ref B: SEL221051503025 Ref C: 2024-04-30T06:05:44Z" ], + "Date": [ "Tue, 30 Apr 2024 06:05:49 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1132" ], + "Content-Length": [ "1375" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:22:50.437Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5\",\"name\":\"namespaceV62vmrx5\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev62vmrx5\",\"serviceBusEndpoint\":\"https://namespaceV62vmrx5.servicebus.windows.net:443/\",\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-30T06:05:49.3333209Z\",\"updatedAt\":\"2024-04-30T06:05:49.3333209Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+43": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5?api-version=2022-10-01-preview+28": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "380" ], - "x-ms-client-request-id": [ "56cc31b0-7956-454c-bba1-fa60f3e427fa" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "317" ], + "x-ms-client-request-id": [ "48220e19-8c2c-4298-baf3-16bdd092b20e" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -1751,39 +1229,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "12698825-4f5d-454b-9f0d-107d32a59042_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11963" ], - "x-ms-correlation-request-id": [ "33971b1c-e705-4af1-a21b-31c5d01566cf" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142813Z:33971b1c-e705-4af1-a21b-31c5d01566cf" ], + "x-ms-correlation-request-id": [ "b3938f8c-ea53-44e0-978f-6b98fa95d28c" ], + "x-ms-client-request-id": [ "48220e19-8c2c-4298-baf3-16bdd092b20e_RP" ], + "x-ms-messaging-activity-id": [ "569fdca6-c4bf-4600-acb2-063fbc430d8e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T06:06:21" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "b3938f8c-ea53-44e0-978f-6b98fa95d28c" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060621Z:b3938f8c-ea53-44e0-978f-6b98fa95d28c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:28:12 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5E0C2D18A5F84A66A9644BF38D467B8F Ref B: SEL221051503025 Ref C: 2024-04-30T06:06:19Z" ], + "Date": [ "Tue, 30 Apr 2024 06:06:21 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1132" ], + "Content-Length": [ "1407" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:22:50.437Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5\",\"name\":\"namespaceV62vmrx5\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev62vmrx5\",\"serviceBusEndpoint\":\"https://namespaceV62vmrx5.servicebus.windows.net:443/\",\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-30T06:05:49.3333209Z\",\"updatedAt\":\"2024-04-30T06:05:49.3333209Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+44": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5?api-version=2022-10-01-preview+29": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "381" ], - "x-ms-client-request-id": [ "56cc31b0-7956-454c-bba1-fa60f3e427fa" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "318" ], + "x-ms-client-request-id": [ "48220e19-8c2c-4298-baf3-16bdd092b20e" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -1793,39 +1275,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "37d9f33e-54da-4e61-ac57-e6b75f681da0_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11962" ], - "x-ms-correlation-request-id": [ "68ee37e2-2563-4fbc-a949-459973261abf" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142844Z:68ee37e2-2563-4fbc-a949-459973261abf" ], + "x-ms-correlation-request-id": [ "0a2d0610-709d-4811-bba8-a9694b2b736e" ], + "x-ms-client-request-id": [ "48220e19-8c2c-4298-baf3-16bdd092b20e_RP" ], + "x-ms-messaging-activity-id": [ "0e142288-b3aa-420e-8c79-343bd06af876" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:06:53" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "0a2d0610-709d-4811-bba8-a9694b2b736e" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060653Z:0a2d0610-709d-4811-bba8-a9694b2b736e" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:28:43 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2127A60E20504D499EEC9E3562086340 Ref B: SEL221051503025 Ref C: 2024-04-30T06:06:52Z" ], + "Date": [ "Tue, 30 Apr 2024 06:06:53 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1326" ], + "Content-Length": [ "1405" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:28:39.93Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5\",\"name\":\"namespaceV62vmrx5\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev62vmrx5\",\"serviceBusEndpoint\":\"https://namespaceV62vmrx5.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T06:05:49.3333209Z\",\"updatedAt\":\"2024-04-30T06:06:38.441722Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+45": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5?api-version=2022-10-01-preview+30": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "382" ], - "x-ms-client-request-id": [ "56cc31b0-7956-454c-bba1-fa60f3e427fa" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateExpanded" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateExpanded" ], + "x-ms-unique-id": [ "319" ], + "x-ms-client-request-id": [ "48220e19-8c2c-4298-baf3-16bdd092b20e" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateExpanded" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -1835,38 +1321,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "06b13c7c-0294-4ecd-9087-10303ec7fd96_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11961" ], - "x-ms-correlation-request-id": [ "fc0e93e1-32cc-411a-ac01-8ef1a65cc56c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142844Z:fc0e93e1-32cc-411a-ac01-8ef1a65cc56c" ], + "x-ms-correlation-request-id": [ "a66c084e-19fa-4d4d-84c0-c6130b5879af" ], + "x-ms-client-request-id": [ "48220e19-8c2c-4298-baf3-16bdd092b20e_RP" ], + "x-ms-messaging-activity-id": [ "184ad20d-2e08-494c-9eb0-609484033bc2" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T06:06:55" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-request-id": [ "a66c084e-19fa-4d4d-84c0-c6130b5879af" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060655Z:a66c084e-19fa-4d4d-84c0-c6130b5879af" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:28:44 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F8FEA84A96CD4D0391456BABD751C068 Ref B: SEL221051503025 Ref C: 2024-04-30T06:06:53Z" ], + "Date": [ "Tue, 30 Apr 2024 06:06:55 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1326" ], + "Content-Length": [ "1405" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:28:39.93Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5\",\"name\":\"namespaceV62vmrx5\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev62vmrx5\",\"serviceBusEndpoint\":\"https://namespaceV62vmrx5.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T06:05:49.3333209Z\",\"updatedAt\":\"2024-04-30T06:06:38.441722Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+46": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5?api-version=2022-10-01-preview+31": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "383" ], - "x-ms-client-request-id": [ "c92ead31-1f84-4d5a-87ce-1e5a0b9a7ce0" ], - "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_Get" ], + "x-ms-unique-id": [ "320" ], + "x-ms-client-request-id": [ "05be3fab-3a63-4680-aa7b-c63722cfc7ca" ], + "CommandName": [ "Get-AzServiceBusNamespace" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1877,36 +1367,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7d7c75a6-bcb4-40dd-a70d-85366911e06f_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11960" ], - "x-ms-correlation-request-id": [ "6b707be0-21da-44e4-85fe-2a475f23cf22" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142845Z:6b707be0-21da-44e4-85fe-2a475f23cf22" ], + "x-ms-correlation-request-id": [ "428dcbae-7b4a-4edc-9942-e0aa70ced5b6" ], + "x-ms-client-request-id": [ "05be3fab-3a63-4680-aa7b-c63722cfc7ca_RP" ], + "x-ms-messaging-activity-id": [ "65b3967f-6038-44b3-b513-0ba0d62fc78b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T06:06:58" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "428dcbae-7b4a-4edc-9942-e0aa70ced5b6" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060658Z:428dcbae-7b4a-4edc-9942-e0aa70ced5b6" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:28:45 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1BD60E31B6D647249093DEC3DB6CB940 Ref B: SEL221051503025 Ref C: 2024-04-30T06:06:56Z" ], + "Date": [ "Tue, 30 Apr 2024 06:06:58 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1326" ], + "Content-Length": [ "1405" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:28:39.93Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5\",\"name\":\"namespaceV62vmrx5\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev62vmrx5\",\"serviceBusEndpoint\":\"https://namespaceV62vmrx5.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T06:05:49.3333209Z\",\"updatedAt\":\"2024-04-30T06:06:38.441722Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2\":{\"clientId\":\"b811c3c9-69f0-4332-9a65-85233fc5d271\",\"principalId\":\"a7174667-052f-4f34-a4aa-e3e49119a240\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1\":{\"clientId\":\"31cd9743-402d-4474-91de-a33822ad1b6d\",\"principalId\":\"76306573-19c9-4c3d-b38d-a496ac4e8a71\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+47": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5?api-version=2022-10-01-preview+32": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"North Europe\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"None\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": false,\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 1\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"None\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": false,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 1\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "340" ] + "Content-Length": [ "373" ] } }, "Response": { @@ -1914,39 +1408,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "95e89cce-3be5-43dc-8072-63878067f7f7_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1192" ], - "x-ms-correlation-request-id": [ "1811de12-f812-4b6b-9f86-1aaa51946638" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142856Z:1811de12-f812-4b6b-9f86-1aaa51946638" ], + "x-ms-correlation-request-id": [ "71cc21d9-0f80-498c-8bb5-c4b17e793a20" ], + "x-ms-client-request-id": [ "898444e8-d504-4adf-a129-6904c647101a_RP" ], + "x-ms-messaging-activity-id": [ "cce05aa3-5c24-4584-a26c-09bc7133afa0" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T06:07:02" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "71cc21d9-0f80-498c-8bb5-c4b17e793a20" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060702Z:71cc21d9-0f80-498c-8bb5-c4b17e793a20" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:28:55 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6366B14CFFEE4826976AE5812303DFB3 Ref B: SEL221051503025 Ref C: 2024-04-30T06:06:58Z" ], + "Date": [ "Tue, 30 Apr 2024 06:07:02 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "747" ], + "Content-Length": [ "770" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:28:53.75Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5\",\"name\":\"namespaceV62vmrx5\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev62vmrx5\",\"serviceBusEndpoint\":\"https://namespaceV62vmrx5.servicebus.windows.net:443/\",\"provisioningState\":\"ActivatingIdentity\",\"status\":\"ActivatingIdentity\",\"createdAt\":\"2024-04-30T06:05:49.3333209Z\",\"updatedAt\":\"2024-04-30T06:07:02.270606Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+48": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5?api-version=2022-10-01-preview+33": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "385" ], - "x-ms-client-request-id": [ "7ef4e1aa-baef-4fff-babe-8e56b3eaedf8" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "322" ], + "x-ms-client-request-id": [ "898444e8-d504-4adf-a129-6904c647101a" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -1956,39 +1454,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3eb58115-0f94-475d-ab24-b1e36347a4f7_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11959" ], - "x-ms-correlation-request-id": [ "246a26fa-553e-44f7-8c92-e8b1dad463da" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142926Z:246a26fa-553e-44f7-8c92-e8b1dad463da" ], + "x-ms-correlation-request-id": [ "de0bb54f-3e0f-44e7-a95c-45850d94646b" ], + "x-ms-client-request-id": [ "898444e8-d504-4adf-a129-6904c647101a_RP" ], + "x-ms-messaging-activity-id": [ "11d30448-aa07-418d-bed0-a6aadd8920c0" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T06:07:34" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "de0bb54f-3e0f-44e7-a95c-45850d94646b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060734Z:de0bb54f-3e0f-44e7-a95c-45850d94646b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:29:26 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D846A76D877B400C93EB3E78771AFF2F Ref B: SEL221051503025 Ref C: 2024-04-30T06:07:33Z" ], + "Date": [ "Tue, 30 Apr 2024 06:07:34 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "745" ], + "Content-Length": [ "782" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:28:56.253Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5\",\"name\":\"namespaceV62vmrx5\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev62vmrx5\",\"serviceBusEndpoint\":\"https://namespaceV62vmrx5.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T06:05:49.3333209Z\",\"updatedAt\":\"2024-04-30T06:07:20.3218426Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview+49": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5?api-version=2022-10-01-preview+34": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "386" ], - "x-ms-client-request-id": [ "7ef4e1aa-baef-4fff-babe-8e56b3eaedf8" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "323" ], + "x-ms-client-request-id": [ "898444e8-d504-4adf-a129-6904c647101a" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -1998,38 +1500,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7c0057ac-9c6a-4e64-a303-3f5bd4158314_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11958" ], - "x-ms-correlation-request-id": [ "9bacb5fe-af19-4f33-8923-67162b00b693" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142927Z:9bacb5fe-af19-4f33-8923-67162b00b693" ], + "x-ms-correlation-request-id": [ "69179273-c906-406f-890a-37b724a6dd25" ], + "x-ms-client-request-id": [ "898444e8-d504-4adf-a129-6904c647101a_RP" ], + "x-ms-messaging-activity-id": [ "188fb119-02e0-4e1f-be81-82f2d657ff32" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T06:07:36" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "69179273-c906-406f-890a-37b724a6dd25" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060736Z:69179273-c906-406f-890a-37b724a6dd25" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:29:26 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4F14F8E4B4324228A76C169ED1AEF50B Ref B: SEL221051503025 Ref C: 2024-04-30T06:07:34Z" ], + "Date": [ "Tue, 30 Apr 2024 06:07:35 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "745" ], + "Content-Length": [ "782" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV6umnflt\",\"name\":\"namespaceV6umnflt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6umnflt\",\"createdAt\":\"2023-02-19T14:21:33.51Z\",\"updatedAt\":\"2023-02-19T14:28:56.253Z\",\"serviceBusEndpoint\":\"https://namespaceV6umnflt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV62vmrx5\",\"name\":\"namespaceV62vmrx5\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev62vmrx5\",\"serviceBusEndpoint\":\"https://namespaceV62vmrx5.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T06:05:49.3333209Z\",\"updatedAt\":\"2024-04-30T06:07:20.3218426Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "387" ], - "x-ms-client-request-id": [ "d3235f9e-0bba-4d50-a6a7-6583a9b3df66" ], + "x-ms-unique-id": [ "324" ], + "x-ms-client-request-id": [ "f54f2082-23d1-4742-ba41-d2efdc0a65d5" ], "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_Get" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -2040,38 +1546,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "83bbc460-b546-4dda-a607-5df3af1dcbca_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11957" ], - "x-ms-correlation-request-id": [ "d8134670-4ec9-49f8-8817-7fd69604216f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142927Z:d8134670-4ec9-49f8-8817-7fd69604216f" ], + "x-ms-correlation-request-id": [ "c1c9ada2-2844-4429-9be8-7d64e0e68902" ], + "x-ms-client-request-id": [ "f54f2082-23d1-4742-ba41-d2efdc0a65d5_RP" ], + "x-ms-messaging-activity-id": [ "b88b41fd-d233-404e-9803-9ccec5b4d6a5" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:07:37" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "c1c9ada2-2844-4429-9be8-7d64e0e68902" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060738Z:c1c9ada2-2844-4429-9be8-7d64e0e68902" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:29:27 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 11C6A177EAF24859B866A2693224EF6E Ref B: SEL221051503025 Ref C: 2024-04-30T06:07:36Z" ], + "Date": [ "Tue, 30 Apr 2024 06:07:37 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "756" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T13:23:20.603Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T05:25:27.5897739Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "388" ], - "x-ms-client-request-id": [ "4b4fc362-203a-4fcd-8342-20f4a96f4741" ], - "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_GetViaIdentity" ], + "x-ms-unique-id": [ "325" ], + "x-ms-client-request-id": [ "c428f59c-d356-45da-bf48-81af7e4de49b" ], + "CommandName": [ "Get-AzServiceBusNamespace" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -2082,36 +1592,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c03036a2-e97f-45da-bc3f-de6b1a723e32_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11956" ], - "x-ms-correlation-request-id": [ "df3888f9-ceb7-4033-a1d3-a381df4b481e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142928Z:df3888f9-ceb7-4033-a1d3-a381df4b481e" ], + "x-ms-correlation-request-id": [ "7477ff06-bc7a-4a15-ab03-a89e37648728" ], + "x-ms-client-request-id": [ "c428f59c-d356-45da-bf48-81af7e4de49b_RP" ], + "x-ms-messaging-activity-id": [ "1284a90d-7e34-4608-87e4-7dd64f368557" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:07:38" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "7477ff06-bc7a-4a15-ab03-a89e37648728" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060738Z:7477ff06-bc7a-4a15-ab03-a89e37648728" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:29:28 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0CF7FBD54CEA4D6F8F24D2677C604651 Ref B: SEL221051503025 Ref C: 2024-04-30T06:07:38Z" ], + "Date": [ "Tue, 30 Apr 2024 06:07:38 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "756" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T13:23:20.603Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T05:25:27.5897739Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+3": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+3": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"South Central US\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.1\",\n \"zoneRedundant\": false,\n \"disableLocalAuth\": true,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 0\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.1\",\n \"zoneRedundant\": false,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": true,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 0\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "334" ] + "Content-Length": [ "363" ] } }, "Response": { @@ -2119,39 +1633,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c619b991-1523-4bdb-b9c5-6b145d178921_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1191" ], - "x-ms-correlation-request-id": [ "99765e84-becc-46aa-a69e-ac16ecccbce1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T142938Z:99765e84-becc-46aa-a69e-ac16ecccbce1" ], + "x-ms-correlation-request-id": [ "725df53e-915a-40af-87f5-abe42e3ce6ba" ], + "x-ms-client-request-id": [ "44556e0f-c12a-47bf-b3b4-fef70dc9d8e1_RP" ], + "x-ms-messaging-activity-id": [ "9b307ad9-d6b3-43d3-9e8b-be001a697eb5" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T06:07:40" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "725df53e-915a-40af-87f5-abe42e3ce6ba" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T060745Z:725df53e-915a-40af-87f5-abe42e3ce6ba" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:29:38 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E7193DFE4AE841799504979DE74FD555 Ref B: SEL221051503025 Ref C: 2024-04-30T06:07:38Z" ], + "Date": [ "Tue, 30 Apr 2024 06:07:45 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "759" ], + "Content-Length": [ "757" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:29:34.793Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T05:25:27.5897739Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+4": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "390" ], - "x-ms-client-request-id": [ "7adf733e-4a51-4a83-b75f-b24bb530831a" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "327" ], + "x-ms-client-request-id": [ "44556e0f-c12a-47bf-b3b4-fef70dc9d8e1" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -2161,39 +1679,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d7ad015d-e53e-4c6c-8fb3-8bbf9ca0f275_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11955" ], - "x-ms-correlation-request-id": [ "2fe88fd1-de20-434f-87bb-4ecb3bd7eb69" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143010Z:2fe88fd1-de20-434f-87bb-4ecb3bd7eb69" ], + "x-ms-correlation-request-id": [ "a80f1361-d0cd-4ded-8ff6-2aa57e766af4" ], + "x-ms-client-request-id": [ "44556e0f-c12a-47bf-b3b4-fef70dc9d8e1_RP" ], + "x-ms-messaging-activity-id": [ "69ce3e1f-4d6b-4121-8804-8969f93c4f42" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T06:08:17" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-request-id": [ "a80f1361-d0cd-4ded-8ff6-2aa57e766af4" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060817Z:a80f1361-d0cd-4ded-8ff6-2aa57e766af4" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:30:10 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 16CCCA4B533F434E8A5FEA491417DC5B Ref B: SEL221051503025 Ref C: 2024-04-30T06:08:16Z" ], + "Date": [ "Tue, 30 Apr 2024 06:08:17 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "756" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:29:35.583Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T05:25:27.5897739Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+5": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "391" ], - "x-ms-client-request-id": [ "7adf733e-4a51-4a83-b75f-b24bb530831a" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "328" ], + "x-ms-client-request-id": [ "44556e0f-c12a-47bf-b3b4-fef70dc9d8e1" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -2203,38 +1725,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "eeb334c2-32f7-4da4-a553-52588e606fd3_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11954" ], - "x-ms-correlation-request-id": [ "6bd1339f-d109-49f0-bf88-a2fdf53cbafe" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143011Z:6bd1339f-d109-49f0-bf88-a2fdf53cbafe" ], + "x-ms-correlation-request-id": [ "48c5b2c0-f778-4201-a853-eca5f89416f3" ], + "x-ms-client-request-id": [ "44556e0f-c12a-47bf-b3b4-fef70dc9d8e1_RP" ], + "x-ms-messaging-activity-id": [ "4f8e8679-75f0-4576-ae82-2b543a4b972e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T06:08:19" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-request-id": [ "48c5b2c0-f778-4201-a853-eca5f89416f3" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060819Z:48c5b2c0-f778-4201-a853-eca5f89416f3" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:30:11 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3FC669FE0A044E40B27ED205CA8B65C1 Ref B: SEL221051503025 Ref C: 2024-04-30T06:08:17Z" ], + "Date": [ "Tue, 30 Apr 2024 06:08:18 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "756" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:29:35.583Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T05:25:27.5897739Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+6": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "392" ], - "x-ms-client-request-id": [ "6b373e60-9834-4603-b31d-ceca2a79738e" ], - "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_GetViaIdentity" ], + "x-ms-unique-id": [ "329" ], + "x-ms-client-request-id": [ "3fd2fa9b-f4ab-4d3b-bf79-15cc90d6b5f5" ], + "CommandName": [ "Get-AzServiceBusNamespace" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -2245,36 +1771,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1d2f1b25-54bb-4d53-96c7-d0eee02934da_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11953" ], - "x-ms-correlation-request-id": [ "a7ede2ea-dd47-4e64-9af3-204de7c9a209" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143013Z:a7ede2ea-dd47-4e64-9af3-204de7c9a209" ], + "x-ms-correlation-request-id": [ "ae041acb-fd98-4c88-9cc0-d53dab21d64d" ], + "x-ms-client-request-id": [ "3fd2fa9b-f4ab-4d3b-bf79-15cc90d6b5f5_RP" ], + "x-ms-messaging-activity-id": [ "c2c839fc-be9b-4926-b530-d7a360d9bf95" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T06:08:21" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "ae041acb-fd98-4c88-9cc0-d53dab21d64d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060821Z:ae041acb-fd98-4c88-9cc0-d53dab21d64d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:30:12 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F7559F18FA5A4F058D90A5318FE85550 Ref B: SEL221051503025 Ref C: 2024-04-30T06:08:20Z" ], + "Date": [ "Tue, 30 Apr 2024 06:08:21 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "756" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:29:35.583Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T05:25:27.5897739Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+7": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+7": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"South Central US\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.0\",\n \"zoneRedundant\": false,\n \"disableLocalAuth\": true,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 0\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.0\",\n \"zoneRedundant\": false,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": true,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 0\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "334" ] + "Content-Length": [ "363" ] } }, "Response": { @@ -2282,39 +1812,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f5e3a2a2-ea7b-4582-a173-4a06c0e4c562_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1190" ], - "x-ms-correlation-request-id": [ "507c8571-a45d-4c59-a5c8-73b0c9855c5e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143021Z:507c8571-a45d-4c59-a5c8-73b0c9855c5e" ], + "x-ms-correlation-request-id": [ "be2579b6-16a9-46fa-9cad-61d4b26bf58d" ], + "x-ms-client-request-id": [ "6984e5cb-f488-4916-9086-b0c56f924eb0_RP" ], + "x-ms-messaging-activity-id": [ "4c44395c-3797-4841-a6f3-dac7b0d3fb05" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T06:08:24" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "be2579b6-16a9-46fa-9cad-61d4b26bf58d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060828Z:be2579b6-16a9-46fa-9cad-61d4b26bf58d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:30:20 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 782B212D3EA8471AA2F76C18964B155A Ref B: SEL221051503025 Ref C: 2024-04-30T06:08:21Z" ], + "Date": [ "Tue, 30 Apr 2024 06:08:28 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "759" ], + "Content-Length": [ "758" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:30:20.127Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:08:24.0371767Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+8": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "394" ], - "x-ms-client-request-id": [ "fc74db4b-9570-470e-9c96-ca6c35b6c945" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "331" ], + "x-ms-client-request-id": [ "6984e5cb-f488-4916-9086-b0c56f924eb0" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -2324,39 +1858,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7aaeb06b-fb24-4931-9172-484f3d5d569f_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11952" ], - "x-ms-correlation-request-id": [ "0f61b44f-dd09-4382-b601-e075a01b82c5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143051Z:0f61b44f-dd09-4382-b601-e075a01b82c5" ], + "x-ms-correlation-request-id": [ "e1c5cda0-0b72-4993-9662-d90c95e7085c" ], + "x-ms-client-request-id": [ "6984e5cb-f488-4916-9086-b0c56f924eb0_RP" ], + "x-ms-messaging-activity-id": [ "437dbd51-bffc-4f81-8dc9-1f47e6f6267a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T06:09:00" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "e1c5cda0-0b72-4993-9662-d90c95e7085c" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060900Z:e1c5cda0-0b72-4993-9662-d90c95e7085c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:30:51 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 54FF05C16DFE4789A7888EFD1821738A Ref B: SEL221051503025 Ref C: 2024-04-30T06:08:59Z" ], + "Date": [ "Tue, 30 Apr 2024 06:09:00 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "755" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:30:21.51Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:08:29.9904143Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+9": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "395" ], - "x-ms-client-request-id": [ "fc74db4b-9570-470e-9c96-ca6c35b6c945" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "332" ], + "x-ms-client-request-id": [ "6984e5cb-f488-4916-9086-b0c56f924eb0" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -2366,38 +1904,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "cb234c1c-42d5-40ae-988e-d7c4af1ce5b6_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11951" ], - "x-ms-correlation-request-id": [ "dd316a1e-ca2e-454f-9fe2-44dd285194a9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143052Z:dd316a1e-ca2e-454f-9fe2-44dd285194a9" ], + "x-ms-correlation-request-id": [ "b13658ea-829a-4d6e-85c4-cb932253f3b5" ], + "x-ms-client-request-id": [ "6984e5cb-f488-4916-9086-b0c56f924eb0_RP" ], + "x-ms-messaging-activity-id": [ "ba53d04f-e4e9-4c42-96ce-a70e088c2ae4" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:09:02" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-request-id": [ "b13658ea-829a-4d6e-85c4-cb932253f3b5" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060902Z:b13658ea-829a-4d6e-85c4-cb932253f3b5" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:30:52 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D1D6666356F74DE6A866F04A698C7EF4 Ref B: SEL221051503025 Ref C: 2024-04-30T06:09:00Z" ], + "Date": [ "Tue, 30 Apr 2024 06:09:01 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "755" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:30:21.51Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:08:29.9904143Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+10": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "396" ], - "x-ms-client-request-id": [ "a7004b88-3b7d-4a20-b6ed-6e1519780989" ], - "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_GetViaIdentity" ], + "x-ms-unique-id": [ "333" ], + "x-ms-client-request-id": [ "818ee845-76ac-4a26-ae10-e3b5f1fe2e4a" ], + "CommandName": [ "Get-AzServiceBusNamespace" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -2408,36 +1950,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a5f49c3d-890a-49a4-bd62-fedcbeaed4e6_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11950" ], - "x-ms-correlation-request-id": [ "cc76f9c2-8213-4da1-b050-97aece38aabb" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143052Z:cc76f9c2-8213-4da1-b050-97aece38aabb" ], + "x-ms-correlation-request-id": [ "a60c77fd-218a-4920-b757-ead9fe868ba8" ], + "x-ms-client-request-id": [ "818ee845-76ac-4a26-ae10-e3b5f1fe2e4a_RP" ], + "x-ms-messaging-activity-id": [ "7d04aa92-231d-4902-80bf-ef64d5f2fa73" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:09:02" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-request-id": [ "a60c77fd-218a-4920-b757-ead9fe868ba8" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060902Z:a60c77fd-218a-4920-b757-ead9fe868ba8" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:30:52 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6D06829DBA7C4CA8B935D08B2BE90DF3 Ref B: SEL221051503025 Ref C: 2024-04-30T06:09:02Z" ], + "Date": [ "Tue, 30 Apr 2024 06:09:02 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "755" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:30:21.51Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:08:29.9904143Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+11": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+11": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"South Central US\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": false,\n \"disableLocalAuth\": true,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 0\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": false,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": true,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 0\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "334" ] + "Content-Length": [ "363" ] } }, "Response": { @@ -2445,39 +1991,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0b5a6777-c3a4-47b2-b927-0077238cd2b0_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1189" ], - "x-ms-correlation-request-id": [ "8016185f-2175-45f0-8cea-98f25bf47143" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143100Z:8016185f-2175-45f0-8cea-98f25bf47143" ], + "x-ms-correlation-request-id": [ "f8c96c3b-4adb-4a2b-9d55-b0d9bc34737e" ], + "x-ms-client-request-id": [ "f803c742-8498-4732-9dee-2d6900ec66bb_RP" ], + "x-ms-messaging-activity-id": [ "14edc538-78aa-44aa-bd77-60d6d4e5637f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T06:09:05" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "f8c96c3b-4adb-4a2b-9d55-b0d9bc34737e" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060909Z:f8c96c3b-4adb-4a2b-9d55-b0d9bc34737e" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:31:00 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: ED0C02EF05D7410788985A42D006EC0B Ref B: SEL221051503025 Ref C: 2024-04-30T06:09:02Z" ], + "Date": [ "Tue, 30 Apr 2024 06:09:09 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "759" ], + "Content-Length": [ "758" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:30:59.433Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:09:05.3786929Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+12": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+12": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "398" ], - "x-ms-client-request-id": [ "0b8fb119-8807-4742-baf2-60ac89f02b94" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "335" ], + "x-ms-client-request-id": [ "f803c742-8498-4732-9dee-2d6900ec66bb" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -2487,39 +2037,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "470805d9-0084-4a95-bc7c-c834d7675fab_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11949" ], - "x-ms-correlation-request-id": [ "7e0a08fe-9c41-4caf-aee0-b747f973c960" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143130Z:7e0a08fe-9c41-4caf-aee0-b747f973c960" ], + "x-ms-correlation-request-id": [ "325808b2-58a9-4dd6-b29e-ca7d0bd7a0a8" ], + "x-ms-client-request-id": [ "f803c742-8498-4732-9dee-2d6900ec66bb_RP" ], + "x-ms-messaging-activity-id": [ "cdd2927b-52ac-495c-82b4-69952c6fe543" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T06:09:41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "325808b2-58a9-4dd6-b29e-ca7d0bd7a0a8" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060941Z:325808b2-58a9-4dd6-b29e-ca7d0bd7a0a8" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:31:30 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DA21A84C4F634EC8925C78FC625730FB Ref B: SEL221051503025 Ref C: 2024-04-30T06:09:39Z" ], + "Date": [ "Tue, 30 Apr 2024 06:09:40 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "756" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:30:59.957Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:09:11.4316332Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+13": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+13": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "399" ], - "x-ms-client-request-id": [ "0b8fb119-8807-4742-baf2-60ac89f02b94" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "336" ], + "x-ms-client-request-id": [ "f803c742-8498-4732-9dee-2d6900ec66bb" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -2529,38 +2083,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b56ad66f-157d-4318-a5a8-8b8fd3efd3e5_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11948" ], - "x-ms-correlation-request-id": [ "0a494b4b-1e5c-4e04-9c0b-1627e4743e10" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143131Z:0a494b4b-1e5c-4e04-9c0b-1627e4743e10" ], + "x-ms-correlation-request-id": [ "a8c1afb7-e7ea-49c3-a8b9-edb38252ce81" ], + "x-ms-client-request-id": [ "f803c742-8498-4732-9dee-2d6900ec66bb_RP" ], + "x-ms-messaging-activity-id": [ "52c7a66d-da58-4c25-83ea-bbe842fee0ad" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:09:42" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "a8c1afb7-e7ea-49c3-a8b9-edb38252ce81" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T060942Z:a8c1afb7-e7ea-49c3-a8b9-edb38252ce81" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:31:30 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BEE1F1252CE6418F886C42302069F04A Ref B: SEL221051503025 Ref C: 2024-04-30T06:09:41Z" ], + "Date": [ "Tue, 30 Apr 2024 06:09:42 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "756" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:30:59.957Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:09:11.4316332Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+14": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "400" ], - "x-ms-client-request-id": [ "bd37f3fd-557a-48ce-9e4b-bb3f20927a67" ], - "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_GetViaIdentity" ], + "x-ms-unique-id": [ "337" ], + "x-ms-client-request-id": [ "7de6f209-7aa4-455d-afd1-4ca831922166" ], + "CommandName": [ "Get-AzServiceBusNamespace" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -2571,36 +2129,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "703713bd-c9b5-4e24-825a-c2141e8d8da1_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11947" ], - "x-ms-correlation-request-id": [ "7ab0b070-d2af-49b3-b8f4-1672ab0da0ff" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143131Z:7ab0b070-d2af-49b3-b8f4-1672ab0da0ff" ], + "x-ms-correlation-request-id": [ "ae92261b-68f0-40e0-a7d2-6671c6f8386d" ], + "x-ms-client-request-id": [ "7de6f209-7aa4-455d-afd1-4ca831922166_RP" ], + "x-ms-messaging-activity-id": [ "823a8cd1-f9f0-4936-b06d-d5cd64ab3696" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T06:09:44" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "ae92261b-68f0-40e0-a7d2-6671c6f8386d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060944Z:ae92261b-68f0-40e0-a7d2-6671c6f8386d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:31:31 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 06A7DAC712D74BE0891DF967715DB9DF Ref B: SEL221051503025 Ref C: 2024-04-30T06:09:42Z" ], + "Date": [ "Tue, 30 Apr 2024 06:09:44 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "756" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:30:59.957Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:09:11.4316332Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+15": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+15": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"South Central US\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": false,\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 0\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": false,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 0\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "335" ] + "Content-Length": [ "364" ] } }, "Response": { @@ -2608,39 +2170,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ed735ce2-b7ee-4c30-bca2-b2533f75b4ab_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1188" ], - "x-ms-correlation-request-id": [ "1b4330a5-3c58-4b10-ba2b-fbd766b6f128" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143139Z:1b4330a5-3c58-4b10-ba2b-fbd766b6f128" ], + "x-ms-correlation-request-id": [ "020e50d2-bde5-4b11-b9be-b0f26ca68eff" ], + "x-ms-client-request-id": [ "0a72adad-2cde-44f9-913f-ddfd0cbbd6be_RP" ], + "x-ms-messaging-activity-id": [ "8da158b8-76e0-403e-bd0f-fbdaba9238ff" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T06:09:46" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "020e50d2-bde5-4b11-b9be-b0f26ca68eff" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T060951Z:020e50d2-bde5-4b11-b9be-b0f26ca68eff" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:31:38 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0A902812E29E4981A925D0CBCD68A1F4 Ref B: SEL221051503025 Ref C: 2024-04-30T06:09:44Z" ], + "Date": [ "Tue, 30 Apr 2024 06:09:50 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "760" ], + "Content-Length": [ "759" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:31:38.403Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:09:46.1611956Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+16": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+16": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "402" ], - "x-ms-client-request-id": [ "63708bbc-d32e-4faa-b12c-4ff8b5a0056d" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "339" ], + "x-ms-client-request-id": [ "0a72adad-2cde-44f9-913f-ddfd0cbbd6be" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -2650,39 +2216,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9b62efa5-ee04-458b-bf78-368de11fa3b6_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11946" ], - "x-ms-correlation-request-id": [ "c84be0b4-3fc2-4997-9f8d-ee90aeb09e30" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143209Z:c84be0b4-3fc2-4997-9f8d-ee90aeb09e30" ], + "x-ms-correlation-request-id": [ "a8bba427-3d46-439a-b083-0931ebfe6d7e" ], + "x-ms-client-request-id": [ "0a72adad-2cde-44f9-913f-ddfd0cbbd6be_RP" ], + "x-ms-messaging-activity-id": [ "bbe030f9-bd63-4570-91af-bfc2ef61c5b1" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:10:23" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "a8bba427-3d46-439a-b083-0931ebfe6d7e" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061023Z:a8bba427-3d46-439a-b083-0931ebfe6d7e" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:32:09 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D3507F10F1E3466AB905CDBE446D4483 Ref B: SEL221051503025 Ref C: 2024-04-30T06:10:21Z" ], + "Date": [ "Tue, 30 Apr 2024 06:10:22 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "757" ], + "Content-Length": [ "790" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:31:39.237Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:09:52.0527052Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+17": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+17": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "403" ], - "x-ms-client-request-id": [ "63708bbc-d32e-4faa-b12c-4ff8b5a0056d" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "340" ], + "x-ms-client-request-id": [ "0a72adad-2cde-44f9-913f-ddfd0cbbd6be" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -2692,38 +2262,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "4d164c6e-81ca-47a0-a1c8-4ee2ba1c97fb_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11945" ], - "x-ms-correlation-request-id": [ "105ef3b0-2670-4e91-b828-013caad1796e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143210Z:105ef3b0-2670-4e91-b828-013caad1796e" ], + "x-ms-correlation-request-id": [ "4fd3e236-bc55-47f9-ac75-4d5950866856" ], + "x-ms-client-request-id": [ "0a72adad-2cde-44f9-913f-ddfd0cbbd6be_RP" ], + "x-ms-messaging-activity-id": [ "a72cc5c4-a559-479f-b06b-7a5342082dbf" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:10:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "4fd3e236-bc55-47f9-ac75-4d5950866856" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T061025Z:4fd3e236-bc55-47f9-ac75-4d5950866856" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:32:09 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8BEF2AEEC0CE4794B369E6CBFA202CD9 Ref B: SEL221051503025 Ref C: 2024-04-30T06:10:23Z" ], + "Date": [ "Tue, 30 Apr 2024 06:10:24 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "757" ], + "Content-Length": [ "790" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:31:39.237Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:09:52.0527052Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+18": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+18": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "404" ], - "x-ms-client-request-id": [ "80f61f44-c7ce-43e0-8581-3da5c54c4e9f" ], - "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_GetViaIdentity" ], + "x-ms-unique-id": [ "341" ], + "x-ms-client-request-id": [ "ede4cdf6-b09d-4a21-8183-d9cbd2401581" ], + "CommandName": [ "Get-AzServiceBusNamespace" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -2734,36 +2308,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f1f99bff-6312-4447-a55f-007a147a2268_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11944" ], - "x-ms-correlation-request-id": [ "089aeb5e-92e1-4c17-a0bb-31af16371a11" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143211Z:089aeb5e-92e1-4c17-a0bb-31af16371a11" ], + "x-ms-correlation-request-id": [ "139802c3-cd51-42d2-ba38-7bf28559f594" ], + "x-ms-client-request-id": [ "ede4cdf6-b09d-4a21-8183-d9cbd2401581_RP" ], + "x-ms-messaging-activity-id": [ "cf448760-1efb-4705-9b8b-3eaa6fe7e860" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:10:26" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "139802c3-cd51-42d2-ba38-7bf28559f594" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061026Z:139802c3-cd51-42d2-ba38-7bf28559f594" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:32:10 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 40E50B70A0C04BFD91584E5049CE2225 Ref B: SEL221051503025 Ref C: 2024-04-30T06:10:25Z" ], + "Date": [ "Tue, 30 Apr 2024 06:10:26 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "757" ], + "Content-Length": [ "790" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:31:39.237Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:09:52.0527052Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+19": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+19": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"South Central US\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": false,\n \"disableLocalAuth\": true,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 0\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": false,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": true,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 0\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "334" ] + "Content-Length": [ "363" ] } }, "Response": { @@ -2771,39 +2349,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "76089fb5-7739-42ce-974e-513417543952_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1187" ], - "x-ms-correlation-request-id": [ "cd73d0b0-fa41-4446-b5a2-3392d1d3f1c8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143218Z:cd73d0b0-fa41-4446-b5a2-3392d1d3f1c8" ], + "x-ms-correlation-request-id": [ "ad3925e2-7de4-4216-8b30-cf5b8e6386d3" ], + "x-ms-client-request-id": [ "57364ff3-e624-4272-bf5d-6aeef886e903_RP" ], + "x-ms-messaging-activity-id": [ "59a19f1d-8a70-4e61-bf4c-56ea645a4a41" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T06:10:29" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "ad3925e2-7de4-4216-8b30-cf5b8e6386d3" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061034Z:ad3925e2-7de4-4216-8b30-cf5b8e6386d3" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:32:17 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5E23C9A363024AE9BAAAB195A8C54C01 Ref B: SEL221051503025 Ref C: 2024-04-30T06:10:26Z" ], + "Date": [ "Tue, 30 Apr 2024 06:10:34 GMT" ] }, "ContentHeaders": { "Content-Length": [ "758" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:32:17.57Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:10:29.0456028Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+20": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+20": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "406" ], - "x-ms-client-request-id": [ "023656a8-a2c5-4dc2-bff2-bdfb27f876a4" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "343" ], + "x-ms-client-request-id": [ "57364ff3-e624-4272-bf5d-6aeef886e903" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -2813,39 +2395,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "87514eb2-969b-4e17-a9ac-31ebb35e36e6_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11943" ], - "x-ms-correlation-request-id": [ "9cc9b46e-be84-4c9c-b5ee-807c4b574ccd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143249Z:9cc9b46e-be84-4c9c-b5ee-807c4b574ccd" ], + "x-ms-correlation-request-id": [ "b74a8c84-8bac-4b46-8c7d-b6e4c874a77c" ], + "x-ms-client-request-id": [ "57364ff3-e624-4272-bf5d-6aeef886e903_RP" ], + "x-ms-messaging-activity-id": [ "4cdf6fbd-f81c-4bce-aeba-62a607968057" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T06:11:06" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "b74a8c84-8bac-4b46-8c7d-b6e4c874a77c" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T061106Z:b74a8c84-8bac-4b46-8c7d-b6e4c874a77c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:32:48 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DC030D336A60470DA36FCA0A3312ABC6 Ref B: SEL221051503025 Ref C: 2024-04-30T06:11:04Z" ], + "Date": [ "Tue, 30 Apr 2024 06:11:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "754" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:32:18.3Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:10:34.9988917Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+21": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+21": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "407" ], - "x-ms-client-request-id": [ "023656a8-a2c5-4dc2-bff2-bdfb27f876a4" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "344" ], + "x-ms-client-request-id": [ "57364ff3-e624-4272-bf5d-6aeef886e903" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -2855,38 +2441,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "04c7c527-d2c5-410c-8fa7-cf86c2ac87f6_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11942" ], - "x-ms-correlation-request-id": [ "6c21b62c-9d7e-42f1-9516-f93ab0d656ea" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143249Z:6c21b62c-9d7e-42f1-9516-f93ab0d656ea" ], + "x-ms-correlation-request-id": [ "953d8ca1-f997-4a70-9817-8e1acfd1d540" ], + "x-ms-client-request-id": [ "57364ff3-e624-4272-bf5d-6aeef886e903_RP" ], + "x-ms-messaging-activity-id": [ "908acb65-28cc-483b-bd21-ac2463e14629" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T06:11:07" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "953d8ca1-f997-4a70-9817-8e1acfd1d540" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061107Z:953d8ca1-f997-4a70-9817-8e1acfd1d540" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:32:48 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4239406A191E48CEB5B83685B3A74B13 Ref B: SEL221051503025 Ref C: 2024-04-30T06:11:06Z" ], + "Date": [ "Tue, 30 Apr 2024 06:11:07 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "754" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:32:18.3Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:10:34.9988917Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+22": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview+22": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "408" ], - "x-ms-client-request-id": [ "57d205ba-a564-40dc-9f96-bc5d6a58cc63" ], + "x-ms-unique-id": [ "345" ], + "x-ms-client-request-id": [ "a6701565-47f1-471f-b1d3-df1d2ba05def" ], "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_Get" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -2897,38 +2487,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1d0052c0-5fc7-48c3-a8af-498e84f9ead3_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11941" ], - "x-ms-correlation-request-id": [ "a3cac284-4591-4018-baa8-7ab0aff256ba" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143250Z:a3cac284-4591-4018-baa8-7ab0aff256ba" ], + "x-ms-correlation-request-id": [ "951d37be-0585-4540-b32e-4b1c6029a65c" ], + "x-ms-client-request-id": [ "a6701565-47f1-471f-b1d3-df1d2ba05def_RP" ], + "x-ms-messaging-activity-id": [ "55e5b270-db75-4899-877c-4e8a36d61879" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:11:09" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "951d37be-0585-4540-b32e-4b1c6029a65c" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061109Z:951d37be-0585-4540-b32e-4b1c6029a65c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:32:49 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D18C850356114A68B5189DF58DFFCB7F Ref B: SEL221051503025 Ref C: 2024-04-30T06:11:07Z" ], + "Date": [ "Tue, 30 Apr 2024 06:11:09 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "880" ], + "Content-Length": [ "920" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:30:52.143Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt\",\"name\":\"namespaceV4jslnwt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4jslnwt\",\"serviceBusEndpoint\":\"https://namespaceV4jslnwt.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:26:03.9933506Z\",\"updatedAt\":\"2024-04-30T05:27:11.024851Z\"},\"identity\":{\"principalId\":\"0f6a0174-efe3-4dac-b6e0-c4618ec34b73\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+23": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview+23": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "409" ], - "x-ms-client-request-id": [ "a619601e-e6bc-426f-8169-6bb3c335892b" ], - "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_GetViaIdentity" ], + "x-ms-unique-id": [ "346" ], + "x-ms-client-request-id": [ "9dd34ca7-0b75-40b7-b216-0d15663553e9" ], + "CommandName": [ "Get-AzServiceBusNamespace" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -2939,36 +2533,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fb648620-6c4d-4b15-a944-72a56e09141a_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11940" ], - "x-ms-correlation-request-id": [ "9fc524c7-28c9-40be-a19b-34e7e62a4e7b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143250Z:9fc524c7-28c9-40be-a19b-34e7e62a4e7b" ], + "x-ms-correlation-request-id": [ "2adece99-56eb-4d39-be0b-9c26830e8e9c" ], + "x-ms-client-request-id": [ "9dd34ca7-0b75-40b7-b216-0d15663553e9_RP" ], + "x-ms-messaging-activity-id": [ "d4d77de0-0ae4-43fe-a129-f8234b81dadb" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:11:11" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "2adece99-56eb-4d39-be0b-9c26830e8e9c" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061111Z:2adece99-56eb-4d39-be0b-9c26830e8e9c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:32:50 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E084E8D58F9449DA9AD3B556230F69DB Ref B: SEL221051503025 Ref C: 2024-04-30T06:11:09Z" ], + "Date": [ "Tue, 30 Apr 2024 06:11:10 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "880" ], + "Content-Length": [ "920" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T13:30:52.143Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt\",\"name\":\"namespaceV4jslnwt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4jslnwt\",\"serviceBusEndpoint\":\"https://namespaceV4jslnwt.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:26:03.9933506Z\",\"updatedAt\":\"2024-04-30T05:27:11.024851Z\"},\"identity\":{\"principalId\":\"0f6a0174-efe3-4dac-b6e0-c4618ec34b73\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+24": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview+24": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"East US\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 16\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": true,\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 2\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 16\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": true,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"premiumMessagingPartitions\": 1\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "345" ] + "Content-Length": [ "383" ] } }, "Response": { @@ -2976,39 +2574,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "76c6c2c0-2e1d-49ed-87af-db44f4b14950_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1186" ], - "x-ms-correlation-request-id": [ "be663ccd-5b2c-417f-95ef-cf7e87090ad0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143300Z:be663ccd-5b2c-417f-95ef-cf7e87090ad0" ], + "x-ms-correlation-request-id": [ "5108c129-8e00-4dcc-a532-fe92256f49f4" ], + "x-ms-client-request-id": [ "205d6bae-5de9-4d06-ae79-052c765554be_RP" ], + "x-ms-messaging-activity-id": [ "4d939576-c032-48b1-b466-f02b08c0f3d3" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:11:14" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "5108c129-8e00-4dcc-a532-fe92256f49f4" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061114Z:5108c129-8e00-4dcc-a532-fe92256f49f4" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:32:59 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 030C17DBB6EA4940B17A41FAD12BCD24 Ref B: SEL221051503025 Ref C: 2024-04-30T06:11:11Z" ], + "Date": [ "Tue, 30 Apr 2024 06:11:14 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "884" ], + "Content-Length": [ "891" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":16},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T14:32:58.583Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt\",\"name\":\"namespaceV4jslnwt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4jslnwt\",\"serviceBusEndpoint\":\"https://namespaceV4jslnwt.servicebus.windows.net:443/\",\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-30T05:26:03.9933506Z\",\"updatedAt\":\"2024-04-30T06:11:14.4776486Z\"},\"identity\":{\"principalId\":\"0f6a0174-efe3-4dac-b6e0-c4618ec34b73\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":16}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+25": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview+25": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "411" ], - "x-ms-client-request-id": [ "7a32a1a4-3113-4560-a800-504c909e47a4" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "348" ], + "x-ms-client-request-id": [ "205d6bae-5de9-4d06-ae79-052c765554be" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -3018,39 +2620,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2b43c0f8-c163-4f92-9785-640349b9da88_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11939" ], - "x-ms-correlation-request-id": [ "f10fae7d-c8b3-46ba-8ead-afb3f3daa027" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143330Z:f10fae7d-c8b3-46ba-8ead-afb3f3daa027" ], + "x-ms-correlation-request-id": [ "0ec80a73-f17c-4391-92b3-453a8a7ab406" ], + "x-ms-client-request-id": [ "205d6bae-5de9-4d06-ae79-052c765554be_RP" ], + "x-ms-messaging-activity-id": [ "6345ca7d-6b2e-49aa-a2ca-b747ce8177dd" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:11:45" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "0ec80a73-f17c-4391-92b3-453a8a7ab406" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061145Z:0ec80a73-f17c-4391-92b3-453a8a7ab406" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:33:30 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F9EEAF9D38734C6AB269E65A0B4EC8C9 Ref B: SEL221051503025 Ref C: 2024-04-30T06:11:45Z" ], + "Date": [ "Tue, 30 Apr 2024 06:11:44 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "881" ], + "Content-Length": [ "922" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":16},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T14:33:01.717Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt\",\"name\":\"namespaceV4jslnwt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4jslnwt\",\"serviceBusEndpoint\":\"https://namespaceV4jslnwt.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:26:03.9933506Z\",\"updatedAt\":\"2024-04-30T06:11:32.7422518Z\"},\"identity\":{\"principalId\":\"0f6a0174-efe3-4dac-b6e0-c4618ec34b73\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":16}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview+26": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview+26": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "412" ], - "x-ms-client-request-id": [ "7a32a1a4-3113-4560-a800-504c909e47a4" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "349" ], + "x-ms-client-request-id": [ "205d6bae-5de9-4d06-ae79-052c765554be" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -3060,38 +2666,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "aac0b2c7-ce11-4eb7-9e62-b3e8e394a9d8_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11938" ], - "x-ms-correlation-request-id": [ "24c7e5a9-f41c-4a77-8bed-31d38ae524dc" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143331Z:24c7e5a9-f41c-4a77-8bed-31d38ae524dc" ], + "x-ms-correlation-request-id": [ "34f7183f-cea3-45ba-893f-4adfd710d0bf" ], + "x-ms-client-request-id": [ "205d6bae-5de9-4d06-ae79-052c765554be_RP" ], + "x-ms-messaging-activity-id": [ "8b0af9f5-f350-444b-bb42-2e67a2aeb3b4" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T06:11:46" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "34f7183f-cea3-45ba-893f-4adfd710d0bf" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061146Z:34f7183f-cea3-45ba-893f-4adfd710d0bf" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:33:30 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 11424CDD4C95461CAFBDE7EBFD6A957C Ref B: SEL221051503025 Ref C: 2024-04-30T06:11:45Z" ], + "Date": [ "Tue, 30 Apr 2024 06:11:46 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "881" ], + "Content-Length": [ "922" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":16},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV4du8ar3\",\"name\":\"namespaceV4du8ar3\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"2a305b03-0d60-43cc-a5a0-0d7854bcbca1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"premiumMessagingPartitions\":2,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4du8ar3\",\"createdAt\":\"2023-02-19T13:23:44.963Z\",\"updatedAt\":\"2023-02-19T14:33:01.717Z\",\"serviceBusEndpoint\":\"https://namespaceV4du8ar3.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV4jslnwt\",\"name\":\"namespaceV4jslnwt\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"premiumMessagingPartitions\":1,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4jslnwt\",\"serviceBusEndpoint\":\"https://namespaceV4jslnwt.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:26:03.9933506Z\",\"updatedAt\":\"2024-04-30T06:11:32.7422518Z\"},\"identity\":{\"principalId\":\"0f6a0174-efe3-4dac-b6e0-c4618ec34b73\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":16}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+27": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+27": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "413" ], - "x-ms-client-request-id": [ "b8bbd2ad-244b-439a-af7d-5f32a90a9cb1" ], + "x-ms-unique-id": [ "350" ], + "x-ms-client-request-id": [ "03fc17a6-c7e6-408e-8234-ba052ccff508" ], "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_Get" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -3102,38 +2712,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "8ac4e9c2-79ab-4769-9a71-07c6602b2b88_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11937" ], - "x-ms-correlation-request-id": [ "e75ced8a-2c2f-4254-927e-60af959ff017" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143332Z:e75ced8a-2c2f-4254-927e-60af959ff017" ], + "x-ms-correlation-request-id": [ "267f17ee-cef7-41b1-8d6b-e7cfd1018857" ], + "x-ms-client-request-id": [ "03fc17a6-c7e6-408e-8234-ba052ccff508_RP" ], + "x-ms-messaging-activity-id": [ "002ba564-67df-4aa1-9bbf-427a26605473" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:11:48" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "267f17ee-cef7-41b1-8d6b-e7cfd1018857" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061148Z:267f17ee-cef7-41b1-8d6b-e7cfd1018857" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:33:31 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E6FE04C9BF724E19AE07780D7C0A65BB Ref B: SEL221051503025 Ref C: 2024-04-30T06:11:47Z" ], + "Date": [ "Tue, 30 Apr 2024 06:11:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "754" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:32:18.3Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:10:34.9988917Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+28": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+28": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "414" ], - "x-ms-client-request-id": [ "55b68a5d-72eb-4560-a53b-a2cc492ba22f" ], - "CommandName": [ "Get-AzServiceBusNamespaceV2" ], - "FullCommandName": [ "Get-AzServiceBusNamespaceV2_GetViaIdentity" ], + "x-ms-unique-id": [ "351" ], + "x-ms-client-request-id": [ "d7dcad8e-9dc8-42d7-a546-8db5c99e2552" ], + "CommandName": [ "Get-AzServiceBusNamespace" ], + "FullCommandName": [ "Get-AzServiceBusNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -3144,36 +2758,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c9895aa5-d592-40b0-8656-2aa50a0a14c2_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11936" ], - "x-ms-correlation-request-id": [ "d57faccf-d897-4f7e-9734-b5c165102f0a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143332Z:d57faccf-d897-4f7e-9734-b5c165102f0a" ], + "x-ms-correlation-request-id": [ "5a9d7d37-9c3f-4ebb-b1e3-74408c60f9da" ], + "x-ms-client-request-id": [ "d7dcad8e-9dc8-42d7-a546-8db5c99e2552_RP" ], + "x-ms-messaging-activity-id": [ "839d9d90-0922-4c84-92e1-652db10614ed" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T06:11:50" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "5a9d7d37-9c3f-4ebb-b1e3-74408c60f9da" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061150Z:5a9d7d37-9c3f-4ebb-b1e3-74408c60f9da" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:33:32 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0AD8FADFBE62467CAF587BEFA48146A4 Ref B: SEL221051503025 Ref C: 2024-04-30T06:11:48Z" ], + "Date": [ "Tue, 30 Apr 2024 06:11:49 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "754" ], + "Content-Length": [ "789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:32:18.3Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:10:34.9988917Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+29": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+29": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", - "Content": "{\n \"location\": \"South Central US\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": false,\n \"disableLocalAuth\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"premiumMessagingPartitions\": 0\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"zoneRedundant\": false,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"premiumMessagingPartitions\": 0\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "335" ] + "Content-Length": [ "364" ] } }, "Response": { @@ -3181,39 +2799,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2adbb647-47de-444a-8669-2875f216f54f_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1185" ], - "x-ms-correlation-request-id": [ "16d6180c-52b9-4b28-8bee-18791562c3d6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143341Z:16d6180c-52b9-4b28-8bee-18791562c3d6" ], + "x-ms-correlation-request-id": [ "dbd64154-71c4-4504-8740-cee2d7ff482f" ], + "x-ms-client-request-id": [ "26a61853-63e9-4f7e-b079-ea6f55a7d214_RP" ], + "x-ms-messaging-activity-id": [ "3d6a47b3-d945-40e6-a833-053605b576db" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T06:11:53" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "dbd64154-71c4-4504-8740-cee2d7ff482f" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061158Z:dbd64154-71c4-4504-8740-cee2d7ff482f" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:33:41 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5737755ACE5948EF9C44D4CE6385E1C8 Ref B: SEL221051503025 Ref C: 2024-04-30T06:11:50Z" ], + "Date": [ "Tue, 30 Apr 2024 06:11:57 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "760" ], + "Content-Length": [ "759" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:33:39.313Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:11:53.1730683Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+30": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+30": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "416" ], - "x-ms-client-request-id": [ "fc139984-2427-4a92-a83d-02c28c63a22e" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "353" ], + "x-ms-client-request-id": [ "26a61853-63e9-4f7e-b079-ea6f55a7d214" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -3223,39 +2845,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e66ab98e-c788-4f7b-aec8-6bf1282954a7_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11935" ], - "x-ms-correlation-request-id": [ "defad39d-3eb1-43cf-aedc-304ef54cf034" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143412Z:defad39d-3eb1-43cf-aedc-304ef54cf034" ], + "x-ms-correlation-request-id": [ "851d7f07-a569-4d42-aa99-8d3a6cedc785" ], + "x-ms-client-request-id": [ "26a61853-63e9-4f7e-b079-ea6f55a7d214_RP" ], + "x-ms-messaging-activity-id": [ "4d57f920-915c-4e81-9112-1c80f454f49f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:12:30" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "851d7f07-a569-4d42-aa99-8d3a6cedc785" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061230Z:851d7f07-a569-4d42-aa99-8d3a6cedc785" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:34:11 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5C362DB955AF443FB361F7F5DE47369C Ref B: SEL221051503025 Ref C: 2024-04-30T06:12:28Z" ], + "Date": [ "Tue, 30 Apr 2024 06:12:29 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "756" ], + "Content-Length": [ "790" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:33:42.74Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:11:59.0951136Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } }, - "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview+31": { + "Set-AzServiceBusNamespaceV2+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview+31": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "417" ], - "x-ms-client-request-id": [ "fc139984-2427-4a92-a83d-02c28c63a22e" ], - "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespaceV2_CreateViaIdentity" ], - "FullCommandName": [ "New-AzServiceBusNamespaceV2_CreateViaIdentity" ], + "x-ms-unique-id": [ "354" ], + "x-ms-client-request-id": [ "26a61853-63e9-4f7e-b079-ea6f55a7d214" ], + "CommandName": [ "Az.ServiceBus.private\\New-AzServiceBusNamespace_CreateViaIdentity" ], + "FullCommandName": [ "New-AzServiceBusNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -3265,22 +2891,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6e197c7d-e3e9-420e-8019-4009a177fedf_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11934" ], - "x-ms-correlation-request-id": [ "6b6202b2-336c-4858-8e89-069fc64aca6e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143412Z:6b6202b2-336c-4858-8e89-069fc64aca6e" ], + "x-ms-correlation-request-id": [ "be4cedb8-9696-4302-ab9d-158bdf57646e" ], + "x-ms-client-request-id": [ "26a61853-63e9-4f7e-b079-ea6f55a7d214_RP" ], + "x-ms-messaging-activity-id": [ "29770e2b-af96-43d5-9171-32db9631a787" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:12:30" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "be4cedb8-9696-4302-ab9d-158bdf57646e" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061230Z:be4cedb8-9696-4302-ab9d-158bdf57646e" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:34:12 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B8C182B79A434568A528C5D09FC52642 Ref B: SEL221051503025 Ref C: 2024-04-30T06:12:30Z" ], + "Date": [ "Tue, 30 Apr 2024 06:12:30 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "756" ], + "Content-Length": [ "790" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceV3279pui\",\"name\":\"namespaceV3279pui\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3279pui\",\"createdAt\":\"2023-02-19T13:22:36.43Z\",\"updatedAt\":\"2023-02-19T14:33:42.74Z\",\"serviceBusEndpoint\":\"https://namespaceV3279pui.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceV3twc6l2\",\"name\":\"namespaceV3twc6l2\",\"type\":\"Microsoft.ServiceBus/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"premiumMessagingPartitions\":0,\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3twc6l2\",\"serviceBusEndpoint\":\"https://namespaceV3twc6l2.servicebus.windows.net:443/\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-30T05:25:24.8554069Z\",\"updatedAt\":\"2024-04-30T06:11:59.0951136Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusNamespaceV2.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusNamespaceV2.Tests.ps1 index 09b8d1fceb33..1aa3d9225cab 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusNamespaceV2.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusNamespaceV2.Tests.ps1 @@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzServiceBusNamespaceV2') } function assertNamespaceUpdates{ - param([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace]$expectedNamespace,[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace]$namespace) + param([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace]$expectedNamespace,[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace]$namespace) $expectedNamespace.SkuName | Should -Be $namespace.SkuName $expectedNamespace.SkuCapacity | Should -Be $namespace.SkuCapacity @@ -96,7 +96,7 @@ Describe 'Set-AzServiceBusNamespaceV2' { assertNamespaceUpdates $serviceBusNamespace $namespace # Create a namespace with UserAssignedIdentity and use Set-Az cmdlet to set IdentityType to None - $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV6 -SkuName Premium -Location northeurope -IdentityType UserAssigned -UserAssignedIdentityId $env.msi1, $env.msi2 + $serviceBusNamespace = New-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV6 -SkuName Premium -Location $env.location -IdentityType UserAssigned -UserAssignedIdentityId $env.msi1, $env.msi2 $serviceBusNamespace.UserAssignedIdentity.Count | Should -Be 2 $serviceBusNamespace = Set-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV6 -IdentityType None -UserAssignedIdentityId:$null diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusNetworkRuleSet.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusNetworkRuleSet.Recording.json index 8612a0c87458..6fa012d7ca14 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusNetworkRuleSet.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusNetworkRuleSet.Recording.json @@ -1,17 +1,17 @@ { - "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "418" ], - "x-ms-client-request-id": [ "cfac4013-6480-415b-b9c4-564083081aa0" ], + "x-ms-unique-id": [ "355" ], + "x-ms-client-request-id": [ "bcaceccb-a0ff-4d1b-8f52-96bd25d6b6f7" ], "CommandName": [ "Get-AzServiceBusNetworkRuleSet" ], "FullCommandName": [ "Get-AzServiceBusNetworkRuleSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,36 +22,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "607e9632-1235-4374-ac49-2402425112d6_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11933" ], - "x-ms-correlation-request-id": [ "30cf4a6c-54e0-4991-af54-fabd1e66d627" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143427Z:30cf4a6c-54e0-4991-af54-fabd1e66d627" ], + "x-ms-correlation-request-id": [ "272635bf-9cb5-4b26-b2e8-ed64efe5fd03" ], + "x-ms-client-request-id": [ "bcaceccb-a0ff-4d1b-8f52-96bd25d6b6f7_RP" ], + "x-ms-messaging-activity-id": [ "73aec492-4556-4d42-b6a2-32ced8a37be6" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:12:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "272635bf-9cb5-4b26-b2e8-ed64efe5fd03" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061252Z:272635bf-9cb5-4b26-b2e8-ed64efe5fd03" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:34:27 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 377924E1BD0E4FA4A34E14C19B57D149 Ref B: SEL221051503025 Ref C: 2024-04-30T06:12:49Z" ], + "Date": [ "Tue, 30 Apr 2024 06:12:51 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "393" ], + "Content-Length": [ "430" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"East US\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Allow\",\"virtualNetworkRules\":[],\"ipRules\":[]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Allow\",\"virtualNetworkRules\":[],\"ipRules\":[],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } }, - "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"defaultAction\": \"Allow\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default\"\n }\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2\"\n }\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3\"\n }\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Enabled\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": false,\n \"defaultAction\": \"Allow\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default\"\n }\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2\"\n }\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3\"\n }\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Enabled\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1013" ] + "Content-Length": [ "1058" ] } }, "Response": { @@ -59,38 +63,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "4e905e3f-6f34-4091-883b-af659aa06db7_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1184" ], - "x-ms-correlation-request-id": [ "f34e5a61-9d56-49ef-b1dc-a25fad6b3d0d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143435Z:f34e5a61-9d56-49ef-b1dc-a25fad6b3d0d" ], + "x-ms-correlation-request-id": [ "e6fac569-4bae-4e4a-84e3-6e83defc3c82" ], + "x-ms-client-request-id": [ "5bbbfccc-9a75-400d-b5e3-272d31ae92fd_RP" ], + "x-ms-messaging-activity-id": [ "1a35f17d-1a12-43f7-bfea-36ba92930a96" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T06:13:07" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "e6fac569-4bae-4e4a-84e3-6e83defc3c82" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061307Z:e6fac569-4bae-4e4a-84e3-6e83defc3c82" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:34:35 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8B63F31BE70B422DBE72CDB273602119 Ref B: SEL221051503025 Ref C: 2024-04-30T06:12:52Z" ], + "Date": [ "Tue, 30 Apr 2024 06:13:07 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1174" ], + "Content-Length": [ "1214" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"East US\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Allow\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Allow\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } }, - "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview+3": { + "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "420" ], - "x-ms-client-request-id": [ "10ae19d7-00f4-41c3-a23d-2b92c138b6a7" ], + "x-ms-unique-id": [ "357" ], + "x-ms-client-request-id": [ "95b3c242-3928-494f-904c-ad6f9c8e40c5" ], "CommandName": [ "Get-AzServiceBusNetworkRuleSet" ], "FullCommandName": [ "Get-AzServiceBusNetworkRuleSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -101,36 +109,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "de3b37b8-3bc9-4684-9f0a-229618e0771b_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11932" ], - "x-ms-correlation-request-id": [ "9e6aee4d-caf0-4681-a981-5d162a1d5344" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143436Z:9e6aee4d-caf0-4681-a981-5d162a1d5344" ], + "x-ms-correlation-request-id": [ "57faa1c7-6b60-43c4-8555-36d8ec7fc830" ], + "x-ms-client-request-id": [ "95b3c242-3928-494f-904c-ad6f9c8e40c5_RP" ], + "x-ms-messaging-activity-id": [ "b310bf04-c702-425b-9fc4-6887040b5d9d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T06:13:10" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-request-id": [ "57faa1c7-6b60-43c4-8555-36d8ec7fc830" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061310Z:57faa1c7-6b60-43c4-8555-36d8ec7fc830" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:34:36 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7775BDD75E0B40CA82F3D66F2281AE37 Ref B: SEL221051503025 Ref C: 2024-04-30T06:13:08Z" ], + "Date": [ "Tue, 30 Apr 2024 06:13:09 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1174" ], + "Content-Length": [ "1214" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"East US\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Allow\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Allow\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } }, - "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview+4": { + "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview+4": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"defaultAction\": \"Deny\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Enabled\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": false,\n \"defaultAction\": \"Deny\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Enabled\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1165" ] + "Content-Length": [ "1210" ] } }, "Response": { @@ -138,38 +150,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "802c3bfc-f1cb-4847-87bd-6cca837c7381_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1183" ], - "x-ms-correlation-request-id": [ "e19f47b1-6c51-4173-a25d-6d8268f1894d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143444Z:e19f47b1-6c51-4173-a25d-6d8268f1894d" ], + "x-ms-correlation-request-id": [ "b7a2281d-c37b-4cfb-8cd0-098b2902cda2" ], + "x-ms-client-request-id": [ "d41b5962-8d3f-4983-800f-0012fc00e807_RP" ], + "x-ms-messaging-activity-id": [ "dbae52e2-dd7f-489f-863b-f0cab61aac01" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T06:13:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "b7a2281d-c37b-4cfb-8cd0-098b2902cda2" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061325Z:b7a2281d-c37b-4cfb-8cd0-098b2902cda2" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:34:44 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8E2916D4F24748689F95CC7E2E10CBAE Ref B: SEL221051503025 Ref C: 2024-04-30T06:13:10Z" ], + "Date": [ "Tue, 30 Apr 2024 06:13:24 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1173" ], + "Content-Length": [ "1213" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"East US\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } }, - "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview+5": { + "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "422" ], - "x-ms-client-request-id": [ "809abd41-7c25-4056-908f-c015c896b041" ], + "x-ms-unique-id": [ "359" ], + "x-ms-client-request-id": [ "a535f7e1-5f84-420f-b52f-b89b6e52f6a4" ], "CommandName": [ "Get-AzServiceBusNetworkRuleSet" ], "FullCommandName": [ "Get-AzServiceBusNetworkRuleSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -180,36 +196,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a796412a-c8e1-4d6b-be81-fda444cdedf1_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11931" ], - "x-ms-correlation-request-id": [ "75d2b8e2-9f5c-4934-ac00-9182c1c0581a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143445Z:75d2b8e2-9f5c-4934-ac00-9182c1c0581a" ], + "x-ms-correlation-request-id": [ "91e58f20-ca30-4f73-8844-8caaf333fcae" ], + "x-ms-client-request-id": [ "a535f7e1-5f84-420f-b52f-b89b6e52f6a4_RP" ], + "x-ms-messaging-activity-id": [ "f99fdfea-efc9-4e57-907d-27a02e32cd5e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T06:13:27" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "91e58f20-ca30-4f73-8844-8caaf333fcae" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061327Z:91e58f20-ca30-4f73-8844-8caaf333fcae" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:34:45 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 008A7D0CEFF34FBC9460B4FBB10C1730 Ref B: SEL221051503025 Ref C: 2024-04-30T06:13:25Z" ], + "Date": [ "Tue, 30 Apr 2024 06:13:26 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1173" ], + "Content-Length": [ "1213" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"East US\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } }, - "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview+6": { + "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview+6": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"defaultAction\": \"Deny\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Disabled\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": false,\n \"defaultAction\": \"Deny\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Disabled\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1166" ] + "Content-Length": [ "1211" ] } }, "Response": { @@ -217,38 +237,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "bee44073-83c9-465a-ac61-d9ae93524632_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1182" ], - "x-ms-correlation-request-id": [ "7c1004f5-3d1b-463a-aeed-72ff226f3aef" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143453Z:7c1004f5-3d1b-463a-aeed-72ff226f3aef" ], + "x-ms-correlation-request-id": [ "9fbc6b08-b876-4219-9f93-91e02119ced8" ], + "x-ms-client-request-id": [ "d4934659-755b-4153-922e-00596381e810_RP" ], + "x-ms-messaging-activity-id": [ "c6ef771e-36eb-4538-9b11-87c3c2828442" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T06:13:41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "9fbc6b08-b876-4219-9f93-91e02119ced8" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061342Z:9fbc6b08-b876-4219-9f93-91e02119ced8" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:34:53 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7DAA5C0C220540F59A4FDA016CC4B959 Ref B: SEL221051503025 Ref C: 2024-04-30T06:13:27Z" ], + "Date": [ "Tue, 30 Apr 2024 06:13:41 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1174" ], + "Content-Length": [ "1214" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"East US\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } }, - "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview+7": { + "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "424" ], - "x-ms-client-request-id": [ "9f36ac2f-382c-4098-beb6-8b372db4d569" ], + "x-ms-unique-id": [ "361" ], + "x-ms-client-request-id": [ "3776dace-1839-418a-9886-f897be7b9f5c" ], "CommandName": [ "Get-AzServiceBusNetworkRuleSet" ], "FullCommandName": [ "Get-AzServiceBusNetworkRuleSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -259,36 +283,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "84e354a6-8690-4fa5-b4a1-236e37c55489_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11930" ], - "x-ms-correlation-request-id": [ "57c3b176-4a1c-4436-aa15-7fbc1b2a39d9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143454Z:57c3b176-4a1c-4436-aa15-7fbc1b2a39d9" ], + "x-ms-correlation-request-id": [ "827ab986-2611-4033-97cf-8c31b3e6e84f" ], + "x-ms-client-request-id": [ "3776dace-1839-418a-9886-f897be7b9f5c_RP" ], + "x-ms-messaging-activity-id": [ "0b191e9c-7688-4bd9-844b-80bc0d263b50" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T06:13:44" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "827ab986-2611-4033-97cf-8c31b3e6e84f" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T061344Z:827ab986-2611-4033-97cf-8c31b3e6e84f" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:34:54 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D53101241D134DCFA1BE59ACB8C3A913 Ref B: SEL221051503025 Ref C: 2024-04-30T06:13:42Z" ], + "Date": [ "Tue, 30 Apr 2024 06:13:43 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1174" ], + "Content-Length": [ "1214" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"East US\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } }, - "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview+8": { + "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview+8": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": true,\n \"defaultAction\": \"Deny\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Disabled\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": true,\n \"defaultAction\": \"Deny\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Disabled\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1207" ] + "Content-Length": [ "1210" ] } }, "Response": { @@ -296,38 +324,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2f01ccf5-9204-4bc2-a5dc-213447f613b1_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1181" ], - "x-ms-correlation-request-id": [ "32dc5e10-6853-45ea-bc5f-de20ab847202" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143502Z:32dc5e10-6853-45ea-bc5f-de20ab847202" ], + "x-ms-correlation-request-id": [ "b8ae6ffe-04b5-43fc-8098-8749026b17f3" ], + "x-ms-client-request-id": [ "0285188e-d294-41e3-83c6-531f03456629_RP" ], + "x-ms-messaging-activity-id": [ "f352fff8-5d5f-4118-807e-00d51516576a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:13:59" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "b8ae6ffe-04b5-43fc-8098-8749026b17f3" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061359Z:b8ae6ffe-04b5-43fc-8098-8749026b17f3" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:01 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 37C504587A024E1892FE3BB7D3CD9C0A Ref B: SEL221051503025 Ref C: 2024-04-30T06:13:44Z" ], + "Date": [ "Tue, 30 Apr 2024 06:13:58 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1209" ], + "Content-Length": [ "1213" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"East US\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":true}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":true}}", "isContentBase64": false } }, - "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "426" ], - "x-ms-client-request-id": [ "e9867e8d-f459-4237-8d88-48e352dc3d99" ], + "x-ms-unique-id": [ "363" ], + "x-ms-client-request-id": [ "2a14d85b-a073-4a3b-a95c-0c3d6c8e624d" ], "CommandName": [ "Get-AzServiceBusNetworkRuleSet" ], "FullCommandName": [ "Get-AzServiceBusNetworkRuleSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -338,38 +370,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b8dec9ab-4c5a-4b63-92c0-413ad38a9929_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11929" ], - "x-ms-correlation-request-id": [ "b6d66ae8-99a1-43c3-9b4a-39f10d612f05" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143503Z:b6d66ae8-99a1-43c3-9b4a-39f10d612f05" ], + "x-ms-correlation-request-id": [ "60dce4a7-f46e-4120-92dd-5d1d84dbe462" ], + "x-ms-client-request-id": [ "2a14d85b-a073-4a3b-a95c-0c3d6c8e624d_RP" ], + "x-ms-messaging-activity-id": [ "08e423f4-e0e0-498f-b7e1-eb3fe39d2194" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:14:01" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "60dce4a7-f46e-4120-92dd-5d1d84dbe462" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061401Z:60dce4a7-f46e-4120-92dd-5d1d84dbe462" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:02 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 83BC44113CCF4703AF4FFD10A9CE1EF1 Ref B: SEL221051503025 Ref C: 2024-04-30T06:13:59Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:00 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1209" ], + "Content-Length": [ "1213" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"East US\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":true}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":true}}", "isContentBase64": false } }, - "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "427" ], - "x-ms-client-request-id": [ "3cb0ba1c-6c2c-4602-af8a-7a4f4f14037d" ], + "x-ms-unique-id": [ "364" ], + "x-ms-client-request-id": [ "5c2fa91f-77df-48d7-8c3c-5329e5c3f9ac" ], "CommandName": [ "Get-AzServiceBusNetworkRuleSet" ], "FullCommandName": [ "Get-AzServiceBusNetworkRuleSet_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -380,36 +416,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "01305a9a-7f65-484d-b9f4-cefa1b165177_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11928" ], - "x-ms-correlation-request-id": [ "58e71dfc-bcfa-490f-b6ea-82dd5dbba98d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143504Z:58e71dfc-bcfa-490f-b6ea-82dd5dbba98d" ], + "x-ms-correlation-request-id": [ "7d01b49c-1544-4d79-870d-cfc483bc70a5" ], + "x-ms-client-request-id": [ "5c2fa91f-77df-48d7-8c3c-5329e5c3f9ac_RP" ], + "x-ms-messaging-activity-id": [ "6a5ed68c-4473-4d1e-9480-cb0b3180d909" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:14:03" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "7d01b49c-1544-4d79-870d-cfc483bc70a5" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061403Z:7d01b49c-1544-4d79-870d-cfc483bc70a5" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:03 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A2267BCA94314959A8758868ABD9B9ED Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:01Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:03 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1209" ], + "Content-Length": [ "1213" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"East US\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":true}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":true}}", "isContentBase64": false } }, - "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview+3": { + "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview+3": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": false,\n \"defaultAction\": \"Deny\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Disabled\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": false,\n \"defaultAction\": \"Deny\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Disabled\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1208" ] + "Content-Length": [ "1211" ] } }, "Response": { @@ -417,38 +457,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "26344777-aedf-47db-a395-2b4af55b1ce7_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1180" ], - "x-ms-correlation-request-id": [ "efd8f459-4580-475e-bc92-c702cb2b81af" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143512Z:efd8f459-4580-475e-bc92-c702cb2b81af" ], + "x-ms-correlation-request-id": [ "7745418c-1a16-4834-a31b-551a817d70be" ], + "x-ms-client-request-id": [ "9694b8d3-bf2f-4e69-9dab-cbdcbf1aedcd_RP" ], + "x-ms-messaging-activity-id": [ "962c8658-a017-4ab6-b586-3267dd0abbd2" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T06:14:19" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "7745418c-1a16-4834-a31b-551a817d70be" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061419Z:7745418c-1a16-4834-a31b-551a817d70be" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:11 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0B3192E6BCCA4D5487C47EF1A7058D3D Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:03Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:19 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1174" ], + "Content-Length": [ "1214" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"East US\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } }, - "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview+4": { + "Set-AzServiceBusNetworkRuleSet+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkRuleSets/default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "429" ], - "x-ms-client-request-id": [ "5a258261-2167-4cdc-a9eb-d746dc4562b9" ], + "x-ms-unique-id": [ "366" ], + "x-ms-client-request-id": [ "c988eb3f-acc2-46b2-afaf-25c7bbf33af5" ], "CommandName": [ "Get-AzServiceBusNetworkRuleSet" ], "FullCommandName": [ "Get-AzServiceBusNetworkRuleSet_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -459,22 +503,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "35bc9ced-95e5-4e3e-9041-022b0a1ac971_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11927" ], - "x-ms-correlation-request-id": [ "afb7cec0-88b0-49ea-99c7-970162f81d7b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143516Z:afb7cec0-88b0-49ea-99c7-970162f81d7b" ], + "x-ms-correlation-request-id": [ "e8f5cd58-3a6f-450d-87c7-d660b6c96efa" ], + "x-ms-client-request-id": [ "c988eb3f-acc2-46b2-afaf-25c7bbf33af5_RP" ], + "x-ms-messaging-activity-id": [ "6493b6a4-7802-4b9f-94eb-ef5c287e011a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T06:14:22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "e8f5cd58-3a6f-450d-87c7-d660b6c96efa" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061422Z:e8f5cd58-3a6f-450d-87c7-d660b6c96efa" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:16 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EACF25E837494855A88A4F468F7B59A3 Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:19Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:21 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1174" ], + "Content-Length": [ "1214" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"East US\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.ServiceBus/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-servicebus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusNetworkRuleSet.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusNetworkRuleSet.Tests.ps1 index 1a49b718de43..6e0e11ffbf82 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusNetworkRuleSet.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusNetworkRuleSet.Tests.ps1 @@ -28,21 +28,21 @@ Describe 'Set-AzServiceBusNetworkRuleSet' { $networkRuleSet.VirtualNetworkRule.Count | Should -Be 3 $networkRuleSet.IPRule.Count | Should -Be 2 $networkRuleSet.PublicNetworkAccess | Should -Be "Enabled" - $networkRuleSet.TrustedServiceAccessEnabled | Should -Be $null + $networkRuleSet.TrustedServiceAccessEnabled | Should -Be $false $networkRuleSet = Set-AzServiceBusNetworkRuleSet -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -DefaultAction Deny $networkRuleSet.DefaultAction | Should -Be "Deny" $networkRuleSet.VirtualNetworkRule.Count | Should -Be 3 $networkRuleSet.IPRule.Count | Should -Be 2 $networkRuleSet.PublicNetworkAccess | Should -Be "Enabled" - $networkRuleSet.TrustedServiceAccessEnabled | Should -Be $null + $networkRuleSet.TrustedServiceAccessEnabled | Should -Be $false $networkRuleSet = Set-AzServiceBusNetworkRuleSet -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -PublicNetworkAccess Disabled $networkRuleSet.DefaultAction | Should -Be "Deny" $networkRuleSet.VirtualNetworkRule.Count | Should -Be 3 $networkRuleSet.IPRule.Count | Should -Be 2 $networkRuleSet.PublicNetworkAccess | Should -Be "Disabled" - $networkRuleSet.TrustedServiceAccessEnabled | Should -Be $null + $networkRuleSet.TrustedServiceAccessEnabled | Should -Be $false $networkRuleSet = Set-AzServiceBusNetworkRuleSet -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -TrustedServiceAccessEnabled $networkRuleSet.DefaultAction | Should -Be "Deny" @@ -60,8 +60,8 @@ Describe 'Set-AzServiceBusNetworkRuleSet' { $networkRuleSet.VirtualNetworkRule.Count | Should -Be 3 $networkRuleSet.IPRule.Count | Should -Be 2 $networkRuleSet.PublicNetworkAccess | Should -Be "Disabled" - $networkRuleSet.TrustedServiceAccessEnabled | Should -Be $null + $networkRuleSet.TrustedServiceAccessEnabled | Should -Be $false - { Set-AzServiceBusNetworkRuleSet -InputObject $networkRuleSet } | Should -Throw 'Please specify the property you want to update on the -InputObject' + { Set-AzServiceBusNetworkRuleSet -InputObject $networkRuleSet -ErrorAction Stop } | Should -Throw 'Please specify the property you want to update on the -InputObject' } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusQueue.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusQueue.Recording.json index b9b689095734..c0c6108c71a4 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusQueue.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusQueue.Recording.json @@ -1,17 +1,17 @@ { - "Set-AzServiceBusQueue+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusQueue+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "430" ], - "x-ms-client-request-id": [ "d82766b9-ed28-4bc0-936b-ea19d25a87a2" ], + "x-ms-unique-id": [ "367" ], + "x-ms-client-request-id": [ "df0f89e2-6f9f-43b6-a744-3b1f53616ba8" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,37 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11926" ], - "x-ms-request-id": [ "882c76b4-362e-432d-80dd-ccfc281b2f66" ], - "x-ms-correlation-request-id": [ "882c76b4-362e-432d-80dd-ccfc281b2f66" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143531Z:882c76b4-362e-432d-80dd-ccfc281b2f66" ], + "x-ms-correlation-request-id": [ "a0770cfd-99a8-4948-9215-9fdecb24b0ae" ], + "x-ms-client-request-id": [ "df0f89e2-6f9f-43b6-a744-3b1f53616ba8_RP" ], + "x-ms-messaging-activity-id": [ "68f17bf5-1011-4cdb-bc65-50258c025b64" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T06:14:38" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "a0770cfd-99a8-4948-9215-9fdecb24b0ae" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061438Z:a0770cfd-99a8-4948-9215-9fdecb24b0ae" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:31 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CD2FC3DF77CD4A59B2A035D7448B89AC Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:36Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:37 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1013" ], + "Content-Length": [ "1015" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3\",\"name\":\"queue3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P7D\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:08.1424011Z\",\"updatedAt\":\"2023-02-19T13:47:08.1424011Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3\",\"name\":\"queue3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P7D\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:11.3546268Z\",\"updatedAt\":\"2024-04-30T05:31:11.3546268Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusQueue+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "431" ], - "x-ms-client-request-id": [ "0d88fe17-6076-471d-80ca-a40c15eb6076" ], + "x-ms-unique-id": [ "368" ], + "x-ms-client-request-id": [ "d8b70f0f-80f9-447f-83fe-4b9908d79522" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -63,28 +68,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11925" ], - "x-ms-request-id": [ "ed7377d8-8f72-4585-a0a8-76900db44eac" ], - "x-ms-correlation-request-id": [ "ed7377d8-8f72-4585-a0a8-76900db44eac" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143532Z:ed7377d8-8f72-4585-a0a8-76900db44eac" ], + "x-ms-correlation-request-id": [ "8bb87c60-1da2-479b-bc2e-481975cf18eb" ], + "x-ms-client-request-id": [ "d8b70f0f-80f9-447f-83fe-4b9908d79522_RP" ], + "x-ms-messaging-activity-id": [ "996defb3-892e-49dd-a9dd-396217b27c77" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:14:39" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "8bb87c60-1da2-479b-bc2e-481975cf18eb" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T061439Z:8bb87c60-1da2-479b-bc2e-481975cf18eb" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:31 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 92CD214FC32A47D29147963543433BA2 Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:38Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:39 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1013" ], + "Content-Length": [ "1015" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3\",\"name\":\"queue3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P7D\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:08.1424011Z\",\"updatedAt\":\"2023-02-19T13:47:08.1424011Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3\",\"name\":\"queue3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P7D\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:11.3546268Z\",\"updatedAt\":\"2024-04-30T05:31:11.3546268Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3?api-version=2022-10-01-preview+3": { + "Set-AzServiceBusQueue+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3?api-version=2022-10-01-preview+3": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT1M\",\n \"maxSizeInMegabytes\": 1024,\n \"maxMessageSizeInKilobytes\": 1024,\n \"requiresDuplicateDetection\": false,\n \"requiresSession\": true,\n \"defaultMessageTimeToLive\": \"P10675199DT2H48M5.4775807S\",\n \"deadLetteringOnMessageExpiration\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"maxDeliveryCount\": 10,\n \"status\": \"Active\",\n \"enableBatchedOperations\": true,\n \"autoDeleteOnIdle\": \"P1DT3M4S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -99,37 +109,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1179" ], - "x-ms-request-id": [ "98217937-585b-4bea-9fef-1e5646cd8dac" ], - "x-ms-correlation-request-id": [ "98217937-585b-4bea-9fef-1e5646cd8dac" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143532Z:98217937-585b-4bea-9fef-1e5646cd8dac" ], + "x-ms-correlation-request-id": [ "4d39fecc-be66-4121-a01e-ffa68f7c7469" ], + "x-ms-client-request-id": [ "8f23354d-90ea-464e-9590-006bdc8cafc1_RP" ], + "x-ms-messaging-activity-id": [ "968399f4-5af2-49af-ad65-b1b9b07c788b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T06:14:41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "4d39fecc-be66-4121-a01e-ffa68f7c7469" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061442Z:4d39fecc-be66-4121-a01e-ffa68f7c7469" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:32 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B0B485E3AB504B21A8F7D8A3CB805B9A Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:40Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:41 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "999" ], + "Content-Length": [ "1002" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3\",\"name\":\"queue3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P1DT3M4S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3\",\"name\":\"queue3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P1DT3M4S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:14:41Z\",\"accessedAt\":\"0001-01-01T00:00:00\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3?api-version=2022-10-01-preview+4": { + "Set-AzServiceBusQueue+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "433" ], - "x-ms-client-request-id": [ "072b0a0c-66e0-4659-84ac-ae1df7643045" ], + "x-ms-unique-id": [ "370" ], + "x-ms-client-request-id": [ "2261041e-0213-4a52-ad8b-2331064334bf" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -140,28 +155,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11924" ], - "x-ms-request-id": [ "cefdc639-e8ff-4f0c-941f-dda90a4c195c" ], - "x-ms-correlation-request-id": [ "cefdc639-e8ff-4f0c-941f-dda90a4c195c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143533Z:cefdc639-e8ff-4f0c-941f-dda90a4c195c" ], + "x-ms-correlation-request-id": [ "92666cb2-58b9-4fdb-b581-4a4f7f2e0adf" ], + "x-ms-client-request-id": [ "2261041e-0213-4a52-ad8b-2331064334bf_RP" ], + "x-ms-messaging-activity-id": [ "471285f5-7250-42f2-aa4b-15e809925cc2" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T06:14:43" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "92666cb2-58b9-4fdb-b581-4a4f7f2e0adf" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T061443Z:92666cb2-58b9-4fdb-b581-4a4f7f2e0adf" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:33 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8CCF5C82E6B44D389088B86139EFF74C Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:42Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:42 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1018" ], + "Content-Length": [ "1020" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3\",\"name\":\"queue3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P1DT3M4S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:08.1424011Z\",\"updatedAt\":\"2023-02-19T14:35:32.5949281Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3\",\"name\":\"queue3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P1DT3M4S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:11.3546268Z\",\"updatedAt\":\"2024-04-30T06:14:41.8332016Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3?api-version=2022-10-01-preview+5": { + "Set-AzServiceBusQueue+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3?api-version=2022-10-01-preview+5": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT1M\",\n \"maxSizeInMegabytes\": 1024,\n \"maxMessageSizeInKilobytes\": 1024,\n \"requiresDuplicateDetection\": false,\n \"requiresSession\": true,\n \"defaultMessageTimeToLive\": \"P10675199DT2H48M5.4775807S\",\n \"deadLetteringOnMessageExpiration\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"maxDeliveryCount\": 10,\n \"status\": \"ReceiveDisabled\",\n \"enableBatchedOperations\": true,\n \"autoDeleteOnIdle\": \"P1DT3M4S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -176,37 +196,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1178" ], - "x-ms-request-id": [ "a6469729-9bda-4ec6-a194-d171450c524d" ], - "x-ms-correlation-request-id": [ "a6469729-9bda-4ec6-a194-d171450c524d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143533Z:a6469729-9bda-4ec6-a194-d171450c524d" ], + "x-ms-correlation-request-id": [ "401c28fa-77a9-4951-bf90-009d29f3dfd8" ], + "x-ms-client-request-id": [ "3e6acd7c-3c0a-4d94-84df-5deb617152d8_RP" ], + "x-ms-messaging-activity-id": [ "108361c5-dba2-499e-b5f0-4a44e553c3b9" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T06:14:45" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "401c28fa-77a9-4951-bf90-009d29f3dfd8" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061445Z:401c28fa-77a9-4951-bf90-009d29f3dfd8" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:33 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9A98740C26F3424C8AE33AB8AB0A33E4 Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:43Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:44 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1008" ], + "Content-Length": [ "1011" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue3\",\"name\":\"queue3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"ReceiveDisabled\",\"autoDeleteOnIdle\":\"P1DT3M4S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue3\",\"name\":\"queue3\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"ReceiveDisabled\",\"autoDeleteOnIdle\":\"P1DT3M4S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:14:45Z\",\"accessedAt\":\"0001-01-01T00:00:00\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "435" ], - "x-ms-client-request-id": [ "e6099b22-ea6c-480e-926d-17bf18fccbdf" ], + "x-ms-unique-id": [ "372" ], + "x-ms-client-request-id": [ "4e0c325a-60d6-4bb2-a99c-04d309b8af0c" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -217,37 +242,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11923" ], - "x-ms-request-id": [ "09abe942-0656-4b9d-b79d-702a86c17eae" ], - "x-ms-correlation-request-id": [ "09abe942-0656-4b9d-b79d-702a86c17eae" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143534Z:09abe942-0656-4b9d-b79d-702a86c17eae" ], + "x-ms-correlation-request-id": [ "72e26c1b-9f82-4881-8141-66ae77e788d7" ], + "x-ms-client-request-id": [ "4e0c325a-60d6-4bb2-a99c-04d309b8af0c_RP" ], + "x-ms-messaging-activity-id": [ "b7e4b609-d40e-4080-9258-99e8e24f13ce" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T06:14:47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "72e26c1b-9f82-4881-8141-66ae77e788d7" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061447Z:72e26c1b-9f82-4881-8141-66ae77e788d7" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:34 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1D3E63473B4840C8B2BD674D6DB77C35 Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:45Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:46 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1087" ], + "Content-Length": [ "1089" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT4M\",\"maxSizeInMegabytes\":4096,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:05.6736777Z\",\"updatedAt\":\"2023-02-19T13:47:05.6736777Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT4M\",\"maxSizeInMegabytes\":4096,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:07.2920078Z\",\"updatedAt\":\"2024-04-30T05:31:07.2920078Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "436" ], - "x-ms-client-request-id": [ "2a26ad4a-3458-4e8c-8279-d92426c559a3" ], + "x-ms-unique-id": [ "373" ], + "x-ms-client-request-id": [ "ec3da8fd-2be8-4804-96ec-06a4d80d6059" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -258,28 +288,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11922" ], - "x-ms-request-id": [ "5c4d0005-9e92-4094-9553-f07d9729b473" ], - "x-ms-correlation-request-id": [ "5c4d0005-9e92-4094-9553-f07d9729b473" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143535Z:5c4d0005-9e92-4094-9553-f07d9729b473" ], + "x-ms-correlation-request-id": [ "037bedca-0bb8-412d-88f2-2f27333f3103" ], + "x-ms-client-request-id": [ "ec3da8fd-2be8-4804-96ec-06a4d80d6059_RP" ], + "x-ms-messaging-activity-id": [ "158939b6-40ba-4ce6-b0ce-baa0dae30929" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:14:48" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "037bedca-0bb8-412d-88f2-2f27333f3103" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061448Z:037bedca-0bb8-412d-88f2-2f27333f3103" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:34 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 065171E6E957404BB4E3586B62DC7C8B Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:47Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:48 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1087" ], + "Content-Length": [ "1089" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT4M\",\"maxSizeInMegabytes\":4096,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:05.6736777Z\",\"updatedAt\":\"2023-02-19T13:47:05.6736777Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT4M\",\"maxSizeInMegabytes\":4096,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:07.2920078Z\",\"updatedAt\":\"2024-04-30T05:31:07.2920078Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+3": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+3": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT2M\",\n \"maxSizeInMegabytes\": 4096,\n \"maxMessageSizeInKilobytes\": 102400,\n \"requiresDuplicateDetection\": true,\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P428DT3H11M10S\",\n \"deadLetteringOnMessageExpiration\": true,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"maxDeliveryCount\": 8,\n \"status\": \"Active\",\n \"enableBatchedOperations\": false,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false,\n \"forwardTo\": \"queue1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -294,37 +329,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1177" ], - "x-ms-request-id": [ "1cdbdf9e-683c-4915-ad9d-6386007c6284" ], - "x-ms-correlation-request-id": [ "1cdbdf9e-683c-4915-ad9d-6386007c6284" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143535Z:1cdbdf9e-683c-4915-ad9d-6386007c6284" ], + "x-ms-correlation-request-id": [ "4bf9559a-5617-4ef1-92a0-b813ce482287" ], + "x-ms-client-request-id": [ "fb8ceab8-79e6-4734-b5c1-dc77f4276d4f_RP" ], + "x-ms-messaging-activity-id": [ "ba6dcea5-6b34-4662-a8d1-e053289db03a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T06:14:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "4bf9559a-5617-4ef1-92a0-b813ce482287" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061451Z:4bf9559a-5617-4ef1-92a0-b813ce482287" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:35 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8CC812F59830484EB663BF6FA2872B9C Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:49Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:50 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1068" ], + "Content-Length": [ "1071" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":4096,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":4096,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:14:50Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+4": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "438" ], - "x-ms-client-request-id": [ "034c56fd-4bfb-4355-bd96-743aa45429f0" ], + "x-ms-unique-id": [ "375" ], + "x-ms-client-request-id": [ "8e54c8ef-a7ef-43ee-ad3d-f3c13a3591e6" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -335,28 +375,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11921" ], - "x-ms-request-id": [ "bc604262-ba74-4b2d-bfd6-c2d3152344c1" ], - "x-ms-correlation-request-id": [ "bc604262-ba74-4b2d-bfd6-c2d3152344c1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143536Z:bc604262-ba74-4b2d-bfd6-c2d3152344c1" ], + "x-ms-correlation-request-id": [ "839c2d54-a079-4498-986e-9626588fc223" ], + "x-ms-client-request-id": [ "8e54c8ef-a7ef-43ee-ad3d-f3c13a3591e6_RP" ], + "x-ms-messaging-activity-id": [ "f66e25ef-55af-4005-9c3e-16449e779544" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:14:52" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "839c2d54-a079-4498-986e-9626588fc223" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061452Z:839c2d54-a079-4498-986e-9626588fc223" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:35 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B75BBC1880DB4CF89595B3CD30BEFE38 Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:51Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:52 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1086" ], + "Content-Length": [ "1089" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":4096,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:05.6736777Z\",\"updatedAt\":\"2023-02-19T14:35:35.563709Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":4096,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:07.2920078Z\",\"updatedAt\":\"2024-04-30T06:14:50.9901427Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+5": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+5": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT2M\",\n \"maxSizeInMegabytes\": 4096,\n \"maxMessageSizeInKilobytes\": 102400,\n \"requiresDuplicateDetection\": true,\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnMessageExpiration\": true,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"maxDeliveryCount\": 8,\n \"status\": \"Active\",\n \"enableBatchedOperations\": false,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false,\n \"forwardTo\": \"queue1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -371,37 +416,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1176" ], - "x-ms-request-id": [ "0db76775-b049-4142-bbae-72f8758abea3" ], - "x-ms-correlation-request-id": [ "0db76775-b049-4142-bbae-72f8758abea3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143537Z:0db76775-b049-4142-bbae-72f8758abea3" ], + "x-ms-correlation-request-id": [ "9fa33e2a-4fca-413b-aafc-02bad6eca2f3" ], + "x-ms-client-request-id": [ "2afe93a4-a981-468c-94d7-2d9c5fe65868_RP" ], + "x-ms-messaging-activity-id": [ "2f5ec543-7de7-4f4c-89d3-38bcb0599a7f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T06:14:55" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "9fa33e2a-4fca-413b-aafc-02bad6eca2f3" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061455Z:9fa33e2a-4fca-413b-aafc-02bad6eca2f3" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:36 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CC38D2FA818E49E4AAB3238119E6850F Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:53Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:54 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1062" ], + "Content-Length": [ "1065" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":4096,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":4096,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:14:55Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+6": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "440" ], - "x-ms-client-request-id": [ "7889dbcc-35ae-4962-8cf5-5d41584b018c" ], + "x-ms-unique-id": [ "377" ], + "x-ms-client-request-id": [ "a4d86f60-9958-4c86-af8b-7d1f6ec1f4d8" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -412,28 +462,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11920" ], - "x-ms-request-id": [ "67f49594-b900-4b5f-a5f6-519f0c5b6156" ], - "x-ms-correlation-request-id": [ "67f49594-b900-4b5f-a5f6-519f0c5b6156" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143537Z:67f49594-b900-4b5f-a5f6-519f0c5b6156" ], + "x-ms-correlation-request-id": [ "80418346-f35b-4f3b-8781-dad6b6c251ab" ], + "x-ms-client-request-id": [ "a4d86f60-9958-4c86-af8b-7d1f6ec1f4d8_RP" ], + "x-ms-messaging-activity-id": [ "2be1a9d0-1627-434d-96d5-0148cfd63454" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T06:14:55" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-request-id": [ "80418346-f35b-4f3b-8781-dad6b6c251ab" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061455Z:80418346-f35b-4f3b-8781-dad6b6c251ab" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:37 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 29FD95EC8A5E4E439B5625FB0B105975 Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:55Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:54 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1081" ], + "Content-Length": [ "1083" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":4096,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:05.6736777Z\",\"updatedAt\":\"2023-02-19T14:35:36.9230929Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":4096,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:07.2920078Z\",\"updatedAt\":\"2024-04-30T06:14:55.1309308Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+7": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+7": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT2M\",\n \"maxSizeInMegabytes\": 2048,\n \"maxMessageSizeInKilobytes\": 102400,\n \"requiresDuplicateDetection\": true,\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnMessageExpiration\": true,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"maxDeliveryCount\": 8,\n \"status\": \"Active\",\n \"enableBatchedOperations\": false,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false,\n \"forwardTo\": \"queue1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -448,37 +503,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1175" ], - "x-ms-request-id": [ "92fe99bd-cf3d-4f9c-92b0-e2ce23dfaf48" ], - "x-ms-correlation-request-id": [ "92fe99bd-cf3d-4f9c-92b0-e2ce23dfaf48" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143538Z:92fe99bd-cf3d-4f9c-92b0-e2ce23dfaf48" ], + "x-ms-correlation-request-id": [ "beecc6ab-da77-46c0-a2e9-aac336e48497" ], + "x-ms-client-request-id": [ "9319ce5c-df20-4696-8cb6-1a5c8cb31068_RP" ], + "x-ms-messaging-activity-id": [ "3fb9fa3c-0bf9-4a9a-8086-11af8b893181" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:14:57" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "beecc6ab-da77-46c0-a2e9-aac336e48497" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061457Z:beecc6ab-da77-46c0-a2e9-aac336e48497" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:37 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A3013F3458884D0EBD95B404731ADA42 Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:55Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:56 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1062" ], + "Content-Length": [ "1065" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:14:57Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+8": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "442" ], - "x-ms-client-request-id": [ "66100f3d-9a99-45f2-84da-fc986be85bcd" ], + "x-ms-unique-id": [ "379" ], + "x-ms-client-request-id": [ "9d3af615-d0e5-412c-b6b3-e59ac83a38c7" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -489,28 +549,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11919" ], - "x-ms-request-id": [ "6d192dcb-297b-4bb9-83ce-475a27596fad" ], - "x-ms-correlation-request-id": [ "6d192dcb-297b-4bb9-83ce-475a27596fad" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143538Z:6d192dcb-297b-4bb9-83ce-475a27596fad" ], + "x-ms-correlation-request-id": [ "cf31c932-76d3-45c5-8ca6-7ff0d25486bc" ], + "x-ms-client-request-id": [ "9d3af615-d0e5-412c-b6b3-e59ac83a38c7_RP" ], + "x-ms-messaging-activity-id": [ "7bf8c9d4-eb28-4755-b58c-46656d624e12" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T06:14:59" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "cf31c932-76d3-45c5-8ca6-7ff0d25486bc" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061459Z:cf31c932-76d3-45c5-8ca6-7ff0d25486bc" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:38 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8B0549F92CDD4A609CDF4D65DEFB4D35 Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:57Z" ], + "Date": [ "Tue, 30 Apr 2024 06:14:58 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1078" ], + "Content-Length": [ "1083" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:05.6736777Z\",\"updatedAt\":\"2023-02-19T14:35:38.1106Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:07.2920078Z\",\"updatedAt\":\"2024-04-30T06:14:57.6466151Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+9": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+9": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT2M\",\n \"maxSizeInMegabytes\": 2048,\n \"maxMessageSizeInKilobytes\": 102400,\n \"requiresDuplicateDetection\": true,\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnMessageExpiration\": true,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"maxDeliveryCount\": 8,\n \"status\": \"Active\",\n \"enableBatchedOperations\": true,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false,\n \"forwardTo\": \"queue1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -525,37 +590,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1174" ], - "x-ms-request-id": [ "3f971fbb-1904-40da-b3c2-2306db1af6bb" ], - "x-ms-correlation-request-id": [ "3f971fbb-1904-40da-b3c2-2306db1af6bb" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143539Z:3f971fbb-1904-40da-b3c2-2306db1af6bb" ], + "x-ms-correlation-request-id": [ "37c7c63b-ce1f-48f9-bbf4-1e9817f64dc8" ], + "x-ms-client-request-id": [ "0fe82c69-9aba-4b3e-9d28-a133ef71dfe3_RP" ], + "x-ms-messaging-activity-id": [ "8dd7d48c-4441-4173-b436-7c4f62e64ec3" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T06:15:01" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-request-id": [ "37c7c63b-ce1f-48f9-bbf4-1e9817f64dc8" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061501Z:37c7c63b-ce1f-48f9-bbf4-1e9817f64dc8" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:39 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6DDE300FD0394CD3AEC35DDC12A637CA Ref B: SEL221051503025 Ref C: 2024-04-30T06:14:59Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:00 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1061" ], + "Content-Length": [ "1064" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:15:01Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+10": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "444" ], - "x-ms-client-request-id": [ "079128e4-d49c-4083-a663-61c131c0d813" ], + "x-ms-unique-id": [ "381" ], + "x-ms-client-request-id": [ "f848fb1d-7a74-4fc6-876a-26e4b4bd4d66" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -566,28 +636,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11918" ], - "x-ms-request-id": [ "b785739a-3d88-4974-a79c-b9e6df0fcb64" ], - "x-ms-correlation-request-id": [ "b785739a-3d88-4974-a79c-b9e6df0fcb64" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143540Z:b785739a-3d88-4974-a79c-b9e6df0fcb64" ], + "x-ms-correlation-request-id": [ "f5353059-445c-4918-b357-0bf2efbd7444" ], + "x-ms-client-request-id": [ "f848fb1d-7a74-4fc6-876a-26e4b4bd4d66_RP" ], + "x-ms-messaging-activity-id": [ "225cc68e-8a8e-4277-9e43-6a21cc1ab722" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T06:15:02" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "f5353059-445c-4918-b357-0bf2efbd7444" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T061502Z:f5353059-445c-4918-b357-0bf2efbd7444" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:39 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2F06EBA1695A46C283B91B7062106250 Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:01Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:02 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1080" ], + "Content-Length": [ "1082" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:05.6736777Z\",\"updatedAt\":\"2023-02-19T14:35:39.3293132Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:07.2920078Z\",\"updatedAt\":\"2024-04-30T06:15:01.0685209Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+11": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+11": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT2M\",\n \"maxSizeInMegabytes\": 2048,\n \"maxMessageSizeInKilobytes\": 102400,\n \"requiresDuplicateDetection\": true,\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnMessageExpiration\": true,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"maxDeliveryCount\": 8,\n \"status\": \"Active\",\n \"enableBatchedOperations\": false,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false,\n \"forwardTo\": \"queue1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -602,37 +677,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1173" ], - "x-ms-request-id": [ "18d3f16d-cefe-411a-8da6-1a1aa6066654" ], - "x-ms-correlation-request-id": [ "18d3f16d-cefe-411a-8da6-1a1aa6066654" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143540Z:18d3f16d-cefe-411a-8da6-1a1aa6066654" ], + "x-ms-correlation-request-id": [ "fa484203-cdae-4a9b-810e-d7097762b4e7" ], + "x-ms-client-request-id": [ "e7cd53bb-5e35-4759-a342-e94447010c36_RP" ], + "x-ms-messaging-activity-id": [ "29a3c7ee-83cf-4b46-8396-a18a70092abb" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:15:04" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "fa484203-cdae-4a9b-810e-d7097762b4e7" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061504Z:fa484203-cdae-4a9b-810e-d7097762b4e7" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:40 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4CD133BED6EB4E19BBB40196E4DBED9D Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:02Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1062" ], + "Content-Length": [ "1065" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:15:04Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+12": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+12": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "446" ], - "x-ms-client-request-id": [ "6c7a3f4d-dbde-4ff1-99d4-7508a50ace5d" ], + "x-ms-unique-id": [ "383" ], + "x-ms-client-request-id": [ "f01743a1-da9b-4497-bb3f-4fac3e387dad" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -643,28 +723,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11917" ], - "x-ms-request-id": [ "a3d6fd34-0562-40a3-aeb9-346663054c54" ], - "x-ms-correlation-request-id": [ "a3d6fd34-0562-40a3-aeb9-346663054c54" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143541Z:a3d6fd34-0562-40a3-aeb9-346663054c54" ], + "x-ms-correlation-request-id": [ "c3b44cbf-718f-43fe-b0a2-f9eb162db09a" ], + "x-ms-client-request-id": [ "f01743a1-da9b-4497-bb3f-4fac3e387dad_RP" ], + "x-ms-messaging-activity-id": [ "6a14d309-46fc-4356-803a-2310f30295d4" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:15:06" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "c3b44cbf-718f-43fe-b0a2-f9eb162db09a" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061506Z:c3b44cbf-718f-43fe-b0a2-f9eb162db09a" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:41 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6FF2D90776214EFA97967F7B2C668FC1 Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:05Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1081" ], + "Content-Length": [ "1083" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:05.6736777Z\",\"updatedAt\":\"2023-02-19T14:35:40.5168753Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:07.2920078Z\",\"updatedAt\":\"2024-04-30T06:15:04.8186783Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+13": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+13": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT2M\",\n \"maxSizeInMegabytes\": 2048,\n \"maxMessageSizeInKilobytes\": 102400,\n \"requiresDuplicateDetection\": true,\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnMessageExpiration\": true,\n \"duplicateDetectionHistoryTimeWindow\": \"PT8M\",\n \"maxDeliveryCount\": 8,\n \"status\": \"Active\",\n \"enableBatchedOperations\": false,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false,\n \"forwardTo\": \"queue1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -679,37 +764,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1172" ], - "x-ms-request-id": [ "1771f66e-c1e2-4497-864c-474e4f30df93" ], - "x-ms-correlation-request-id": [ "1771f66e-c1e2-4497-864c-474e4f30df93" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143542Z:1771f66e-c1e2-4497-864c-474e4f30df93" ], + "x-ms-correlation-request-id": [ "71f3dd55-88df-408a-bfc9-bf338a6dc467" ], + "x-ms-client-request-id": [ "edab53bd-55ae-4d4d-ac94-bc9276958d86_RP" ], + "x-ms-messaging-activity-id": [ "1e71caac-5643-4045-acbd-533cae895e00" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T06:15:08" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "71f3dd55-88df-408a-bfc9-bf338a6dc467" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061508Z:71f3dd55-88df-408a-bfc9-bf338a6dc467" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:41 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FDCA04A15FD242DA960CD239C409DF20 Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:06Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:07 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1061" ], + "Content-Length": [ "1064" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:15:08Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+14": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "448" ], - "x-ms-client-request-id": [ "34c904fe-6249-4ba1-86bc-31ce5c822419" ], + "x-ms-unique-id": [ "385" ], + "x-ms-client-request-id": [ "6a3b7be7-9a54-4cd1-b926-d83131abed86" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -720,28 +810,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11916" ], - "x-ms-request-id": [ "f7564dd1-fdd4-4d64-bc4b-f5a304812a60" ], - "x-ms-correlation-request-id": [ "f7564dd1-fdd4-4d64-bc4b-f5a304812a60" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143542Z:f7564dd1-fdd4-4d64-bc4b-f5a304812a60" ], + "x-ms-correlation-request-id": [ "ac2d12cb-e820-4e07-bcc3-ccedf4070843" ], + "x-ms-client-request-id": [ "6a3b7be7-9a54-4cd1-b926-d83131abed86_RP" ], + "x-ms-messaging-activity-id": [ "36cafcc3-d488-48c0-8e53-d7d9ca455d23" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T06:15:10" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "ac2d12cb-e820-4e07-bcc3-ccedf4070843" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061510Z:ac2d12cb-e820-4e07-bcc3-ccedf4070843" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:42 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DD91F43F8B0946BABA2DD9976659F08A Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:08Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:09 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1080" ], + "Content-Length": [ "1082" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:05.6736777Z\",\"updatedAt\":\"2023-02-19T14:35:41.9074613Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:07.2920078Z\",\"updatedAt\":\"2024-04-30T06:15:08.4593456Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+15": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+15": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT2M\",\n \"maxSizeInMegabytes\": 2048,\n \"maxMessageSizeInKilobytes\": 102400,\n \"requiresDuplicateDetection\": true,\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnMessageExpiration\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT8M\",\n \"maxDeliveryCount\": 8,\n \"status\": \"Active\",\n \"enableBatchedOperations\": false,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false,\n \"forwardTo\": \"queue1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -756,37 +851,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1171" ], - "x-ms-request-id": [ "7b94f322-2ca9-461b-93f1-2323db95cdc5" ], - "x-ms-correlation-request-id": [ "7b94f322-2ca9-461b-93f1-2323db95cdc5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143543Z:7b94f322-2ca9-461b-93f1-2323db95cdc5" ], + "x-ms-correlation-request-id": [ "bdef4ec3-4a3a-46da-9aaa-b44ebcf0774e" ], + "x-ms-client-request-id": [ "f0d8a776-313a-483c-a280-91e0ddca64d3_RP" ], + "x-ms-messaging-activity-id": [ "89cc6aa9-cf58-4800-888b-af3beeafbcf6" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T06:15:12" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "bdef4ec3-4a3a-46da-9aaa-b44ebcf0774e" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061512Z:bdef4ec3-4a3a-46da-9aaa-b44ebcf0774e" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:42 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EABB4589090344868A616116BAD3B7B5 Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:10Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1062" ], + "Content-Length": [ "1065" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:15:12Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+16": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+16": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "450" ], - "x-ms-client-request-id": [ "0b279aa9-23ce-4725-a1e9-0beeb3bcef14" ], + "x-ms-unique-id": [ "387" ], + "x-ms-client-request-id": [ "cbe02176-801d-4959-8da9-e003e84746b9" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -797,28 +897,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11915" ], - "x-ms-request-id": [ "97685f4c-19e0-4b7d-b049-a72e7c0a7d9c" ], - "x-ms-correlation-request-id": [ "97685f4c-19e0-4b7d-b049-a72e7c0a7d9c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143544Z:97685f4c-19e0-4b7d-b049-a72e7c0a7d9c" ], + "x-ms-correlation-request-id": [ "d74e622d-9961-4bb9-b978-17b9a2a239b9" ], + "x-ms-client-request-id": [ "cbe02176-801d-4959-8da9-e003e84746b9_RP" ], + "x-ms-messaging-activity-id": [ "2eb018d9-8451-4500-a49e-3f0935acc8c7" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T06:15:12" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "d74e622d-9961-4bb9-b978-17b9a2a239b9" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061512Z:d74e622d-9961-4bb9-b978-17b9a2a239b9" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:43 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CA7B557240C74078AD18A022DBBB9C75 Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:12Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:12 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1081" ], + "Content-Length": [ "1083" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:05.6736777Z\",\"updatedAt\":\"2023-02-19T14:35:43.1731829Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":8,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:07.2920078Z\",\"updatedAt\":\"2024-04-30T06:15:12.3344948Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+17": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+17": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT2M\",\n \"maxSizeInMegabytes\": 2048,\n \"maxMessageSizeInKilobytes\": 102400,\n \"requiresDuplicateDetection\": true,\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnMessageExpiration\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT8M\",\n \"maxDeliveryCount\": 15,\n \"status\": \"Active\",\n \"enableBatchedOperations\": false,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false,\n \"forwardTo\": \"queue1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -833,37 +938,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1170" ], - "x-ms-request-id": [ "ee4a72af-e5a1-4d99-9395-c3377d156e40" ], - "x-ms-correlation-request-id": [ "ee4a72af-e5a1-4d99-9395-c3377d156e40" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143544Z:ee4a72af-e5a1-4d99-9395-c3377d156e40" ], + "x-ms-correlation-request-id": [ "55a4b6a8-1375-46d3-bc35-e239914dfc75" ], + "x-ms-client-request-id": [ "5ae2c775-3b21-4c99-a621-25f62c277541_RP" ], + "x-ms-messaging-activity-id": [ "973b80a0-27d6-4d3e-9c90-10c76b8679fd" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T06:15:15" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "55a4b6a8-1375-46d3-bc35-e239914dfc75" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061515Z:55a4b6a8-1375-46d3-bc35-e239914dfc75" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:44 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DD50A71698874CECA583358BFEC75DCB Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:13Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:14 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1063" ], + "Content-Length": [ "1066" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":15,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":15,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:15:14Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+18": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+18": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "452" ], - "x-ms-client-request-id": [ "e175612d-90ff-4260-853b-cdae587b92a4" ], + "x-ms-unique-id": [ "389" ], + "x-ms-client-request-id": [ "307325fe-7a1d-48bf-92d6-ef18a3ce5c28" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -874,28 +984,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11914" ], - "x-ms-request-id": [ "5e3a392f-1c66-4cc3-bbf1-e6dd7995fc1e" ], - "x-ms-correlation-request-id": [ "5e3a392f-1c66-4cc3-bbf1-e6dd7995fc1e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143545Z:5e3a392f-1c66-4cc3-bbf1-e6dd7995fc1e" ], + "x-ms-correlation-request-id": [ "d9e0f0ee-e76c-425c-ac08-c4862b0d3012" ], + "x-ms-client-request-id": [ "307325fe-7a1d-48bf-92d6-ef18a3ce5c28_RP" ], + "x-ms-messaging-activity-id": [ "808419f0-2fbe-4594-9cb5-729cbe2942e9" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T06:15:15" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "d9e0f0ee-e76c-425c-ac08-c4862b0d3012" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061515Z:d9e0f0ee-e76c-425c-ac08-c4862b0d3012" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:44 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 40F5F92419D340A5AEAEABE138EB8879 Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:15Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:14 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1082" ], + "Content-Length": [ "1084" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":15,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:05.6736777Z\",\"updatedAt\":\"2023-02-19T14:35:44.5325291Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":15,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:07.2920078Z\",\"updatedAt\":\"2024-04-30T06:15:14.9908204Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+19": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+19": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT2M\",\n \"maxSizeInMegabytes\": 2048,\n \"maxMessageSizeInKilobytes\": 102400,\n \"requiresDuplicateDetection\": true,\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnMessageExpiration\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT8M\",\n \"maxDeliveryCount\": 15,\n \"status\": \"Active\",\n \"enableBatchedOperations\": false,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false,\n \"forwardTo\": \"topic1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -910,37 +1025,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1169" ], - "x-ms-request-id": [ "38bc78f8-8466-44fe-927f-bc778392d1d0" ], - "x-ms-correlation-request-id": [ "38bc78f8-8466-44fe-927f-bc778392d1d0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143545Z:38bc78f8-8466-44fe-927f-bc778392d1d0" ], + "x-ms-correlation-request-id": [ "52148684-8e25-4809-8d84-576e290a4324" ], + "x-ms-client-request-id": [ "7da54c57-0825-4306-bbf0-6356117cd91b_RP" ], + "x-ms-messaging-activity-id": [ "13fb7bf2-7e27-4eaf-830b-7148830c4d66" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T06:15:17" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "52148684-8e25-4809-8d84-576e290a4324" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061517Z:52148684-8e25-4809-8d84-576e290a4324" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:45 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6F59B5B049D94E7EBC5866C1E2869C7A Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:15Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:16 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1063" ], + "Content-Length": [ "1066" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":15,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":15,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:15:17Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+20": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+20": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "454" ], - "x-ms-client-request-id": [ "828767b4-3cf0-48f3-b371-c4a117995a8c" ], + "x-ms-unique-id": [ "391" ], + "x-ms-client-request-id": [ "68791506-6000-45de-9a8c-abb0dae70809" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -951,28 +1071,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11913" ], - "x-ms-request-id": [ "77a7583b-251e-47df-842a-0a2914fc4096" ], - "x-ms-correlation-request-id": [ "77a7583b-251e-47df-842a-0a2914fc4096" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143546Z:77a7583b-251e-47df-842a-0a2914fc4096" ], + "x-ms-correlation-request-id": [ "9bec7785-092f-49fc-90f5-79270954a8b7" ], + "x-ms-client-request-id": [ "68791506-6000-45de-9a8c-abb0dae70809_RP" ], + "x-ms-messaging-activity-id": [ "ebd4972f-6c8d-4444-a1e1-35f83730a02c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T06:15:19" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "9bec7785-092f-49fc-90f5-79270954a8b7" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061519Z:9bec7785-092f-49fc-90f5-79270954a8b7" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:45 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A99D2CAE8F134D0C87232639C289F2F2 Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:17Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:18 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1082" ], + "Content-Length": [ "1084" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":15,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:05.6736777Z\",\"updatedAt\":\"2023-02-19T14:35:45.7044169Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":15,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:07.2920078Z\",\"updatedAt\":\"2024-04-30T06:15:17.7096292Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+21": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+21": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT2M\",\n \"maxSizeInMegabytes\": 2048,\n \"maxMessageSizeInKilobytes\": 102400,\n \"requiresDuplicateDetection\": true,\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnMessageExpiration\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT8M\",\n \"maxDeliveryCount\": 15,\n \"status\": \"Active\",\n \"enableBatchedOperations\": false,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false,\n \"forwardTo\": \"topic1\",\n \"forwardDeadLetteredMessagesTo\": \"topic1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -987,37 +1112,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1168" ], - "x-ms-request-id": [ "4cb4f805-4bc0-48fd-81ea-a86e699a2713" ], - "x-ms-correlation-request-id": [ "4cb4f805-4bc0-48fd-81ea-a86e699a2713" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143547Z:4cb4f805-4bc0-48fd-81ea-a86e699a2713" ], + "x-ms-correlation-request-id": [ "5b77e286-6584-4fb1-9a2b-1548147192c7" ], + "x-ms-client-request-id": [ "383f40c3-a514-4219-892e-dbea0553fa58_RP" ], + "x-ms-messaging-activity-id": [ "d0040c4d-47aa-4a19-8102-59d214268973" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T06:15:21" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "5b77e286-6584-4fb1-9a2b-1548147192c7" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061521Z:5b77e286-6584-4fb1-9a2b-1548147192c7" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:46 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3A8C28F43F9B4723A4970432C6992977 Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:19Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:20 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1063" ], + "Content-Length": [ "1066" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":15,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"topic1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":15,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:15:21Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"topic1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+22": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+22": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "456" ], - "x-ms-client-request-id": [ "0e4fa826-522b-4ddf-83f1-e6d19f7fc41f" ], + "x-ms-unique-id": [ "393" ], + "x-ms-client-request-id": [ "68c6ba5d-b018-4d1f-accf-cfd8cbb1d7ca" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1028,28 +1158,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11912" ], - "x-ms-request-id": [ "ec8b6edd-5e42-4703-ac88-72648fbd76f6" ], - "x-ms-correlation-request-id": [ "ec8b6edd-5e42-4703-ac88-72648fbd76f6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143547Z:ec8b6edd-5e42-4703-ac88-72648fbd76f6" ], + "x-ms-correlation-request-id": [ "45066204-e9f1-4c19-a001-7e4d635889cd" ], + "x-ms-client-request-id": [ "68c6ba5d-b018-4d1f-accf-cfd8cbb1d7ca_RP" ], + "x-ms-messaging-activity-id": [ "ad5e6409-66f8-4476-8f87-ee1df22202ec" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T06:15:23" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "45066204-e9f1-4c19-a001-7e4d635889cd" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061523Z:45066204-e9f1-4c19-a001-7e4d635889cd" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:47 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C031FF91294B44CE87C78FB78EA70FFA Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:21Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:22 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1082" ], + "Content-Length": [ "1084" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":15,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:05.6736777Z\",\"updatedAt\":\"2023-02-19T14:35:46.8927724Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"topic1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":15,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:07.2920078Z\",\"updatedAt\":\"2024-04-30T06:15:21.4597198Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"topic1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview+23": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview+23": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT2M\",\n \"maxSizeInMegabytes\": 2048,\n \"maxMessageSizeInKilobytes\": 102400,\n \"requiresDuplicateDetection\": true,\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnMessageExpiration\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT8M\",\n \"maxDeliveryCount\": 15,\n \"status\": \"SendDisabled\",\n \"enableBatchedOperations\": false,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false,\n \"forwardTo\": \"topic1\",\n \"forwardDeadLetteredMessagesTo\": \"topic1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -1064,37 +1199,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1167" ], - "x-ms-request-id": [ "cc6d2d28-a6b3-4c5b-b796-0a6a9585649a" ], - "x-ms-correlation-request-id": [ "cc6d2d28-a6b3-4c5b-b796-0a6a9585649a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143548Z:cc6d2d28-a6b3-4c5b-b796-0a6a9585649a" ], + "x-ms-correlation-request-id": [ "5c01e87a-d0b1-4ea2-b257-9f7f00194aed" ], + "x-ms-client-request-id": [ "ee5da8cc-2172-4f79-a4b1-4de36d81eb44_RP" ], + "x-ms-messaging-activity-id": [ "4cb8e61a-d11a-4461-864d-4b3af5689b42" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T06:15:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "5c01e87a-d0b1-4ea2-b257-9f7f00194aed" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061525Z:5c01e87a-d0b1-4ea2-b257-9f7f00194aed" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:47 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A49AD67420F142BBBA707C6FB1C41222 Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:23Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:24 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1069" ], + "Content-Length": [ "1072" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":15,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"SendDisabled\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"topic1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/queues/queue2\",\"name\":\"queue2\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":102400,\"lockDuration\":\"PT2M\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT8M\",\"maxDeliveryCount\":15,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"SendDisabled\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:15:25Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"topic1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1?api-version=2022-10-01-preview+24": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1?api-version=2022-10-01-preview+24": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "458" ], - "x-ms-client-request-id": [ "da9e8228-d646-469b-aaa9-f5be265ed640" ], + "x-ms-unique-id": [ "395" ], + "x-ms-client-request-id": [ "cf368c85-3773-499b-be7f-f7d3186fabe7" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1105,37 +1245,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11911" ], - "x-ms-request-id": [ "b349773f-2d65-4442-a716-5650b65e2cb1" ], - "x-ms-correlation-request-id": [ "b349773f-2d65-4442-a716-5650b65e2cb1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143548Z:b349773f-2d65-4442-a716-5650b65e2cb1" ], + "x-ms-correlation-request-id": [ "de38ab9b-b837-4dd0-87a6-fe0acaabd5e3" ], + "x-ms-client-request-id": [ "cf368c85-3773-499b-be7f-f7d3186fabe7_RP" ], + "x-ms-messaging-activity-id": [ "aece1c4c-6bd5-4ff2-a850-0c1b7bd973ed" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-30T06:15:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "de38ab9b-b837-4dd0-87a6-fe0acaabd5e3" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061525Z:de38ab9b-b837-4dd0-87a6-fe0acaabd5e3" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:48 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E33012502FC8458BA0365E1275A6D38C Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:25Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:24 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1035" ], + "Content-Length": [ "1037" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:11.4383939Z\",\"updatedAt\":\"2023-02-19T13:47:11.4383939Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:17.0956473Z\",\"updatedAt\":\"2024-04-30T05:31:17.0956473Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1?api-version=2022-10-01-preview+25": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1?api-version=2022-10-01-preview+25": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "459" ], - "x-ms-client-request-id": [ "69cc740d-bddd-477a-a9ac-804d584558d0" ], + "x-ms-unique-id": [ "396" ], + "x-ms-client-request-id": [ "57bca75a-272b-4272-9688-2b63014940d7" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1146,28 +1291,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11910" ], - "x-ms-request-id": [ "0a25013e-4260-4f4c-9d7a-daa44d5ba677" ], - "x-ms-correlation-request-id": [ "0a25013e-4260-4f4c-9d7a-daa44d5ba677" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143549Z:0a25013e-4260-4f4c-9d7a-daa44d5ba677" ], + "x-ms-correlation-request-id": [ "45db6639-4c17-4ee7-9a12-76fd65fda500" ], + "x-ms-client-request-id": [ "57bca75a-272b-4272-9688-2b63014940d7_RP" ], + "x-ms-messaging-activity-id": [ "4c8dd8bb-0128-418b-b267-db8f3bae44e1" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:15:27" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "45db6639-4c17-4ee7-9a12-76fd65fda500" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061527Z:45db6639-4c17-4ee7-9a12-76fd65fda500" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:48 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1435051564AC44E0B28ECFCD62427D0C Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:25Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:26 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1035" ], + "Content-Length": [ "1037" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:11.4383939Z\",\"updatedAt\":\"2023-02-19T13:47:11.4383939Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:17.0956473Z\",\"updatedAt\":\"2024-04-30T05:31:17.0956473Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1?api-version=2022-10-01-preview+26": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1?api-version=2022-10-01-preview+26": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT1M\",\n \"maxSizeInMegabytes\": 1024,\n \"maxMessageSizeInKilobytes\": 256,\n \"requiresDuplicateDetection\": false,\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P10675199DT2H48M5.4775807S\",\n \"deadLetteringOnMessageExpiration\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"maxDeliveryCount\": 10,\n \"status\": \"Active\",\n \"enableBatchedOperations\": true,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -1182,37 +1332,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1166" ], - "x-ms-request-id": [ "63e20f71-d4a7-4368-8107-6118e2c21f42" ], - "x-ms-correlation-request-id": [ "63e20f71-d4a7-4368-8107-6118e2c21f42" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143550Z:63e20f71-d4a7-4368-8107-6118e2c21f42" ], + "x-ms-correlation-request-id": [ "bcc756a5-60bb-4558-9283-12b42e942972" ], + "x-ms-client-request-id": [ "d70e0f26-5df1-4c42-ae74-e49303a276fa_RP" ], + "x-ms-messaging-activity-id": [ "9dd76ef5-1da8-4421-98aa-8cbe188ffaae" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:15:29" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "bcc756a5-60bb-4558-9283-12b42e942972" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061529Z:bcc756a5-60bb-4558-9283-12b42e942972" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:49 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B5E2F1AF1DFB4BE99A937AE3245406DB Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:27Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:28 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1017" ], + "Content-Length": [ "1020" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:15:29Z\",\"accessedAt\":\"0001-01-01T00:00:00\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1?api-version=2022-10-01-preview+27": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1?api-version=2022-10-01-preview+27": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "461" ], - "x-ms-client-request-id": [ "99cdf074-cd96-49e3-a30d-f81fc2e09c84" ], + "x-ms-unique-id": [ "398" ], + "x-ms-client-request-id": [ "62c82b81-e467-48a5-bacf-9acc48e02ebe" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1223,28 +1378,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11909" ], - "x-ms-request-id": [ "6ea2c29a-61e3-4c17-b3a4-6d6a0320bce5" ], - "x-ms-correlation-request-id": [ "6ea2c29a-61e3-4c17-b3a4-6d6a0320bce5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143550Z:6ea2c29a-61e3-4c17-b3a4-6d6a0320bce5" ], + "x-ms-correlation-request-id": [ "7b4b96fb-3ff4-428e-9f2f-fe0a0995c280" ], + "x-ms-client-request-id": [ "62c82b81-e467-48a5-bacf-9acc48e02ebe_RP" ], + "x-ms-messaging-activity-id": [ "1e021325-d13c-464d-b57b-c2b5961509ea" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T06:15:31" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "7b4b96fb-3ff4-428e-9f2f-fe0a0995c280" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061531Z:7b4b96fb-3ff4-428e-9f2f-fe0a0995c280" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:50 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E50265F85A1B42BE8568E0D176BBCD59 Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:29Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:30 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1036" ], + "Content-Length": [ "1038" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:11.4383939Z\",\"updatedAt\":\"2023-02-19T14:35:49.9314372Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:17.0956473Z\",\"updatedAt\":\"2024-04-30T06:15:29.3435011Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1?api-version=2022-10-01-preview+28": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1?api-version=2022-10-01-preview+28": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT1M\",\n \"maxSizeInMegabytes\": 1024,\n \"maxMessageSizeInKilobytes\": 256,\n \"requiresDuplicateDetection\": false,\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P10675199DT2H48M5.4775807S\",\n \"deadLetteringOnMessageExpiration\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"maxDeliveryCount\": 10,\n \"status\": \"Active\",\n \"enableBatchedOperations\": true,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": true\n }\n}", "isContentBase64": false, "Headers": { @@ -1259,37 +1419,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1165" ], - "x-ms-request-id": [ "9f6ef5b9-6946-4230-86e3-6ce0912a0c77" ], - "x-ms-correlation-request-id": [ "9f6ef5b9-6946-4230-86e3-6ce0912a0c77" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143551Z:9f6ef5b9-6946-4230-86e3-6ce0912a0c77" ], + "x-ms-correlation-request-id": [ "a8f649f1-f931-4f1e-9717-24429150336c" ], + "x-ms-client-request-id": [ "3c4cfb30-1d60-4d07-96d6-2d586af20769_RP" ], + "x-ms-messaging-activity-id": [ "f71af934-4be7-4323-94b9-7fa20c7604d4" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T06:15:31" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "a8f649f1-f931-4f1e-9717-24429150336c" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061531Z:a8f649f1-f931-4f1e-9717-24429150336c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:50 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: AA5E174E573943CA84BAA1744356BEA3 Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:31Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:31 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1016" ], + "Content-Length": [ "1019" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:15:31Z\",\"accessedAt\":\"0001-01-01T00:00:00\"}}", "isContentBase64": false } }, - "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1?api-version=2022-10-01-preview+29": { + "Set-AzServiceBusQueue+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1?api-version=2022-10-01-preview+29": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "463" ], - "x-ms-client-request-id": [ "92a51764-1b03-4d53-8806-ccd8ba2d2aac" ], + "x-ms-unique-id": [ "400" ], + "x-ms-client-request-id": [ "e0f2c1b7-0ec2-4c3a-b6ef-944917921614" ], "CommandName": [ "Get-AzServiceBusQueue" ], "FullCommandName": [ "Get-AzServiceBusQueue_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1300,21 +1465,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11908" ], - "x-ms-request-id": [ "0a183c44-5ae1-4cff-be6e-5ac87b05a262" ], - "x-ms-correlation-request-id": [ "0a183c44-5ae1-4cff-be6e-5ac87b05a262" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143552Z:0a183c44-5ae1-4cff-be6e-5ac87b05a262" ], + "x-ms-correlation-request-id": [ "dc17a48b-d8ae-45b7-972c-50c94c644967" ], + "x-ms-client-request-id": [ "e0f2c1b7-0ec2-4c3a-b6ef-944917921614_RP" ], + "x-ms-messaging-activity-id": [ "c6c54542-ad86-43b5-bbb3-f08435d18d4d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T06:15:33" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "dc17a48b-d8ae-45b7-972c-50c94c644967" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061533Z:dc17a48b-d8ae-45b7-972c-50c94c644967" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:35:51 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1A3C42E5FB02469CAE8F70B657DE2C49 Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:32Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:32 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1035" ], + "Content-Length": [ "1037" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2023-02-19T13:47:11.4383939Z\",\"updatedAt\":\"2023-02-19T14:35:51.3064671Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/queues/queue1\",\"name\":\"queue1\",\"type\":\"Microsoft.ServiceBus/namespaces/queues\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"lockDuration\":\"PT1M\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"enableBatchedOperations\":true,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"maxDeliveryCount\":10,\"sizeInBytes\":0,\"messageCount\":0,\"status\":\"Active\",\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"createdAt\":\"2024-04-30T05:31:17.0956473Z\",\"updatedAt\":\"2024-04-30T06:15:31.7966641Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\"}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusQueue.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusQueue.Tests.ps1 index 977a0ea90ff2..7e28fbbc862c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusQueue.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusQueue.Tests.ps1 @@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzServiceBusQueue')) } function AssertQueueUpdates{ - param([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue]$expectedQueue,[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue]$actualQueue) + param([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue]$expectedQueue,[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue]$actualQueue) $expectedQueue.Name | Should -Be $actualQueue.Name $expectedQueue.ResourceGroupName | Should -Be $actualQueue.ResourceGroupName $expectedQueue.MaxSizeInMegabytes | Should -Be $actualQueue.MaxSizeInMegabytes @@ -119,6 +119,6 @@ Describe 'Set-AzServiceBusQueue' { AssertQueueUpdates $currentQueue $updatedQueue $currentQueue = $updatedQueue - { Set-AzServiceBusQueue -InputObject $currentQueue } | Should -Throw 'Please specify the property you want to update on the -InputObject' + { Set-AzServiceBusQueue -InputObject $currentQueue -ErrorAction Stop } | Should -Throw 'Please specify the property you want to update on the -InputObject' } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusRule.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusRule.Recording.json index f93ec88834db..42480edcdd30 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusRule.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusRule.Recording.json @@ -1,17 +1,17 @@ { - "Set-AzServiceBusRule+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRule2?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusRule+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRule2?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRule2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRule2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "464" ], - "x-ms-client-request-id": [ "8f636739-ebfb-404e-a75b-ab735e9718fd" ], + "x-ms-unique-id": [ "401" ], + "x-ms-client-request-id": [ "b036d4a1-964c-400c-b94b-35ac3931d5f8" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,28 +22,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11907" ], - "x-ms-request-id": [ "41a8bc45-62dc-4038-8bdb-c025f95b7bad" ], - "x-ms-correlation-request-id": [ "41a8bc45-62dc-4038-8bdb-c025f95b7bad" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143606Z:41a8bc45-62dc-4038-8bdb-c025f95b7bad" ], + "x-ms-correlation-request-id": [ "71796a3f-045f-48fd-8cdf-490777a3adb8" ], + "x-ms-client-request-id": [ "b036d4a1-964c-400c-b94b-35ac3931d5f8_RP" ], + "x-ms-messaging-activity-id": [ "035f61ba-78b6-454e-aceb-5919dedcb9ac" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:15:48" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "71796a3f-045f-48fd-8cdf-490777a3adb8" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061548Z:71796a3f-045f-48fd-8cdf-490777a3adb8" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:06 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4A4B8BA33D87474E9B2ADB7CEDF3977B Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:47Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "521" ], + "Content-Length": [ "523" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRule2\",\"name\":\"sqlRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{\"sqlExpression\":\"SET a=b\",\"compatibilityLevel\":20,\"parameters\":{}},\"filterType\":\"SqlFilter\",\"sqlFilter\":{\"sqlExpression\":\"1=2\",\"compatibilityLevel\":20,\"parameters\":{}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRule2\",\"name\":\"sqlRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{\"sqlExpression\":\"SET a=b\",\"compatibilityLevel\":20,\"parameters\":{}},\"filterType\":\"SqlFilter\",\"sqlFilter\":{\"sqlExpression\":\"1=2\",\"compatibilityLevel\":20,\"parameters\":{}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRule2?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusRule+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRule2?api-version=2022-10-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRule2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRule2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"action\": {\n \"sqlExpression\": \"SET a=b\",\n \"compatibilityLevel\": 20\n },\n \"sqlFilter\": {\n \"sqlExpression\": \"x=y\",\n \"compatibilityLevel\": 20\n },\n \"filterType\": \"SqlFilter\"\n }\n}", "isContentBase64": false, "Headers": { @@ -58,37 +63,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1164" ], - "x-ms-request-id": [ "2775dbc5-51e2-49d7-9eac-6c95400d0528" ], - "x-ms-correlation-request-id": [ "2775dbc5-51e2-49d7-9eac-6c95400d0528" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143608Z:2775dbc5-51e2-49d7-9eac-6c95400d0528" ], + "x-ms-correlation-request-id": [ "10105710-f5ca-45d5-93f4-78ad0e4dd9a0" ], + "x-ms-client-request-id": [ "456378fe-04bd-442b-999d-1e61982bb5b3_RP" ], + "x-ms-messaging-activity-id": [ "578b8b3d-0a70-4841-baa0-7f2f01870f17" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T06:15:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "10105710-f5ca-45d5-93f4-78ad0e4dd9a0" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061552Z:10105710-f5ca-45d5-93f4-78ad0e4dd9a0" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:07 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 96BEB22FB42C4F2998A08F1CB67370FA Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:48Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:51 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "489" ], + "Content-Length": [ "491" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/sqlRule2\",\"name\":\"sqlRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{\"sqlExpression\":\"SET a=b\",\"compatibilityLevel\":20},\"filterType\":\"SqlFilter\",\"sqlFilter\":{\"sqlExpression\":\"x=y\",\"compatibilityLevel\":20}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/sqlRule2\",\"name\":\"sqlRule2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{\"sqlExpression\":\"SET a=b\",\"compatibilityLevel\":20},\"filterType\":\"SqlFilter\",\"sqlFilter\":{\"sqlExpression\":\"x=y\",\"compatibilityLevel\":20}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "466" ], - "x-ms-client-request-id": [ "a351933b-41b1-4172-aba0-a4a2a9ee0ffd" ], + "x-ms-unique-id": [ "403" ], + "x-ms-client-request-id": [ "4c154b1e-fd9e-40b0-aa75-a4a8c2b10c1a" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -99,37 +109,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11906" ], - "x-ms-request-id": [ "e8d93f78-3260-4f6d-80b4-4b7cd3c10914" ], - "x-ms-correlation-request-id": [ "e8d93f78-3260-4f6d-80b4-4b7cd3c10914" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143608Z:e8d93f78-3260-4f6d-80b4-4b7cd3c10914" ], + "x-ms-correlation-request-id": [ "6c702c24-56e5-473f-a3f7-30e1b255cf5e" ], + "x-ms-client-request-id": [ "4c154b1e-fd9e-40b0-aa75-a4a8c2b10c1a_RP" ], + "x-ms-messaging-activity-id": [ "0174783e-f5d8-4e11-b41e-f5d852b21010" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T06:15:53" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-request-id": [ "6c702c24-56e5-473f-a3f7-30e1b255cf5e" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061553Z:6c702c24-56e5-473f-a3f7-30e1b255cf5e" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:08 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5C4B96A482044CC09A7C28E6DCFA55D7 Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:52Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:52 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "639" ], + "Content-Length": [ "641" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"correlationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"label\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"contenttype\",\"properties\":{\"c\":\"d\",\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"correlationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"label\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"contenttype\",\"properties\":{\"a\":\"b\",\"c\":\"d\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "467" ], - "x-ms-client-request-id": [ "0e398963-bdbe-4051-a49a-6dce4513d48f" ], + "x-ms-unique-id": [ "404" ], + "x-ms-client-request-id": [ "6d551b37-b5b2-4947-9805-ed5de0acb9ed" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -140,29 +155,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11905" ], - "x-ms-request-id": [ "3086b699-ff0e-477d-8a8e-b95a72ef094b" ], - "x-ms-correlation-request-id": [ "3086b699-ff0e-477d-8a8e-b95a72ef094b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143609Z:3086b699-ff0e-477d-8a8e-b95a72ef094b" ], + "x-ms-correlation-request-id": [ "77271b74-e317-4334-9df1-d76b12b3800d" ], + "x-ms-client-request-id": [ "6d551b37-b5b2-4947-9805-ed5de0acb9ed_RP" ], + "x-ms-messaging-activity-id": [ "a270bbb5-ef7c-4488-9fc1-6c1ed06c6407" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:15:55" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "77271b74-e317-4334-9df1-d76b12b3800d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061555Z:77271b74-e317-4334-9df1-d76b12b3800d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:09 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DBBECBDB688D4912BB00403B321AFBE5 Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:53Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:54 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "639" ], + "Content-Length": [ "641" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"correlationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"label\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"contenttype\",\"properties\":{\"c\":\"d\",\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"correlationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"label\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"contenttype\",\"properties\":{\"a\":\"b\",\"c\":\"d\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+3": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+3": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"correlationFilter\": {\n \"properties\": {\n \"c\": \"d\",\n \"a\": \"b\"\n },\n \"correlationId\": \"correlationid\",\n \"messageId\": \"messageid\",\n \"replyTo\": \"replyto\",\n \"label\": \"label\",\n \"sessionId\": \"sessionid\",\n \"replyToSessionId\": \"replytosessionid\",\n \"contentType\": \"secondcontenttype\"\n },\n \"filterType\": \"CorrelationFilter\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"correlationFilter\": {\n \"properties\": {\n \"a\": \"b\",\n \"c\": \"d\"\n },\n \"correlationId\": \"correlationid\",\n \"messageId\": \"messageid\",\n \"replyTo\": \"replyto\",\n \"label\": \"label\",\n \"sessionId\": \"sessionid\",\n \"replyToSessionId\": \"replytosessionid\",\n \"contentType\": \"secondcontenttype\"\n },\n \"filterType\": \"CorrelationFilter\"\n }\n}", "isContentBase64": false, "Headers": { }, @@ -176,37 +196,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1163" ], - "x-ms-request-id": [ "07c9c510-d16c-4f91-aa94-c1f1b6a648b6" ], - "x-ms-correlation-request-id": [ "07c9c510-d16c-4f91-aa94-c1f1b6a648b6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143610Z:07c9c510-d16c-4f91-aa94-c1f1b6a648b6" ], + "x-ms-correlation-request-id": [ "02ff78f9-1d54-4a16-9497-cf3c5e9f8c8b" ], + "x-ms-client-request-id": [ "98fbf5f9-d52f-4cee-9a77-9ab81ee1b16e_RP" ], + "x-ms-messaging-activity-id": [ "4fc774ff-60bb-4445-945b-cf410b7c732b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T06:15:57" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "02ff78f9-1d54-4a16-9497-cf3c5e9f8c8b" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061557Z:02ff78f9-1d54-4a16-9497-cf3c5e9f8c8b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:10 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9EC28AD772F84107AC448E51C07B758D Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:55Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:56 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "645" ], + "Content-Length": [ "647" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"correlationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"label\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"c\":\"d\",\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"correlationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"label\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\",\"c\":\"d\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+4": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "469" ], - "x-ms-client-request-id": [ "13fb585a-c604-442a-8c64-df3455bdbf87" ], + "x-ms-unique-id": [ "406" ], + "x-ms-client-request-id": [ "1c63ddb4-c7af-403f-9a41-3bdf22d82c42" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -217,29 +242,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11904" ], - "x-ms-request-id": [ "dffc50cf-53f0-4429-91dc-d2bedd638948" ], - "x-ms-correlation-request-id": [ "dffc50cf-53f0-4429-91dc-d2bedd638948" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143611Z:dffc50cf-53f0-4429-91dc-d2bedd638948" ], + "x-ms-correlation-request-id": [ "6f0d4e9e-03ba-4393-b7bc-022a7fa4a751" ], + "x-ms-client-request-id": [ "1c63ddb4-c7af-403f-9a41-3bdf22d82c42_RP" ], + "x-ms-messaging-activity-id": [ "aaa95a2f-c8c3-473c-af16-4565fbd0763a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:15:58" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-request-id": [ "6f0d4e9e-03ba-4393-b7bc-022a7fa4a751" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061558Z:6f0d4e9e-03ba-4393-b7bc-022a7fa4a751" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:11 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EE4261B654564C42A325B8BF4EAB0634 Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:57Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:57 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "645" ], + "Content-Length": [ "647" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"correlationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"label\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"c\":\"d\",\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"correlationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"label\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\",\"c\":\"d\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+5": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+5": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"correlationFilter\": {\n \"properties\": {\n \"c\": \"d\",\n \"a\": \"b\"\n },\n \"correlationId\": \"secondcorrelationid\",\n \"messageId\": \"messageid\",\n \"replyTo\": \"replyto\",\n \"label\": \"label\",\n \"sessionId\": \"sessionid\",\n \"replyToSessionId\": \"replytosessionid\",\n \"contentType\": \"secondcontenttype\"\n },\n \"filterType\": \"CorrelationFilter\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"correlationFilter\": {\n \"properties\": {\n \"a\": \"b\",\n \"c\": \"d\"\n },\n \"correlationId\": \"secondcorrelationid\",\n \"messageId\": \"messageid\",\n \"replyTo\": \"replyto\",\n \"label\": \"label\",\n \"sessionId\": \"sessionid\",\n \"replyToSessionId\": \"replytosessionid\",\n \"contentType\": \"secondcontenttype\"\n },\n \"filterType\": \"CorrelationFilter\"\n }\n}", "isContentBase64": false, "Headers": { }, @@ -253,37 +283,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1162" ], - "x-ms-request-id": [ "22dd648e-2b73-420e-90dc-2af4352758ec" ], - "x-ms-correlation-request-id": [ "22dd648e-2b73-420e-90dc-2af4352758ec" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143613Z:22dd648e-2b73-420e-90dc-2af4352758ec" ], + "x-ms-correlation-request-id": [ "a7cf6a98-fac2-4d82-b79f-8945e888fcd0" ], + "x-ms-client-request-id": [ "d757b32d-acd4-4309-ae3a-f9e6737a0049_RP" ], + "x-ms-messaging-activity-id": [ "af61a8d2-9300-4903-87ad-615d1b1bce7a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:16:00" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-request-id": [ "a7cf6a98-fac2-4d82-b79f-8945e888fcd0" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061600Z:a7cf6a98-fac2-4d82-b79f-8945e888fcd0" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:12 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A70A941C0A3C488B833987B02FA43972 Ref B: SEL221051503025 Ref C: 2024-04-30T06:15:58Z" ], + "Date": [ "Tue, 30 Apr 2024 06:15:59 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "651" ], + "Content-Length": [ "653" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"label\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"c\":\"d\",\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"label\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\",\"c\":\"d\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+6": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "471" ], - "x-ms-client-request-id": [ "45d1ab8a-50af-4d90-936a-a678388828bb" ], + "x-ms-unique-id": [ "408" ], + "x-ms-client-request-id": [ "9854ba32-97a9-4e25-8942-d56048a7dccb" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -294,29 +329,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11903" ], - "x-ms-request-id": [ "563bcf78-5477-4967-b989-47f4faf5c748" ], - "x-ms-correlation-request-id": [ "563bcf78-5477-4967-b989-47f4faf5c748" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143613Z:563bcf78-5477-4967-b989-47f4faf5c748" ], + "x-ms-correlation-request-id": [ "d2616d81-69d7-40f0-9b28-146fdba52ee9" ], + "x-ms-client-request-id": [ "9854ba32-97a9-4e25-8942-d56048a7dccb_RP" ], + "x-ms-messaging-activity-id": [ "af0bf03f-bd1e-45e6-93d4-2d55dc5dd74d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:16:02" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "d2616d81-69d7-40f0-9b28-146fdba52ee9" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061602Z:d2616d81-69d7-40f0-9b28-146fdba52ee9" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:13 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6DC4F2E0E68C4A56A9AD819E7986FFC2 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:00Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:01 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "651" ], + "Content-Length": [ "653" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"label\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"c\":\"d\",\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"label\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\",\"c\":\"d\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+7": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+7": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"correlationFilter\": {\n \"properties\": {\n \"c\": \"d\",\n \"a\": \"b\"\n },\n \"correlationId\": \"secondcorrelationid\",\n \"messageId\": \"messageid\",\n \"replyTo\": \"replyto\",\n \"label\": \"secondlabel\",\n \"sessionId\": \"sessionid\",\n \"replyToSessionId\": \"replytosessionid\",\n \"contentType\": \"secondcontenttype\"\n },\n \"filterType\": \"CorrelationFilter\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"correlationFilter\": {\n \"properties\": {\n \"a\": \"b\",\n \"c\": \"d\"\n },\n \"correlationId\": \"secondcorrelationid\",\n \"messageId\": \"messageid\",\n \"replyTo\": \"replyto\",\n \"label\": \"secondlabel\",\n \"sessionId\": \"sessionid\",\n \"replyToSessionId\": \"replytosessionid\",\n \"contentType\": \"secondcontenttype\"\n },\n \"filterType\": \"CorrelationFilter\"\n }\n}", "isContentBase64": false, "Headers": { }, @@ -330,37 +370,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1161" ], - "x-ms-request-id": [ "263037cd-051d-42c6-a8b7-081c64350b17" ], - "x-ms-correlation-request-id": [ "263037cd-051d-42c6-a8b7-081c64350b17" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143615Z:263037cd-051d-42c6-a8b7-081c64350b17" ], + "x-ms-correlation-request-id": [ "f0f9c12a-b3e2-4898-925a-dd3132f826e9" ], + "x-ms-client-request-id": [ "3f5b5ee1-9273-4967-8a57-da86d75f4dff_RP" ], + "x-ms-messaging-activity-id": [ "68749fae-d4d0-4970-b40e-054f294ce898" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T06:16:03" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "f0f9c12a-b3e2-4898-925a-dd3132f826e9" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061604Z:f0f9c12a-b3e2-4898-925a-dd3132f826e9" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:14 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 408C86C2770F4AEAA4E834E4FEFD33C0 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:02Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:03 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "657" ], + "Content-Length": [ "659" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"c\":\"d\",\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\",\"c\":\"d\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+8": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "473" ], - "x-ms-client-request-id": [ "b6484586-55f6-417b-a10b-246471eaaac2" ], + "x-ms-unique-id": [ "410" ], + "x-ms-client-request-id": [ "9c723c02-dc2a-4f38-9b27-156ee912147a" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -371,29 +416,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11902" ], - "x-ms-request-id": [ "f182e7d7-e01c-468b-bd54-62163acc2d2a" ], - "x-ms-correlation-request-id": [ "f182e7d7-e01c-468b-bd54-62163acc2d2a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143615Z:f182e7d7-e01c-468b-bd54-62163acc2d2a" ], + "x-ms-correlation-request-id": [ "03e22329-28a9-450a-aa73-9a194d323663" ], + "x-ms-client-request-id": [ "9c723c02-dc2a-4f38-9b27-156ee912147a_RP" ], + "x-ms-messaging-activity-id": [ "c2613d7c-1b53-4460-b183-ec22e805cd49" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T06:16:05" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "03e22329-28a9-450a-aa73-9a194d323663" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061605Z:03e22329-28a9-450a-aa73-9a194d323663" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:15 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D12935896EBD468EA89D03E6D2C6E16B Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:04Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "657" ], + "Content-Length": [ "659" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"c\":\"d\",\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"messageid\",\"replyTo\":\"replyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\",\"c\":\"d\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+9": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+9": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"correlationFilter\": {\n \"properties\": {\n \"c\": \"d\",\n \"a\": \"b\"\n },\n \"correlationId\": \"secondcorrelationid\",\n \"messageId\": \"secondmessageid\",\n \"replyTo\": \"replyto\",\n \"label\": \"secondlabel\",\n \"sessionId\": \"sessionid\",\n \"replyToSessionId\": \"replytosessionid\",\n \"contentType\": \"secondcontenttype\"\n },\n \"filterType\": \"CorrelationFilter\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"correlationFilter\": {\n \"properties\": {\n \"a\": \"b\",\n \"c\": \"d\"\n },\n \"correlationId\": \"secondcorrelationid\",\n \"messageId\": \"secondmessageid\",\n \"replyTo\": \"replyto\",\n \"label\": \"secondlabel\",\n \"sessionId\": \"sessionid\",\n \"replyToSessionId\": \"replytosessionid\",\n \"contentType\": \"secondcontenttype\"\n },\n \"filterType\": \"CorrelationFilter\"\n }\n}", "isContentBase64": false, "Headers": { }, @@ -407,37 +457,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1160" ], - "x-ms-request-id": [ "6de768a4-f6b2-42ca-8cbb-81c7f047c413" ], - "x-ms-correlation-request-id": [ "6de768a4-f6b2-42ca-8cbb-81c7f047c413" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143617Z:6de768a4-f6b2-42ca-8cbb-81c7f047c413" ], + "x-ms-correlation-request-id": [ "7697d487-a803-466c-843d-19a444a25a28" ], + "x-ms-client-request-id": [ "113403ea-79be-4b7d-bdf4-b601ce7f2639_RP" ], + "x-ms-messaging-activity-id": [ "d691a5a8-76eb-4bbe-a745-6c073116641a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:16:08" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "7697d487-a803-466c-843d-19a444a25a28" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061608Z:7697d487-a803-466c-843d-19a444a25a28" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:17 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 954EF623023C409C836474B1AF775AF8 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:05Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:07 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "663" ], + "Content-Length": [ "665" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"replyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"c\":\"d\",\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"replyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\",\"c\":\"d\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+10": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "475" ], - "x-ms-client-request-id": [ "cacd7c8b-2d12-4f84-bb50-d13ac4198579" ], + "x-ms-unique-id": [ "412" ], + "x-ms-client-request-id": [ "aaabc726-bdb1-4e38-8fa7-d86c8c5ebe3e" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -448,28 +503,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11901" ], - "x-ms-request-id": [ "37ba1e78-d03d-4c4f-8add-0261d3cfee80" ], - "x-ms-correlation-request-id": [ "37ba1e78-d03d-4c4f-8add-0261d3cfee80" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143618Z:37ba1e78-d03d-4c4f-8add-0261d3cfee80" ], + "x-ms-correlation-request-id": [ "95a92d5a-730c-4329-9e26-d79c122a1810" ], + "x-ms-client-request-id": [ "aaabc726-bdb1-4e38-8fa7-d86c8c5ebe3e_RP" ], + "x-ms-messaging-activity-id": [ "9e52fb46-2b61-4aae-ab3d-c59a52f5592a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:16:09" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-request-id": [ "95a92d5a-730c-4329-9e26-d79c122a1810" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061609Z:95a92d5a-730c-4329-9e26-d79c122a1810" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:17 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 853719ADDC684068B590756690BC9F97 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:08Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:09 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "663" ], + "Content-Length": [ "665" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"replyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"c\":\"d\",\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"replyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\",\"c\":\"d\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+11": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+11": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"correlationFilter\": {\n \"properties\": {\n \"a\": \"b\"\n },\n \"correlationId\": \"secondcorrelationid\",\n \"messageId\": \"secondmessageid\",\n \"replyTo\": \"replyto\",\n \"label\": \"secondlabel\",\n \"sessionId\": \"sessionid\",\n \"replyToSessionId\": \"replytosessionid\",\n \"contentType\": \"secondcontenttype\"\n },\n \"filterType\": \"CorrelationFilter\"\n }\n}", "isContentBase64": false, "Headers": { @@ -484,37 +544,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1159" ], - "x-ms-request-id": [ "28d6bf76-d558-40f7-b570-36f5a841c3d5" ], - "x-ms-correlation-request-id": [ "28d6bf76-d558-40f7-b570-36f5a841c3d5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143619Z:28d6bf76-d558-40f7-b570-36f5a841c3d5" ], + "x-ms-correlation-request-id": [ "214b674a-ce39-42b0-ae8f-13a9a098d2c7" ], + "x-ms-client-request-id": [ "b7dd16e4-9f94-4fe7-864b-201abe40fc66_RP" ], + "x-ms-messaging-activity-id": [ "b3958cd9-10cc-4c8b-b66c-762a9b7a3a6d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T06:16:11" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-request-id": [ "214b674a-ce39-42b0-ae8f-13a9a098d2c7" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061611Z:214b674a-ce39-42b0-ae8f-13a9a098d2c7" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:19 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FBF380110921468F879056F9A05814EF Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:09Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:10 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "655" ], + "Content-Length": [ "657" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"replyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"replyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+12": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+12": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "477" ], - "x-ms-client-request-id": [ "7a24cd23-aeb6-444b-be5a-8e44685f6464" ], + "x-ms-unique-id": [ "414" ], + "x-ms-client-request-id": [ "6a72317e-a247-45e4-b2fb-fc082ef4c2c1" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -525,28 +590,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11900" ], - "x-ms-request-id": [ "a4ab8702-2f4a-4116-ae11-cad09450ee00" ], - "x-ms-correlation-request-id": [ "a4ab8702-2f4a-4116-ae11-cad09450ee00" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143620Z:a4ab8702-2f4a-4116-ae11-cad09450ee00" ], + "x-ms-correlation-request-id": [ "fb8781d7-880c-412b-8cc4-0afffa99fbf2" ], + "x-ms-client-request-id": [ "6a72317e-a247-45e4-b2fb-fc082ef4c2c1_RP" ], + "x-ms-messaging-activity-id": [ "ebf36a4d-0a68-4853-9a4a-26ab0c10745c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:16:11" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-request-id": [ "fb8781d7-880c-412b-8cc4-0afffa99fbf2" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061612Z:fb8781d7-880c-412b-8cc4-0afffa99fbf2" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:20 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 540322C53277493EA40230597C57DCE9 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:11Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "655" ], + "Content-Length": [ "657" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"replyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"replyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+13": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+13": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"correlationFilter\": {\n \"properties\": {\n \"a\": \"b\"\n },\n \"correlationId\": \"secondcorrelationid\",\n \"messageId\": \"secondmessageid\",\n \"replyTo\": \"secondreplyto\",\n \"label\": \"secondlabel\",\n \"sessionId\": \"sessionid\",\n \"replyToSessionId\": \"replytosessionid\",\n \"contentType\": \"secondcontenttype\"\n },\n \"filterType\": \"CorrelationFilter\"\n }\n}", "isContentBase64": false, "Headers": { @@ -561,37 +631,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1158" ], - "x-ms-request-id": [ "635e6a72-f1d2-4d63-84de-ad358be47749" ], - "x-ms-correlation-request-id": [ "635e6a72-f1d2-4d63-84de-ad358be47749" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143621Z:635e6a72-f1d2-4d63-84de-ad358be47749" ], + "x-ms-correlation-request-id": [ "cfd0b2aa-e5fa-4429-8aad-926b705d778d" ], + "x-ms-client-request-id": [ "5c549b7d-737d-48fe-9cfc-bbab0f14c3b0_RP" ], + "x-ms-messaging-activity-id": [ "b155d3b4-1c88-4875-bd1f-5f306a260a83" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T06:16:14" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "cfd0b2aa-e5fa-4429-8aad-926b705d778d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061615Z:cfd0b2aa-e5fa-4429-8aad-926b705d778d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:21 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BD9DD6D7DAE44D3A8CA828070544FB3F Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:12Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:14 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "661" ], + "Content-Length": [ "663" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"secondreplyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"secondreplyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+14": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "479" ], - "x-ms-client-request-id": [ "cfda0ed0-63c1-4648-828c-1e299cfa3852" ], + "x-ms-unique-id": [ "416" ], + "x-ms-client-request-id": [ "be055dd1-b50f-4b98-8135-da02e44000fc" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -602,28 +677,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11899" ], - "x-ms-request-id": [ "9d3c4ffc-3ab0-4335-a8a0-248150ff3bda" ], - "x-ms-correlation-request-id": [ "9d3c4ffc-3ab0-4335-a8a0-248150ff3bda" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143622Z:9d3c4ffc-3ab0-4335-a8a0-248150ff3bda" ], + "x-ms-correlation-request-id": [ "95b65873-a8c8-44d9-9677-5d844f3ea21f" ], + "x-ms-client-request-id": [ "be055dd1-b50f-4b98-8135-da02e44000fc_RP" ], + "x-ms-messaging-activity-id": [ "80d61e4b-71fd-4455-aa25-bef005f72f06" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T06:16:16" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "95b65873-a8c8-44d9-9677-5d844f3ea21f" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061616Z:95b65873-a8c8-44d9-9677-5d844f3ea21f" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:22 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D41CCC0436AF4703A039FA2F1436C6EA Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:15Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:15 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "661" ], + "Content-Length": [ "663" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"secondreplyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"secondreplyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"replytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+15": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+15": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"correlationFilter\": {\n \"properties\": {\n \"a\": \"b\"\n },\n \"correlationId\": \"secondcorrelationid\",\n \"messageId\": \"secondmessageid\",\n \"replyTo\": \"secondreplyto\",\n \"label\": \"secondlabel\",\n \"sessionId\": \"sessionid\",\n \"replyToSessionId\": \"secondreplytosessionid\",\n \"contentType\": \"secondcontenttype\"\n },\n \"filterType\": \"CorrelationFilter\"\n }\n}", "isContentBase64": false, "Headers": { @@ -638,37 +718,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1157" ], - "x-ms-request-id": [ "dea9e65b-892f-475b-975b-3d38092ec906" ], - "x-ms-correlation-request-id": [ "dea9e65b-892f-475b-975b-3d38092ec906" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143623Z:dea9e65b-892f-475b-975b-3d38092ec906" ], + "x-ms-correlation-request-id": [ "f1a02a7b-e26e-4b6d-bc5c-03cb83e560f2" ], + "x-ms-client-request-id": [ "81304995-d6b2-4257-bfe6-956891f93707_RP" ], + "x-ms-messaging-activity-id": [ "8621199c-e06b-4625-a1b7-628ed5b62c5b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T06:16:19" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "f1a02a7b-e26e-4b6d-bc5c-03cb83e560f2" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T061619Z:f1a02a7b-e26e-4b6d-bc5c-03cb83e560f2" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:23 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4F769D1EE06445DA9A4E2BAEA61C6181 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:16Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:18 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "667" ], + "Content-Length": [ "669" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"secondreplyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"secondreplytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"secondreplyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"secondreplytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+16": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+16": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "481" ], - "x-ms-client-request-id": [ "8161ec45-7f41-4cf3-a149-bb0ef441264f" ], + "x-ms-unique-id": [ "418" ], + "x-ms-client-request-id": [ "ebe66266-4bf1-4e98-b9c9-da7d3c129f31" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -679,28 +764,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11898" ], - "x-ms-request-id": [ "a5465d3e-4396-472e-975a-724bd66309ce" ], - "x-ms-correlation-request-id": [ "a5465d3e-4396-472e-975a-724bd66309ce" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143624Z:a5465d3e-4396-472e-975a-724bd66309ce" ], + "x-ms-correlation-request-id": [ "3153aae2-2f37-49de-abe6-4794698342dd" ], + "x-ms-client-request-id": [ "ebe66266-4bf1-4e98-b9c9-da7d3c129f31_RP" ], + "x-ms-messaging-activity-id": [ "170930d7-f990-4364-81d3-c932dd57539b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T06:16:21" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "3153aae2-2f37-49de-abe6-4794698342dd" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061621Z:3153aae2-2f37-49de-abe6-4794698342dd" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:24 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 40FCB8A36CF3415A9FF8A4FD8E9EBC9B Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:19Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:20 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "667" ], + "Content-Length": [ "669" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"secondreplyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"secondreplytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"secondreplyto\",\"label\":\"secondlabel\",\"sessionId\":\"sessionid\",\"replyToSessionId\":\"secondreplytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+17": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+17": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"correlationFilter\": {\n \"properties\": {\n \"a\": \"b\"\n },\n \"correlationId\": \"secondcorrelationid\",\n \"messageId\": \"secondmessageid\",\n \"replyTo\": \"secondreplyto\",\n \"label\": \"secondlabel\",\n \"sessionId\": \"secondsessionid\",\n \"replyToSessionId\": \"secondreplytosessionid\",\n \"contentType\": \"secondcontenttype\"\n },\n \"filterType\": \"CorrelationFilter\"\n }\n}", "isContentBase64": false, "Headers": { @@ -715,37 +805,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1156" ], - "x-ms-request-id": [ "ca93b6ac-9e12-4724-bf24-e76a769c172b" ], - "x-ms-correlation-request-id": [ "ca93b6ac-9e12-4724-bf24-e76a769c172b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143626Z:ca93b6ac-9e12-4724-bf24-e76a769c172b" ], + "x-ms-correlation-request-id": [ "60f4467a-691b-45cc-a12d-6e8e69f67eb5" ], + "x-ms-client-request-id": [ "09d0e082-e7e8-4875-acce-e58e6be99c64_RP" ], + "x-ms-messaging-activity-id": [ "fd384eca-078a-4156-adc2-d37edef23035" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T06:16:24" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "60f4467a-691b-45cc-a12d-6e8e69f67eb5" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061624Z:60f4467a-691b-45cc-a12d-6e8e69f67eb5" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:25 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B87FB77FEECB4F6F9AFEA89697344419 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:21Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:23 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "673" ], + "Content-Length": [ "675" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"secondreplyto\",\"label\":\"secondlabel\",\"sessionId\":\"secondsessionid\",\"replyToSessionId\":\"secondreplytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"secondreplyto\",\"label\":\"secondlabel\",\"sessionId\":\"secondsessionid\",\"replyToSessionId\":\"secondreplytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+18": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+18": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "483" ], - "x-ms-client-request-id": [ "ed0a955a-41d2-44dd-bb76-f765b9bbdf9c" ], + "x-ms-unique-id": [ "420" ], + "x-ms-client-request-id": [ "bf0f0ed4-1822-4b66-af8d-717a5a48c3a0" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -756,28 +851,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11897" ], - "x-ms-request-id": [ "f384c50e-05d2-4937-bf20-e4b07825090c" ], - "x-ms-correlation-request-id": [ "f384c50e-05d2-4937-bf20-e4b07825090c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143626Z:f384c50e-05d2-4937-bf20-e4b07825090c" ], + "x-ms-correlation-request-id": [ "0ac3e6ee-ce10-4107-b148-545ca3f15d1e" ], + "x-ms-client-request-id": [ "bf0f0ed4-1822-4b66-af8d-717a5a48c3a0_RP" ], + "x-ms-messaging-activity-id": [ "a76720a8-c16c-4ce0-b16e-35f397591dd2" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T06:16:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "0ac3e6ee-ce10-4107-b148-545ca3f15d1e" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061625Z:0ac3e6ee-ce10-4107-b148-545ca3f15d1e" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:26 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 650F1C35BB8C46469D68A62A6F333983 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:24Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:24 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "673" ], + "Content-Length": [ "675" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"secondreplyto\",\"label\":\"secondlabel\",\"sessionId\":\"secondsessionid\",\"replyToSessionId\":\"secondreplytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"replyTo\":\"secondreplyto\",\"label\":\"secondlabel\",\"sessionId\":\"secondsessionid\",\"replyToSessionId\":\"secondreplytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+19": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+19": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"correlationFilter\": {\n \"properties\": {\n \"a\": \"b\"\n },\n \"correlationId\": \"secondcorrelationid\",\n \"messageId\": \"secondmessageid\",\n \"to\": \"secondto\",\n \"replyTo\": \"secondreplyto\",\n \"label\": \"secondlabel\",\n \"sessionId\": \"secondsessionid\",\n \"replyToSessionId\": \"secondreplytosessionid\",\n \"contentType\": \"secondcontenttype\"\n },\n \"filterType\": \"CorrelationFilter\"\n }\n}", "isContentBase64": false, "Headers": { @@ -792,37 +892,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1155" ], - "x-ms-request-id": [ "81df7544-0fc2-47db-aaa9-5d9791781aa4" ], - "x-ms-correlation-request-id": [ "81df7544-0fc2-47db-aaa9-5d9791781aa4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143628Z:81df7544-0fc2-47db-aaa9-5d9791781aa4" ], + "x-ms-correlation-request-id": [ "e1b7a489-d226-4d64-b382-7a4c847b278c" ], + "x-ms-client-request-id": [ "f4baae73-75d7-4f11-999a-3dfa908864aa_RP" ], + "x-ms-messaging-activity-id": [ "95625097-7a1f-4394-b932-af5cdc4298bd" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T06:16:28" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "e1b7a489-d226-4d64-b382-7a4c847b278c" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061628Z:e1b7a489-d226-4d64-b382-7a4c847b278c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:28 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 16AE9183738E406D9E6C4CBEF543FD74 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:25Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:27 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "689" ], + "Content-Length": [ "691" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"to\":\"secondto\",\"replyTo\":\"secondreplyto\",\"label\":\"secondlabel\",\"sessionId\":\"secondsessionid\",\"replyToSessionId\":\"secondreplytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"to\":\"secondto\",\"replyTo\":\"secondreplyto\",\"label\":\"secondlabel\",\"sessionId\":\"secondsessionid\",\"replyToSessionId\":\"secondreplytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", "isContentBase64": false } }, - "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+20": { + "Set-AzServiceBusRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview+20": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "485" ], - "x-ms-client-request-id": [ "4fa5c6c5-793c-4438-9cbf-f42cd02d3602" ], + "x-ms-unique-id": [ "422" ], + "x-ms-client-request-id": [ "980e121a-2338-4470-8618-833ab8af07ef" ], "CommandName": [ "Get-AzServiceBusRule" ], "FullCommandName": [ "Get-AzServiceBusRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -833,21 +938,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11896" ], - "x-ms-request-id": [ "353aaa5e-323f-48ae-84f7-7100fdde8180" ], - "x-ms-correlation-request-id": [ "353aaa5e-323f-48ae-84f7-7100fdde8180" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143629Z:353aaa5e-323f-48ae-84f7-7100fdde8180" ], + "x-ms-correlation-request-id": [ "81fdfb52-b37a-436e-9c34-61c0d0a629e8" ], + "x-ms-client-request-id": [ "980e121a-2338-4470-8618-833ab8af07ef_RP" ], + "x-ms-messaging-activity-id": [ "38e9da13-1e58-4ab3-9a73-f640997d9b47" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T06:16:29" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "81fdfb52-b37a-436e-9c34-61c0d0a629e8" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061630Z:81fdfb52-b37a-436e-9c34-61c0d0a629e8" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:28 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 564802C9A2884AD4A6F122FFA152E259 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:28Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:29 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "689" ], + "Content-Length": [ "691" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"to\":\"secondto\",\"replyTo\":\"secondreplyto\",\"label\":\"secondlabel\",\"sessionId\":\"secondsessionid\",\"replyToSessionId\":\"secondreplytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription1/rules/correlationRule1\",\"name\":\"correlationRule1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\"location\":\"eastus\",\"properties\":{\"action\":{},\"filterType\":\"CorrelationFilter\",\"correlationFilter\":{\"correlationId\":\"secondcorrelationid\",\"messageId\":\"secondmessageid\",\"to\":\"secondto\",\"replyTo\":\"secondreplyto\",\"label\":\"secondlabel\",\"sessionId\":\"secondsessionid\",\"replyToSessionId\":\"secondreplytosessionid\",\"contentType\":\"secondcontenttype\",\"properties\":{\"a\":\"b\"}}}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusRule.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusRule.Tests.ps1 index cd5846feb85c..46a43c737613 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusRule.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusRule.Tests.ps1 @@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzServiceBusRule')) } function AssertCorrelationFilterUpdates{ - param([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule]$expectedRule,[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule]$actualRule) + param([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule]$expectedRule,[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule]$actualRule) $expectedRule.Name | Should -Be $actualRule.Name $expectedRule.ResourceGroupName | Should -Be $actualRule.ResourceGroupName $expectedRule.ContentType | Should -Be $actualRule.ContentType @@ -89,6 +89,6 @@ Describe 'Set-AzServiceBusRule' { AssertCorrelationFilterUpdates $currentRule $updatedRule $currentRule = $updatedRule - { Set-AzServiceBusRule -InputObject $currentRule } | Should -Throw 'Please specify the property you want to update on the -InputObject' + { Set-AzServiceBusRule -InputObject $currentRule -ErrorAction Stop } | Should -Throw 'Please specify the property you want to update on the -InputObject' } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusSubscription.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusSubscription.Recording.json index ab49b67ce7c9..0330f57e0a95 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusSubscription.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusSubscription.Recording.json @@ -1,8 +1,8 @@ { - "Set-AzServiceBusSubscription+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusSubscription+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -17,37 +17,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1154" ], - "x-ms-request-id": [ "8579a385-9443-48b3-a22e-99e73e32de8a" ], - "x-ms-correlation-request-id": [ "8579a385-9443-48b3-a22e-99e73e32de8a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143644Z:8579a385-9443-48b3-a22e-99e73e32de8a" ], + "x-ms-correlation-request-id": [ "6d1320d7-648e-44ad-8262-5f1bb4113c12" ], + "x-ms-client-request-id": [ "b1c7d5dc-2bf3-4667-8857-bafc0b5cb8fe_RP" ], + "x-ms-messaging-activity-id": [ "4865b87e-ea09-459c-a2eb-3aa32100efae" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T06:16:46" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], + "x-ms-request-id": [ "6d1320d7-648e-44ad-8262-5f1bb4113c12" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061646Z:6d1320d7-648e-44ad-8262-5f1bb4113c12" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:43 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B8BAC2F581234C90A8898697CF8484E8 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:43Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:45 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "952" ], + "Content-Length": [ "954" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3\",\"name\":\"subscription3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T14:36:44.0133435Z\",\"updatedAt\":\"2023-02-19T14:36:44.0133435Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3\",\"name\":\"subscription3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T06:16:46.7153308Z\",\"updatedAt\":\"2024-04-30T06:16:46.7153308Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusSubscription+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "487" ], - "x-ms-client-request-id": [ "e31ff17e-3d73-4414-ae8b-481b5888a132" ], + "x-ms-unique-id": [ "424" ], + "x-ms-client-request-id": [ "d2a1d55a-ba1c-4160-9788-f90a0541406c" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -58,37 +63,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11895" ], - "x-ms-request-id": [ "36c92888-3486-427f-a74d-4eeabe5d605b" ], - "x-ms-correlation-request-id": [ "36c92888-3486-427f-a74d-4eeabe5d605b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143644Z:36c92888-3486-427f-a74d-4eeabe5d605b" ], + "x-ms-correlation-request-id": [ "47b9047a-9a96-4d7d-a2fb-b9603973942a" ], + "x-ms-client-request-id": [ "d2a1d55a-ba1c-4160-9788-f90a0541406c_RP" ], + "x-ms-messaging-activity-id": [ "66d6f362-f213-4cf4-9e27-f9d592b0a089" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:16:49" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "47b9047a-9a96-4d7d-a2fb-b9603973942a" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061649Z:47b9047a-9a96-4d7d-a2fb-b9603973942a" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:43 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 22859DAB60CB4C8BBBEA3440DA161492 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:47Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:48 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "961" ], + "Content-Length": [ "960" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3\",\"name\":\"subscription3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T14:36:44.0186565Z\",\"updatedAt\":\"2023-02-19T14:36:44.0186565Z\",\"accessedAt\":\"2023-02-19T14:36:44.0186565Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3\",\"name\":\"subscription3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T06:16:46.711715Z\",\"updatedAt\":\"2024-04-30T06:16:46.711715Z\",\"accessedAt\":\"2024-04-30T06:16:46.711715Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview+3": { + "Set-AzServiceBusSubscription+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "488" ], - "x-ms-client-request-id": [ "961bdaf2-4a37-4e9d-ba2c-3380520036a9" ], + "x-ms-unique-id": [ "425" ], + "x-ms-client-request-id": [ "f5c4678d-f111-4577-ae29-2dc143bd8b69" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -99,28 +109,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11894" ], - "x-ms-request-id": [ "6b18f18a-8abf-439b-abf0-6eab3ed572ab" ], - "x-ms-correlation-request-id": [ "6b18f18a-8abf-439b-abf0-6eab3ed572ab" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143645Z:6b18f18a-8abf-439b-abf0-6eab3ed572ab" ], + "x-ms-correlation-request-id": [ "d6d14080-53d4-4910-9d0e-965821f2eb75" ], + "x-ms-client-request-id": [ "f5c4678d-f111-4577-ae29-2dc143bd8b69_RP" ], + "x-ms-messaging-activity-id": [ "e54c4383-9b0c-423f-81fa-585195a429b1" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T06:16:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "d6d14080-53d4-4910-9d0e-965821f2eb75" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T061651Z:d6d14080-53d4-4910-9d0e-965821f2eb75" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:44 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 90D8B1BBC0D44ECC9041170C79638F04 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:49Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:50 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "961" ], + "Content-Length": [ "960" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3\",\"name\":\"subscription3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T14:36:44.0186565Z\",\"updatedAt\":\"2023-02-19T14:36:44.0186565Z\",\"accessedAt\":\"2023-02-19T14:36:44.0186565Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3\",\"name\":\"subscription3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T06:16:46.711715Z\",\"updatedAt\":\"2024-04-30T06:16:46.711715Z\",\"accessedAt\":\"2024-04-30T06:16:46.711715Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview+4": { + "Set-AzServiceBusSubscription+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview+4": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT1M\",\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnFilterEvaluationExceptions\": true,\n \"deadLetteringOnMessageExpiration\": false,\n \"maxDeliveryCount\": 10,\n \"status\": \"Active\",\n \"enableBatchedOperations\": true,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"isClientAffine\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -135,37 +150,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1153" ], - "x-ms-request-id": [ "9a04f4d4-04cf-4ab1-adae-7e5038557502" ], - "x-ms-correlation-request-id": [ "9a04f4d4-04cf-4ab1-adae-7e5038557502" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143645Z:9a04f4d4-04cf-4ab1-adae-7e5038557502" ], + "x-ms-correlation-request-id": [ "674f4102-53e4-4245-be0b-320b0a5e9791" ], + "x-ms-client-request-id": [ "5aa8ed6e-f84f-400d-acef-5c8beff759cf_RP" ], + "x-ms-messaging-activity-id": [ "2b6f8ab7-250f-48ab-97b2-7a5c85256eaa" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T06:16:52" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "674f4102-53e4-4245-be0b-320b0a5e9791" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061652Z:674f4102-53e4-4245-be0b-320b0a5e9791" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:45 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C4DCFF00391D448682FFD6518019F74E Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:51Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:52 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "934" ], + "Content-Length": [ "936" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3\",\"name\":\"subscription3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T14:36:45.7477388Z\",\"updatedAt\":\"2023-02-19T14:36:45.7477388Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3\",\"name\":\"subscription3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T06:16:52.8152965Z\",\"updatedAt\":\"2024-04-30T06:16:52.8152965Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview+5": { + "Set-AzServiceBusSubscription+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "490" ], - "x-ms-client-request-id": [ "36e13f09-441a-41a3-835c-6a512ff93f55" ], + "x-ms-unique-id": [ "427" ], + "x-ms-client-request-id": [ "97f2e7ee-d871-4160-bce5-d1f48b137b30" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -176,28 +196,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11893" ], - "x-ms-request-id": [ "06a428c7-fd82-4444-b4d8-a5b9fa3152b7" ], - "x-ms-correlation-request-id": [ "06a428c7-fd82-4444-b4d8-a5b9fa3152b7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143646Z:06a428c7-fd82-4444-b4d8-a5b9fa3152b7" ], + "x-ms-correlation-request-id": [ "00f66a93-d718-4146-aa6c-79edacc6ea05" ], + "x-ms-client-request-id": [ "97f2e7ee-d871-4160-bce5-d1f48b137b30_RP" ], + "x-ms-messaging-activity-id": [ "b31e34a8-a747-43a5-a394-2d0742bea6a0" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T06:16:54" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "00f66a93-d718-4146-aa6c-79edacc6ea05" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061654Z:00f66a93-d718-4146-aa6c-79edacc6ea05" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:45 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1162BB31F7534D6295E3AACDB6338DB3 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:53Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:53 GMT" ] }, "ContentHeaders": { "Content-Length": [ "939" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3\",\"name\":\"subscription3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T14:36:44.0186565Z\",\"updatedAt\":\"2023-02-19T14:36:45.7529942Z\",\"accessedAt\":\"2023-02-19T14:36:44.018Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3\",\"name\":\"subscription3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T06:16:46.711715Z\",\"updatedAt\":\"2024-04-30T06:16:52.821273Z\",\"accessedAt\":\"2024-04-30T06:16:46.711Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview+6": { + "Set-AzServiceBusSubscription+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview+6": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT1M\",\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnFilterEvaluationExceptions\": true,\n \"deadLetteringOnMessageExpiration\": false,\n \"maxDeliveryCount\": 10,\n \"status\": \"Active\",\n \"enableBatchedOperations\": true,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"isClientAffine\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -212,37 +237,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1152" ], - "x-ms-request-id": [ "62b35940-df02-4adb-b0c9-7f0d4e09eb3f" ], - "x-ms-correlation-request-id": [ "62b35940-df02-4adb-b0c9-7f0d4e09eb3f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143646Z:62b35940-df02-4adb-b0c9-7f0d4e09eb3f" ], + "x-ms-correlation-request-id": [ "3bb667f1-bc00-4ac4-b4ad-8a09f1108b4c" ], + "x-ms-client-request-id": [ "4a07a29c-c543-4dfd-9b41-1ce1265710b1_RP" ], + "x-ms-messaging-activity-id": [ "e84c9809-6ce1-4d3d-a1c1-3d6d75d73e34" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T06:16:56" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-request-id": [ "3bb667f1-bc00-4ac4-b4ad-8a09f1108b4c" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061656Z:3bb667f1-bc00-4ac4-b4ad-8a09f1108b4c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:46 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E144D92707E54BF5AB848A2B1CDB8AD4 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:54Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:55 GMT" ] }, "ContentHeaders": { "Content-Length": [ "939" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription3\",\"name\":\"subscription3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T14:36:44.0186565Z\",\"updatedAt\":\"2023-02-19T14:36:45.7529942Z\",\"accessedAt\":\"2023-02-19T14:36:44.018Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription3\",\"name\":\"subscription3\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T06:16:46.711715Z\",\"updatedAt\":\"2024-04-30T06:16:52.821273Z\",\"accessedAt\":\"2024-04-30T06:16:46.711Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "492" ], - "x-ms-client-request-id": [ "09c8d64e-1dad-4d60-bd17-9788c6efea96" ], + "x-ms-unique-id": [ "429" ], + "x-ms-client-request-id": [ "0b7b57e1-03b0-493d-988d-ddb8c12d7c46" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -253,37 +283,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11892" ], - "x-ms-request-id": [ "a8506ac0-c214-43fa-aa43-20916c088ccb" ], - "x-ms-correlation-request-id": [ "a8506ac0-c214-43fa-aa43-20916c088ccb" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143647Z:a8506ac0-c214-43fa-aa43-20916c088ccb" ], + "x-ms-correlation-request-id": [ "44fc8335-f304-41ec-97a2-03c5fc0188a5" ], + "x-ms-client-request-id": [ "0b7b57e1-03b0-493d-988d-ddb8c12d7c46_RP" ], + "x-ms-messaging-activity-id": [ "dfa726e2-9c3c-4283-a084-1ed28c45fd5c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T06:16:57" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "44fc8335-f304-41ec-97a2-03c5fc0188a5" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061657Z:44fc8335-f304-41ec-97a2-03c5fc0188a5" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:46 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 276B49A8769C4B90840C7035F3E213BE Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:56Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:56 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1006" ], + "Content-Length": [ "1008" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT3M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T13:47:42.6427506Z\",\"updatedAt\":\"2023-02-19T13:47:42.6427506Z\",\"accessedAt\":\"2023-02-19T13:47:42.642Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT3M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T05:32:01.0158655Z\",\"updatedAt\":\"2024-04-30T05:32:01.0158655Z\",\"accessedAt\":\"2024-04-30T05:32:01.015Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "493" ], - "x-ms-client-request-id": [ "d87c479a-1e48-415f-b34e-94debd124ab8" ], + "x-ms-unique-id": [ "430" ], + "x-ms-client-request-id": [ "91f3784a-bf21-4693-83aa-0581ca961870" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -294,28 +329,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11891" ], - "x-ms-request-id": [ "7c1bfda8-84c7-49dd-a6cc-b50921fe16e9" ], - "x-ms-correlation-request-id": [ "7c1bfda8-84c7-49dd-a6cc-b50921fe16e9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143648Z:7c1bfda8-84c7-49dd-a6cc-b50921fe16e9" ], + "x-ms-correlation-request-id": [ "6de1daad-2eea-4dd5-af75-7aaa13d612ee" ], + "x-ms-client-request-id": [ "91f3784a-bf21-4693-83aa-0581ca961870_RP" ], + "x-ms-messaging-activity-id": [ "896944d6-cba6-485e-b2e5-9904c9af3069" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:16:59" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "6de1daad-2eea-4dd5-af75-7aaa13d612ee" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061659Z:6de1daad-2eea-4dd5-af75-7aaa13d612ee" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:47 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9A50CD84DF084E04B731194E23ED2AB5 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:57Z" ], + "Date": [ "Tue, 30 Apr 2024 06:16:58 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1006" ], + "Content-Length": [ "1008" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT3M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T13:47:42.6427506Z\",\"updatedAt\":\"2023-02-19T13:47:42.6427506Z\",\"accessedAt\":\"2023-02-19T13:47:42.642Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT3M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P428DT3H11M10S\",\"deadLetteringOnMessageExpiration\":true,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T05:32:01.0158655Z\",\"updatedAt\":\"2024-04-30T05:32:01.0158655Z\",\"accessedAt\":\"2024-04-30T05:32:01.015Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+3": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+3": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT3M\",\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnFilterEvaluationExceptions\": true,\n \"deadLetteringOnMessageExpiration\": true,\n \"maxDeliveryCount\": 12,\n \"status\": \"Active\",\n \"enableBatchedOperations\": true,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"forwardTo\": \"queue1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\",\n \"isClientAffine\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -330,37 +370,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1151" ], - "x-ms-request-id": [ "3d6154f5-f982-44b0-a2ef-0bdd6adcb202" ], - "x-ms-correlation-request-id": [ "3d6154f5-f982-44b0-a2ef-0bdd6adcb202" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143648Z:3d6154f5-f982-44b0-a2ef-0bdd6adcb202" ], + "x-ms-correlation-request-id": [ "1a872e8a-52f7-4d23-afa9-d5e46ebcd43d" ], + "x-ms-client-request-id": [ "a107a969-a499-4430-a2d3-eef5a16d0129_RP" ], + "x-ms-messaging-activity-id": [ "d5497b6e-4e07-4b1d-88e5-8b2e7262bbdc" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T06:17:01" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-request-id": [ "1a872e8a-52f7-4d23-afa9-d5e46ebcd43d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061701Z:1a872e8a-52f7-4d23-afa9-d5e46ebcd43d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:47 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 197B9A47C84F4FE2849853EB99828178 Ref B: SEL221051503025 Ref C: 2024-04-30T06:16:59Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:00 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "995" ], + "Content-Length": [ "997" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT3M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T14:36:48.6543032Z\",\"updatedAt\":\"2023-02-19T14:36:48.6543032Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT3M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T06:17:01.3955578Z\",\"updatedAt\":\"2024-04-30T06:17:01.3955578Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+4": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "495" ], - "x-ms-client-request-id": [ "838ea83b-dced-44b0-ae21-7e11f06698a6" ], + "x-ms-unique-id": [ "432" ], + "x-ms-client-request-id": [ "904294cd-75df-4f7a-8cfc-a8194a887b2d" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -371,28 +416,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11890" ], - "x-ms-request-id": [ "4ca75363-abbf-44a3-8014-768fd3ff7289" ], - "x-ms-correlation-request-id": [ "4ca75363-abbf-44a3-8014-768fd3ff7289" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143649Z:4ca75363-abbf-44a3-8014-768fd3ff7289" ], + "x-ms-correlation-request-id": [ "fb1e4c74-2b15-4fde-923d-cb81fa5aeee7" ], + "x-ms-client-request-id": [ "904294cd-75df-4f7a-8cfc-a8194a887b2d_RP" ], + "x-ms-messaging-activity-id": [ "ed8aa142-9fb1-4175-a0b5-8582718136ae" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-30T06:17:01" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "fb1e4c74-2b15-4fde-923d-cb81fa5aeee7" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061701Z:fb1e4c74-2b15-4fde-923d-cb81fa5aeee7" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:48 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A866EB5B6445479A8E20B965C19D4CCD Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:01Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:01 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1000" ], + "Content-Length": [ "1002" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT3M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T13:47:42.6427506Z\",\"updatedAt\":\"2023-02-19T14:36:48.6592704Z\",\"accessedAt\":\"2023-02-19T13:47:42.642Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT3M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":true,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T05:32:01.0158655Z\",\"updatedAt\":\"2024-04-30T06:17:01.3996579Z\",\"accessedAt\":\"2024-04-30T05:32:01.015Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+5": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+5": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT3M\",\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnFilterEvaluationExceptions\": true,\n \"deadLetteringOnMessageExpiration\": false,\n \"maxDeliveryCount\": 12,\n \"status\": \"Active\",\n \"enableBatchedOperations\": true,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"forwardTo\": \"queue1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\",\n \"isClientAffine\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -407,37 +457,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1150" ], - "x-ms-request-id": [ "9410ba90-8a4d-43b6-9113-0dc3c4764c5c" ], - "x-ms-correlation-request-id": [ "9410ba90-8a4d-43b6-9113-0dc3c4764c5c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143649Z:9410ba90-8a4d-43b6-9113-0dc3c4764c5c" ], + "x-ms-correlation-request-id": [ "aa8b8ad0-67cc-438e-a113-e8e22ae863e3" ], + "x-ms-client-request-id": [ "5bdea5e8-70d0-43cc-9924-e7c2c7aed04a_RP" ], + "x-ms-messaging-activity-id": [ "99f64c0a-e3ca-4c50-9b74-1dec6304b78d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:17:03" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "aa8b8ad0-67cc-438e-a113-e8e22ae863e3" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061704Z:aa8b8ad0-67cc-438e-a113-e8e22ae863e3" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:49 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CEE74D4D06484A0AA1EC6312B543F076 Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:02Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:03 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "996" ], + "Content-Length": [ "998" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT3M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T14:36:49.8730765Z\",\"updatedAt\":\"2023-02-19T14:36:49.8730765Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT3M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T06:17:03.9142745Z\",\"updatedAt\":\"2024-04-30T06:17:03.9142745Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+6": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "497" ], - "x-ms-client-request-id": [ "6678f96a-83e0-41ed-852a-f6483a09905a" ], + "x-ms-unique-id": [ "434" ], + "x-ms-client-request-id": [ "2579a843-3250-49bd-893c-1c6b57a80971" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -448,28 +503,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11889" ], - "x-ms-request-id": [ "ce768ef8-bbed-4be5-987a-8596d44c2ff4" ], - "x-ms-correlation-request-id": [ "ce768ef8-bbed-4be5-987a-8596d44c2ff4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143650Z:ce768ef8-bbed-4be5-987a-8596d44c2ff4" ], + "x-ms-correlation-request-id": [ "a28901d0-954e-4f4d-9d80-117517a84751" ], + "x-ms-client-request-id": [ "2579a843-3250-49bd-893c-1c6b57a80971_RP" ], + "x-ms-messaging-activity-id": [ "c6a6a960-ddad-4fbb-b0a7-d46eefd2ce3e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T06:17:04" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "a28901d0-954e-4f4d-9d80-117517a84751" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061704Z:a28901d0-954e-4f4d-9d80-117517a84751" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:49 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 15C438C68DD44A8ABFF931248D2D9E60 Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:04Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:03 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1001" ], + "Content-Length": [ "1003" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT3M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T13:47:42.6427506Z\",\"updatedAt\":\"2023-02-19T14:36:49.8780331Z\",\"accessedAt\":\"2023-02-19T13:47:42.642Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT3M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T05:32:01.0158655Z\",\"updatedAt\":\"2024-04-30T06:17:03.9152758Z\",\"accessedAt\":\"2024-04-30T05:32:01.015Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+7": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+7": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT1M\",\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnFilterEvaluationExceptions\": true,\n \"deadLetteringOnMessageExpiration\": false,\n \"maxDeliveryCount\": 12,\n \"status\": \"Active\",\n \"enableBatchedOperations\": true,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"forwardTo\": \"queue1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\",\n \"isClientAffine\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -484,37 +544,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1149" ], - "x-ms-request-id": [ "c18015f7-1c02-4a57-9123-bffed5e15d80" ], - "x-ms-correlation-request-id": [ "c18015f7-1c02-4a57-9123-bffed5e15d80" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143651Z:c18015f7-1c02-4a57-9123-bffed5e15d80" ], + "x-ms-correlation-request-id": [ "722f1e6c-7cf6-4f16-9ca4-85d03341d036" ], + "x-ms-client-request-id": [ "e12bac5e-cf28-464b-80c8-aa609839c780_RP" ], + "x-ms-messaging-activity-id": [ "383ae17c-99e5-457b-ac0e-010909056b4f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T06:17:06" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "722f1e6c-7cf6-4f16-9ca4-85d03341d036" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061706Z:722f1e6c-7cf6-4f16-9ca4-85d03341d036" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:50 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A2AB86243C0E42DA9591AC69C8AD80AA Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:04Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "996" ], + "Content-Length": [ "998" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T14:36:51.2013603Z\",\"updatedAt\":\"2023-02-19T14:36:51.2013603Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T06:17:06.3789684Z\",\"updatedAt\":\"2024-04-30T06:17:06.3789684Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+8": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "499" ], - "x-ms-client-request-id": [ "ac2d0d7d-daf4-4336-ad7f-ba1b5579401b" ], + "x-ms-unique-id": [ "436" ], + "x-ms-client-request-id": [ "b41a9568-de67-44e3-8dd3-482c65e81d66" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -525,28 +590,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11888" ], - "x-ms-request-id": [ "ac6b772c-1c96-41f9-98c2-9bdc9d5ef1fe" ], - "x-ms-correlation-request-id": [ "ac6b772c-1c96-41f9-98c2-9bdc9d5ef1fe" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143651Z:ac6b772c-1c96-41f9-98c2-9bdc9d5ef1fe" ], + "x-ms-correlation-request-id": [ "7672a0d5-7828-4a8e-8ca6-9caa91244daf" ], + "x-ms-client-request-id": [ "b41a9568-de67-44e3-8dd3-482c65e81d66_RP" ], + "x-ms-messaging-activity-id": [ "e60d8276-1c28-41d5-a92b-18a3e43abb3c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:17:07" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "7672a0d5-7828-4a8e-8ca6-9caa91244daf" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061708Z:7672a0d5-7828-4a8e-8ca6-9caa91244daf" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:50 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 94257D42C48E465290132CD1D7EE9ACD Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:06Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:07 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1001" ], + "Content-Length": [ "1003" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T13:47:42.6427506Z\",\"updatedAt\":\"2023-02-19T14:36:51.2061714Z\",\"accessedAt\":\"2023-02-19T13:47:42.642Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":12,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T05:32:01.0158655Z\",\"updatedAt\":\"2024-04-30T06:17:06.3841387Z\",\"accessedAt\":\"2024-04-30T05:32:01.015Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+9": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+9": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT1M\",\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnFilterEvaluationExceptions\": true,\n \"deadLetteringOnMessageExpiration\": false,\n \"maxDeliveryCount\": 8,\n \"status\": \"Active\",\n \"enableBatchedOperations\": true,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"forwardTo\": \"queue1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\",\n \"isClientAffine\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -561,37 +631,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1148" ], - "x-ms-request-id": [ "ef5182a5-cb0a-48b0-a92d-f41d60944690" ], - "x-ms-correlation-request-id": [ "ef5182a5-cb0a-48b0-a92d-f41d60944690" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143652Z:ef5182a5-cb0a-48b0-a92d-f41d60944690" ], + "x-ms-correlation-request-id": [ "2dfd3366-31d3-48e9-b39b-539452d60613" ], + "x-ms-client-request-id": [ "95522cc9-0179-4c14-a3ff-bc56a887e2d1_RP" ], + "x-ms-messaging-activity-id": [ "7a7fe02b-9d2b-4a8c-a65a-7ef220703062" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:17:09" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "2dfd3366-31d3-48e9-b39b-539452d60613" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T061710Z:2dfd3366-31d3-48e9-b39b-539452d60613" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:51 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1B034A7CF28E4661BFC1D741942C2F8B Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:08Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:09 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "993" ], + "Content-Length": [ "997" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T14:36:52.357593Z\",\"updatedAt\":\"2023-02-19T14:36:52.357593Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T06:17:09.9478059Z\",\"updatedAt\":\"2024-04-30T06:17:09.9478059Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+10": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "501" ], - "x-ms-client-request-id": [ "86d8a68d-04d9-4382-a4f3-87140fcdf25b" ], + "x-ms-unique-id": [ "438" ], + "x-ms-client-request-id": [ "8b0eb436-8080-4e24-b092-28e78a878d03" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -602,28 +677,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11887" ], - "x-ms-request-id": [ "3718c161-58b0-43b4-a0bd-2652324379cf" ], - "x-ms-correlation-request-id": [ "3718c161-58b0-43b4-a0bd-2652324379cf" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143653Z:3718c161-58b0-43b4-a0bd-2652324379cf" ], + "x-ms-correlation-request-id": [ "fae2e8a3-ab8e-4bb2-bbcd-f6435b7f44ea" ], + "x-ms-client-request-id": [ "8b0eb436-8080-4e24-b092-28e78a878d03_RP" ], + "x-ms-messaging-activity-id": [ "58a2645a-03d6-47f5-b7dd-8815ce50ad06" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:17:11" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "fae2e8a3-ab8e-4bb2-bbcd-f6435b7f44ea" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061711Z:fae2e8a3-ab8e-4bb2-bbcd-f6435b7f44ea" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:52 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6BB30AE6796049DCABC404BF9865B3A4 Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:10Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:10 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1000" ], + "Content-Length": [ "1002" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T13:47:42.6427506Z\",\"updatedAt\":\"2023-02-19T14:36:52.3624827Z\",\"accessedAt\":\"2023-02-19T13:47:42.642Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T05:32:01.0158655Z\",\"updatedAt\":\"2024-04-30T06:17:09.9622822Z\",\"accessedAt\":\"2024-04-30T05:32:01.015Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+11": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+11": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT1M\",\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnFilterEvaluationExceptions\": true,\n \"deadLetteringOnMessageExpiration\": false,\n \"maxDeliveryCount\": 8,\n \"status\": \"Active\",\n \"enableBatchedOperations\": false,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"forwardTo\": \"queue1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\",\n \"isClientAffine\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -638,37 +718,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1147" ], - "x-ms-request-id": [ "c721fa57-73e6-465b-8238-ed899868796c" ], - "x-ms-correlation-request-id": [ "c721fa57-73e6-465b-8238-ed899868796c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143653Z:c721fa57-73e6-465b-8238-ed899868796c" ], + "x-ms-correlation-request-id": [ "12c49445-4cb8-4311-94ce-6b1ee726c986" ], + "x-ms-client-request-id": [ "8e4a13bd-6d96-43c9-8cb9-04014e0db01c_RP" ], + "x-ms-messaging-activity-id": [ "5c7298c8-27ae-4287-8f9c-6383c60096cf" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T06:17:13" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "12c49445-4cb8-4311-94ce-6b1ee726c986" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061713Z:12c49445-4cb8-4311-94ce-6b1ee726c986" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:52 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3ACB7CB7AD8B42CD8C5946CFB57DF3FC Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:11Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:12 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "996" ], + "Content-Length": [ "998" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"Active\",\"enableBatchedOperations\":false,\"createdAt\":\"2023-02-19T14:36:53.5153841Z\",\"updatedAt\":\"2023-02-19T14:36:53.5153841Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"Active\",\"enableBatchedOperations\":false,\"createdAt\":\"2024-04-30T06:17:13.6902031Z\",\"updatedAt\":\"2024-04-30T06:17:13.6902031Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+12": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+12": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "503" ], - "x-ms-client-request-id": [ "6927aeb3-36e9-4547-84a3-0990afd95d07" ], + "x-ms-unique-id": [ "440" ], + "x-ms-client-request-id": [ "06d42276-743f-4602-a1ce-b8f70c925d68" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -679,28 +764,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11886" ], - "x-ms-request-id": [ "45d01afb-e8c4-4b7d-9930-889577e049fa" ], - "x-ms-correlation-request-id": [ "45d01afb-e8c4-4b7d-9930-889577e049fa" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143654Z:45d01afb-e8c4-4b7d-9930-889577e049fa" ], + "x-ms-correlation-request-id": [ "491631d0-e0e3-44a3-8bd3-bf4fc1a139ff" ], + "x-ms-client-request-id": [ "06d42276-743f-4602-a1ce-b8f70c925d68_RP" ], + "x-ms-messaging-activity-id": [ "df994ded-db31-4ad7-88ea-312dbbc15e46" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:17:14" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "491631d0-e0e3-44a3-8bd3-bf4fc1a139ff" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T061714Z:491631d0-e0e3-44a3-8bd3-bf4fc1a139ff" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:53 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3F2D08DF67AA4808A5B0CDE1D45A5C9B Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:13Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:13 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1001" ], + "Content-Length": [ "1003" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"Active\",\"enableBatchedOperations\":false,\"createdAt\":\"2023-02-19T13:47:42.6427506Z\",\"updatedAt\":\"2023-02-19T14:36:53.5343192Z\",\"accessedAt\":\"2023-02-19T13:47:42.642Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"Active\",\"enableBatchedOperations\":false,\"createdAt\":\"2024-04-30T05:32:01.0158655Z\",\"updatedAt\":\"2024-04-30T06:17:13.7042646Z\",\"accessedAt\":\"2024-04-30T05:32:01.015Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"queue1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+13": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+13": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT1M\",\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnFilterEvaluationExceptions\": true,\n \"deadLetteringOnMessageExpiration\": false,\n \"maxDeliveryCount\": 8,\n \"status\": \"Active\",\n \"enableBatchedOperations\": false,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"forwardTo\": \"topic1\",\n \"forwardDeadLetteredMessagesTo\": \"queue1\",\n \"isClientAffine\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -715,37 +805,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1146" ], - "x-ms-request-id": [ "fadf2083-b053-4cb1-bd46-f73034fc4f7c" ], - "x-ms-correlation-request-id": [ "fadf2083-b053-4cb1-bd46-f73034fc4f7c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143654Z:fadf2083-b053-4cb1-bd46-f73034fc4f7c" ], + "x-ms-correlation-request-id": [ "d8ffd192-9e04-4d19-bb7d-0b3f283b01a5" ], + "x-ms-client-request-id": [ "616e1e41-342e-4651-b2dd-4032ff04e9fe_RP" ], + "x-ms-messaging-activity-id": [ "bacef5d7-abda-40b6-9c13-ed67dd357cf2" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T06:17:16" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "d8ffd192-9e04-4d19-bb7d-0b3f283b01a5" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061716Z:d8ffd192-9e04-4d19-bb7d-0b3f283b01a5" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:53 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 646EA0CFF7D0448BB36239C272AE2EE5 Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:14Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:15 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "996" ], + "Content-Length": [ "998" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"Active\",\"enableBatchedOperations\":false,\"createdAt\":\"2023-02-19T14:36:54.6733759Z\",\"updatedAt\":\"2023-02-19T14:36:54.6733759Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"Active\",\"enableBatchedOperations\":false,\"createdAt\":\"2024-04-30T06:17:16.1785932Z\",\"updatedAt\":\"2024-04-30T06:17:16.1785932Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+14": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "505" ], - "x-ms-client-request-id": [ "f3e35fda-dfb1-45b2-96c1-ce476a509a2f" ], + "x-ms-unique-id": [ "442" ], + "x-ms-client-request-id": [ "b21c5ed4-2b5a-4a9a-b83c-f2debdc876c5" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -756,28 +851,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11885" ], - "x-ms-request-id": [ "d0204c75-4cd3-4853-a07b-6baae0904d08" ], - "x-ms-correlation-request-id": [ "d0204c75-4cd3-4853-a07b-6baae0904d08" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143655Z:d0204c75-4cd3-4853-a07b-6baae0904d08" ], + "x-ms-correlation-request-id": [ "3627cf9a-62b0-45fc-b205-2f893389656b" ], + "x-ms-client-request-id": [ "b21c5ed4-2b5a-4a9a-b83c-f2debdc876c5_RP" ], + "x-ms-messaging-activity-id": [ "a21a17b8-40da-44f8-ba81-6b50bb357eda" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T06:17:18" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "3627cf9a-62b0-45fc-b205-2f893389656b" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061718Z:3627cf9a-62b0-45fc-b205-2f893389656b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:55 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C20EBAA4C9F74B5B829FD3E66479E388 Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:17Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:17 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1001" ], + "Content-Length": [ "1003" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"Active\",\"enableBatchedOperations\":false,\"createdAt\":\"2023-02-19T13:47:42.6427506Z\",\"updatedAt\":\"2023-02-19T14:36:54.6905792Z\",\"accessedAt\":\"2023-02-19T13:47:42.642Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"Active\",\"enableBatchedOperations\":false,\"createdAt\":\"2024-04-30T05:32:01.0158655Z\",\"updatedAt\":\"2024-04-30T06:17:16.1730194Z\",\"accessedAt\":\"2024-04-30T05:32:01.015Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"queue1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+15": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+15": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT1M\",\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnFilterEvaluationExceptions\": true,\n \"deadLetteringOnMessageExpiration\": false,\n \"maxDeliveryCount\": 8,\n \"status\": \"Active\",\n \"enableBatchedOperations\": false,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"forwardTo\": \"topic1\",\n \"forwardDeadLetteredMessagesTo\": \"topic1\",\n \"isClientAffine\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -792,37 +892,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1145" ], - "x-ms-request-id": [ "75dab43b-2a6c-4a3a-92bf-6fadb5763aa5" ], - "x-ms-correlation-request-id": [ "75dab43b-2a6c-4a3a-92bf-6fadb5763aa5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143655Z:75dab43b-2a6c-4a3a-92bf-6fadb5763aa5" ], + "x-ms-correlation-request-id": [ "256dd470-33cc-45bd-b36d-4f717de4c90f" ], + "x-ms-client-request-id": [ "159b94da-cefe-4724-bbd3-a419ae23776e_RP" ], + "x-ms-messaging-activity-id": [ "f6bdcd36-78b3-4893-a792-acbdb39769fe" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T06:17:20" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "256dd470-33cc-45bd-b36d-4f717de4c90f" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061720Z:256dd470-33cc-45bd-b36d-4f717de4c90f" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:55 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9CEAAA1ED29C488F8E69E1F81A429974 Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:18Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:19 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "996" ], + "Content-Length": [ "998" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"Active\",\"enableBatchedOperations\":false,\"createdAt\":\"2023-02-19T14:36:55.8492306Z\",\"updatedAt\":\"2023-02-19T14:36:55.8492306Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"topic1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"Active\",\"enableBatchedOperations\":false,\"createdAt\":\"2024-04-30T06:17:20.4992513Z\",\"updatedAt\":\"2024-04-30T06:17:20.4992513Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"topic1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+16": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+16": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "507" ], - "x-ms-client-request-id": [ "eb7f3bbf-96d1-4119-a89f-b6419c5b80ee" ], + "x-ms-unique-id": [ "444" ], + "x-ms-client-request-id": [ "ab4da7f3-ba5b-4a03-af75-52a72560e073" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -833,28 +938,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11884" ], - "x-ms-request-id": [ "bb273f1e-3f69-4235-926e-4c3c01b76441" ], - "x-ms-correlation-request-id": [ "bb273f1e-3f69-4235-926e-4c3c01b76441" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143656Z:bb273f1e-3f69-4235-926e-4c3c01b76441" ], + "x-ms-correlation-request-id": [ "f6c044dc-1bc8-46c3-8643-9ae3990f056a" ], + "x-ms-client-request-id": [ "ab4da7f3-ba5b-4a03-af75-52a72560e073_RP" ], + "x-ms-messaging-activity-id": [ "d4641628-02fe-4042-ab32-807eb45be935" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:17:22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "f6c044dc-1bc8-46c3-8643-9ae3990f056a" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061722Z:f6c044dc-1bc8-46c3-8643-9ae3990f056a" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:56 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 51CF2F6EAE064C1385DB9A97FEF20249 Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:20Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:21 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1001" ], + "Content-Length": [ "1003" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"Active\",\"enableBatchedOperations\":false,\"createdAt\":\"2023-02-19T13:47:42.6427506Z\",\"updatedAt\":\"2023-02-19T14:36:55.8624661Z\",\"accessedAt\":\"2023-02-19T13:47:42.642Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"topic1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"Active\",\"enableBatchedOperations\":false,\"createdAt\":\"2024-04-30T05:32:01.0158655Z\",\"updatedAt\":\"2024-04-30T06:17:20.5065001Z\",\"accessedAt\":\"2024-04-30T05:32:01.015Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"topic1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+17": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview+17": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT1M\",\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P1DT3M4S\",\n \"deadLetteringOnFilterEvaluationExceptions\": true,\n \"deadLetteringOnMessageExpiration\": false,\n \"maxDeliveryCount\": 8,\n \"status\": \"ReceiveDisabled\",\n \"enableBatchedOperations\": false,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"forwardTo\": \"topic1\",\n \"forwardDeadLetteredMessagesTo\": \"topic1\",\n \"isClientAffine\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -869,28 +979,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1144" ], - "x-ms-request-id": [ "202db223-fae1-44e1-b8fa-98200b984b0a" ], - "x-ms-correlation-request-id": [ "202db223-fae1-44e1-b8fa-98200b984b0a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143657Z:202db223-fae1-44e1-b8fa-98200b984b0a" ], + "x-ms-correlation-request-id": [ "23671983-bdd6-48d1-bec9-6e7538334556" ], + "x-ms-client-request-id": [ "cd99e56e-4b13-404a-bf17-fe3df19b3279_RP" ], + "x-ms-messaging-activity-id": [ "17c56eb0-5182-4de5-85f1-894cdff39669" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-30T06:17:22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-request-id": [ "23671983-bdd6-48d1-bec9-6e7538334556" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061722Z:23671983-bdd6-48d1-bec9-6e7538334556" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:57 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DDE81E2AA5D9449F92712001F87EAD85 Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:22Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:21 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1005" ], + "Content-Length": [ "1007" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"ReceiveDisabled\",\"enableBatchedOperations\":false,\"createdAt\":\"2023-02-19T14:36:57.0523728Z\",\"updatedAt\":\"2023-02-19T14:36:57.0523728Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"topic1\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription2\",\"name\":\"subscription2\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P1DT3M4S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":8,\"status\":\"ReceiveDisabled\",\"enableBatchedOperations\":false,\"createdAt\":\"2024-04-30T06:17:22.7725108Z\",\"updatedAt\":\"2024-04-30T06:17:22.7725108Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"forwardTo\":\"topic1\",\"forwardDeadLetteredMessagesTo\":\"topic1\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription4?api-version=2022-10-01-preview+18": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription4?api-version=2022-10-01-preview+18": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription4?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription4?api-version=2022-10-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -905,37 +1020,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1143" ], - "x-ms-request-id": [ "2e100598-7dba-4ba2-98bd-814d06953209" ], - "x-ms-correlation-request-id": [ "2e100598-7dba-4ba2-98bd-814d06953209" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143658Z:2e100598-7dba-4ba2-98bd-814d06953209" ], + "x-ms-correlation-request-id": [ "09154ed4-8eca-4e41-8f9c-895560b8deea" ], + "x-ms-client-request-id": [ "6dff6e54-7750-48e3-b5af-75a7314aae22_RP" ], + "x-ms-messaging-activity-id": [ "8905b07b-1499-43e9-856f-84d86989b14c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T06:17:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "09154ed4-8eca-4e41-8f9c-895560b8deea" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061725Z:09154ed4-8eca-4e41-8f9c-895560b8deea" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:58 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 58AFD909C8484BBF83ECC3B3E31E0AAD Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:22Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:24 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "952" ], + "Content-Length": [ "954" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription4\",\"name\":\"subscription4\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T14:36:58.6617771Z\",\"updatedAt\":\"2023-02-19T14:36:58.6617771Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription4\",\"name\":\"subscription4\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T06:17:25.7194571Z\",\"updatedAt\":\"2024-04-30T06:17:25.7194571Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription4?api-version=2022-10-01-preview+19": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription4?api-version=2022-10-01-preview+19": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription4?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription4?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "510" ], - "x-ms-client-request-id": [ "bdcb5686-9a34-48f2-959d-cb3a8070134e" ], + "x-ms-unique-id": [ "447" ], + "x-ms-client-request-id": [ "6eccb774-3793-4013-9429-98a8b133b0d3" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -946,28 +1066,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11883" ], - "x-ms-request-id": [ "96ec0db3-e66a-482c-a4dc-b2ce7ae6a647" ], - "x-ms-correlation-request-id": [ "96ec0db3-e66a-482c-a4dc-b2ce7ae6a647" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143659Z:96ec0db3-e66a-482c-a4dc-b2ce7ae6a647" ], + "x-ms-correlation-request-id": [ "4689b951-f339-49c5-817a-4e390195ef24" ], + "x-ms-client-request-id": [ "6eccb774-3793-4013-9429-98a8b133b0d3_RP" ], + "x-ms-messaging-activity-id": [ "287ce017-cfad-4640-b4e9-03c0c382a11a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T06:17:27" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-request-id": [ "4689b951-f339-49c5-817a-4e390195ef24" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061727Z:4689b951-f339-49c5-817a-4e390195ef24" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:59 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 35A06456C5C7455FB9CDC6A5F8A3A5C3 Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:25Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:26 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "958" ], + "Content-Length": [ "963" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription4\",\"name\":\"subscription4\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T14:36:58.659415Z\",\"updatedAt\":\"2023-02-19T14:36:58.659415Z\",\"accessedAt\":\"2023-02-19T14:36:58.659415Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription4\",\"name\":\"subscription4\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T06:17:25.7253761Z\",\"updatedAt\":\"2024-04-30T06:17:25.7253761Z\",\"accessedAt\":\"2024-04-30T06:17:25.7253761Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription4?api-version=2022-10-01-preview+20": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription4?api-version=2022-10-01-preview+20": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription4?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription4?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"lockDuration\": \"PT1M\",\n \"requiresSession\": false,\n \"defaultMessageTimeToLive\": \"P10675199DT2H48M5.4775807S\",\n \"deadLetteringOnFilterEvaluationExceptions\": true,\n \"deadLetteringOnMessageExpiration\": false,\n \"maxDeliveryCount\": 10,\n \"status\": \"Active\",\n \"enableBatchedOperations\": true,\n \"autoDeleteOnIdle\": \"P5D\",\n \"isClientAffine\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -982,37 +1107,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1142" ], - "x-ms-request-id": [ "02c7c99c-fbc3-415f-9630-3eb9b42f204c" ], - "x-ms-correlation-request-id": [ "02c7c99c-fbc3-415f-9630-3eb9b42f204c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143659Z:02c7c99c-fbc3-415f-9630-3eb9b42f204c" ], + "x-ms-correlation-request-id": [ "ecb10f27-f4d1-4044-a7c5-8ae5dfc3f55b" ], + "x-ms-client-request-id": [ "aa0a6d2a-ca8a-4cd5-ab2f-7b467c80b625_RP" ], + "x-ms-messaging-activity-id": [ "6cd1b03d-757d-4a56-a35b-ec6e01a0648e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T06:17:29" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "ecb10f27-f4d1-4044-a7c5-8ae5dfc3f55b" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T061729Z:ecb10f27-f4d1-4044-a7c5-8ae5dfc3f55b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:36:59 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 893108AD1DA14D5D91DCC600E12E05FF Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:27Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:28 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "929" ], + "Content-Length": [ "931" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription4\",\"name\":\"subscription4\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T14:36:59.7879871Z\",\"updatedAt\":\"2023-02-19T14:36:59.7879871Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P5D\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription4\",\"name\":\"subscription4\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T06:17:29.4804765Z\",\"updatedAt\":\"2024-04-30T06:17:29.4804765Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P5D\"}}", "isContentBase64": false } }, - "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription4?api-version=2022-10-01-preview+21": { + "Set-AzServiceBusSubscription+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription4?api-version=2022-10-01-preview+21": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription4?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription4?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "512" ], - "x-ms-client-request-id": [ "0d1a0268-2b35-4912-b5df-be85ee6c2368" ], + "x-ms-unique-id": [ "449" ], + "x-ms-client-request-id": [ "c98278d8-36b8-49c8-93b2-ac836a23567e" ], "CommandName": [ "Get-AzServiceBusSubscription" ], "FullCommandName": [ "Get-AzServiceBusSubscription_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1023,21 +1153,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11882" ], - "x-ms-request-id": [ "32c61f40-9c59-46a9-8692-1d6d09f18329" ], - "x-ms-correlation-request-id": [ "32c61f40-9c59-46a9-8692-1d6d09f18329" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143700Z:32c61f40-9c59-46a9-8692-1d6d09f18329" ], + "x-ms-correlation-request-id": [ "e7e8df83-3db0-45c4-9cb4-562e75ba7f8c" ], + "x-ms-client-request-id": [ "c98278d8-36b8-49c8-93b2-ac836a23567e_RP" ], + "x-ms-messaging-activity-id": [ "df3a1f57-f6c9-4c5e-8146-e935c28c2093" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T06:17:30" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "e7e8df83-3db0-45c4-9cb4-562e75ba7f8c" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061730Z:e7e8df83-3db0-45c4-9cb4-562e75ba7f8c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:00 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F560C81E51CA4049A1805895A721705A Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:29Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:29 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "933" ], + "Content-Length": [ "936" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topic1/subscriptions/subscription4\",\"name\":\"subscription4\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2023-02-19T14:36:58.659415Z\",\"updatedAt\":\"2023-02-19T14:36:59.8000024Z\",\"accessedAt\":\"2023-02-19T14:36:58.659Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P5D\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topic1/subscriptions/subscription4\",\"name\":\"subscription4\",\"type\":\"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\"location\":\"eastus\",\"properties\":{\"isClientAffine\":false,\"lockDuration\":\"PT1M\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"status\":\"Active\",\"enableBatchedOperations\":true,\"createdAt\":\"2024-04-30T06:17:25.7253761Z\",\"updatedAt\":\"2024-04-30T06:17:29.4764556Z\",\"accessedAt\":\"2024-04-30T06:17:25.725Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"P5D\"}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusSubscription.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusSubscription.Tests.ps1 index c099a0b8ae78..efbda39c5dd1 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusSubscription.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusSubscription.Tests.ps1 @@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzServiceBusSubscription' } function AssertSubscriptionUpdates{ - param([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription]$expectedSub,[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription]$actualSub) + param([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription]$expectedSub,[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription]$actualSub) $expectedSub.Name | Should -Be $actualSub.Name $expectedSub.ResourceGroupName | Should -Be $actualSub.ResourceGroupName $expectedSub.DeadLetteringOnMessageExpiration | Should -Be $actualSub.DeadLetteringOnMessageExpiration @@ -98,6 +98,6 @@ Describe 'Set-AzServiceBusSubscription' { AssertSubscriptionUpdates $currentSub $updatedSub $currentSub = $updatedSub - { Set-AzServiceBusSubscription -InputObject $currentSub } | Should -Throw 'Please specify the property you want to update on the -InputObject' + { Set-AzServiceBusSubscription -InputObject $currentSub -ErrorAction Stop } | Should -Throw 'Please specify the property you want to update on the -InputObject' } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusTopic.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusTopic.Recording.json index 8b89b2e701ff..774ed464eed3 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusTopic.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusTopic.Recording.json @@ -1,8 +1,8 @@ { - "Set-AzServiceBusTopic+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusTopic+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -17,37 +17,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1141" ], - "x-ms-request-id": [ "5085d124-274b-48bc-a222-291da78e6b22" ], - "x-ms-correlation-request-id": [ "5085d124-274b-48bc-a222-291da78e6b22" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143716Z:5085d124-274b-48bc-a222-291da78e6b22" ], + "x-ms-correlation-request-id": [ "6301fc5c-f5fc-4681-8f6d-a3dd8971695b" ], + "x-ms-client-request-id": [ "40b582f5-547c-445d-a256-14f30e493b22_RP" ], + "x-ms-messaging-activity-id": [ "3c508335-2c70-4346-b60e-9ba4315d2c5e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T06:17:47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "6301fc5c-f5fc-4681-8f6d-a3dd8971695b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061747Z:6301fc5c-f5fc-4681-8f6d-a3dd8971695b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:16 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E601FA45AA944DBF9C0437600284C510 Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:44Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:46 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "959" ], + "Content-Length": [ "962" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T14:37:16.13Z\",\"updatedAt\":\"2023-02-19T14:37:16.24Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T06:17:46.887Z\",\"updatedAt\":\"2024-04-30T06:17:47.04Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusTopic+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "514" ], - "x-ms-client-request-id": [ "77da0583-64ef-4753-a53c-d392cb3a012d" ], + "x-ms-unique-id": [ "451" ], + "x-ms-client-request-id": [ "36c0ea1a-ff53-4b06-bdd9-00582a39c1d2" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -58,28 +63,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11881" ], - "x-ms-request-id": [ "72d934ef-bcef-4974-b9e0-68a756f4954e" ], - "x-ms-correlation-request-id": [ "72d934ef-bcef-4974-b9e0-68a756f4954e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143717Z:72d934ef-bcef-4974-b9e0-68a756f4954e" ], + "x-ms-correlation-request-id": [ "7ed1b5e7-2954-4054-af72-4205ed81f48b" ], + "x-ms-client-request-id": [ "36c0ea1a-ff53-4b06-bdd9-00582a39c1d2_RP" ], + "x-ms-messaging-activity-id": [ "cdd8a0f9-114f-43b5-ba76-fb3ba63492e8" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T06:17:49" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "7ed1b5e7-2954-4054-af72-4205ed81f48b" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061749Z:7ed1b5e7-2954-4054-af72-4205ed81f48b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:16 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C3E0F10C33AF40B99E8FF8F59EF3C75F Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:47Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:48 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "960" ], + "Content-Length": [ "963" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T14:37:16.13Z\",\"updatedAt\":\"2023-02-19T14:37:16.24Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T06:17:46.887Z\",\"updatedAt\":\"2024-04-30T06:17:47.04Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusTopic+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"defaultMessageTimeToLive\": \"P7D\",\n \"maxSizeInMegabytes\": 1024,\n \"maxMessageSizeInKilobytes\": 1024,\n \"requiresDuplicateDetection\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"enableBatchedOperations\": true,\n \"status\": \"Active\",\n \"supportOrdering\": true,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -94,37 +104,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1140" ], - "x-ms-request-id": [ "8bb0016b-ea76-4449-bfe1-2ce146e21c0e" ], - "x-ms-correlation-request-id": [ "8bb0016b-ea76-4449-bfe1-2ce146e21c0e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143717Z:8bb0016b-ea76-4449-bfe1-2ce146e21c0e" ], + "x-ms-correlation-request-id": [ "90f554ca-adf2-4581-96d3-5f6d67967b6a" ], + "x-ms-client-request-id": [ "4dfe371c-e9f9-4f9e-b883-2ff53cc5bcb2_RP" ], + "x-ms-messaging-activity-id": [ "d705e018-e063-4eaa-bc76-3429420ef680" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T06:17:49" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-request-id": [ "90f554ca-adf2-4581-96d3-5f6d67967b6a" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061749Z:90f554ca-adf2-4581-96d3-5f6d67967b6a" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:17 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C0AB791399B24D87916707ECE056F0FB Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:49Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:48 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "928" ], + "Content-Length": [ "931" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:17:49Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+3": { + "Set-AzServiceBusTopic+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "516" ], - "x-ms-client-request-id": [ "2ccbd46c-68de-4760-9aa2-05ccfa589e9d" ], + "x-ms-unique-id": [ "453" ], + "x-ms-client-request-id": [ "fc699518-8f40-4fe3-84b7-0207da7b6a87" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -135,28 +150,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11880" ], - "x-ms-request-id": [ "2a30fe44-76a7-4657-80e9-6322efdd3049" ], - "x-ms-correlation-request-id": [ "2a30fe44-76a7-4657-80e9-6322efdd3049" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143718Z:2a30fe44-76a7-4657-80e9-6322efdd3049" ], + "x-ms-correlation-request-id": [ "c51d598f-b42b-4e33-9caf-cee1537c3bec" ], + "x-ms-client-request-id": [ "fc699518-8f40-4fe3-84b7-0207da7b6a87_RP" ], + "x-ms-messaging-activity-id": [ "85a98eaf-b56d-49f0-bec5-128b90fe2fbc" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-30T06:17:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "c51d598f-b42b-4e33-9caf-cee1537c3bec" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061751Z:c51d598f-b42b-4e33-9caf-cee1537c3bec" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:18 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 029AAF79138146E6A75B3B4F692F37DE Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:49Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:50 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "938" ], + "Content-Length": [ "940" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T14:37:16.13Z\",\"updatedAt\":\"2023-02-19T14:37:17.827Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T06:17:46.887Z\",\"updatedAt\":\"2024-04-30T06:17:49.66Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+4": { + "Set-AzServiceBusTopic+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+4": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"defaultMessageTimeToLive\": \"P7D\",\n \"maxSizeInMegabytes\": 1024,\n \"maxMessageSizeInKilobytes\": 1024,\n \"requiresDuplicateDetection\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"enableBatchedOperations\": false,\n \"status\": \"Active\",\n \"supportOrdering\": true,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -171,37 +191,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1139" ], - "x-ms-request-id": [ "1ccdfee4-06ee-4a74-b315-2185719869e4" ], - "x-ms-correlation-request-id": [ "1ccdfee4-06ee-4a74-b315-2185719869e4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143719Z:1ccdfee4-06ee-4a74-b315-2185719869e4" ], + "x-ms-correlation-request-id": [ "92f15446-82cc-485a-88a4-9db496dc244f" ], + "x-ms-client-request-id": [ "9810f3d3-9d8f-4114-814e-c59d7b03dc42_RP" ], + "x-ms-messaging-activity-id": [ "9aacb9c2-1059-47dd-9803-456080b4fe73" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-30T06:17:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], + "x-ms-request-id": [ "92f15446-82cc-485a-88a4-9db496dc244f" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061751Z:92f15446-82cc-485a-88a4-9db496dc244f" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:18 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DD83BE93ADDC4F8D91ABADF34E34291C Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:51Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:51 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "929" ], + "Content-Length": [ "932" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":false,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":false,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:17:51Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+5": { + "Set-AzServiceBusTopic+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "518" ], - "x-ms-client-request-id": [ "fce6291f-090d-4e96-a8d2-459ad2458220" ], + "x-ms-unique-id": [ "455" ], + "x-ms-client-request-id": [ "4d82fba1-caac-4031-b3ad-ee99afc4c78c" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -212,28 +237,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11879" ], - "x-ms-request-id": [ "a2cfb1d3-93ea-4d40-aa80-86e228504e39" ], - "x-ms-correlation-request-id": [ "a2cfb1d3-93ea-4d40-aa80-86e228504e39" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143719Z:a2cfb1d3-93ea-4d40-aa80-86e228504e39" ], + "x-ms-correlation-request-id": [ "4fa50092-533e-4950-b185-fac7f9bf20d4" ], + "x-ms-client-request-id": [ "4d82fba1-caac-4031-b3ad-ee99afc4c78c_RP" ], + "x-ms-messaging-activity-id": [ "1b529479-14e4-43f2-9090-b594d8be11e7" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T06:17:53" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "4fa50092-533e-4950-b185-fac7f9bf20d4" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061753Z:4fa50092-533e-4950-b185-fac7f9bf20d4" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:19 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DAFFC8E9C17440E68ECA74C2165626F3 Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:52Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:52 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "938" ], + "Content-Length": [ "942" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":false,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T14:37:16.13Z\",\"updatedAt\":\"2023-02-19T14:37:18.99Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":false,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T06:17:46.887Z\",\"updatedAt\":\"2024-04-30T06:17:51.873Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+6": { + "Set-AzServiceBusTopic+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+6": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"defaultMessageTimeToLive\": \"P7D\",\n \"maxSizeInMegabytes\": 1024,\n \"maxMessageSizeInKilobytes\": 1024,\n \"requiresDuplicateDetection\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"enableBatchedOperations\": true,\n \"status\": \"Active\",\n \"supportOrdering\": true,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -248,37 +278,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1138" ], - "x-ms-request-id": [ "97014950-e780-4039-8d20-37d9ad0d5b42" ], - "x-ms-correlation-request-id": [ "97014950-e780-4039-8d20-37d9ad0d5b42" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143720Z:97014950-e780-4039-8d20-37d9ad0d5b42" ], + "x-ms-correlation-request-id": [ "88635629-c8f7-4b47-846c-6216536d3245" ], + "x-ms-client-request-id": [ "ebd42c4e-194a-4cf4-9935-64ef8b73c696_RP" ], + "x-ms-messaging-activity-id": [ "ab316f31-a093-488b-9bf1-37b41ffd32b3" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T06:17:55" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-request-id": [ "88635629-c8f7-4b47-846c-6216536d3245" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061755Z:88635629-c8f7-4b47-846c-6216536d3245" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:19 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 93A0068484B04A49914E9AA251F032B8 Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:53Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:54 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "928" ], + "Content-Length": [ "931" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:17:55Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+1": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "520" ], - "x-ms-client-request-id": [ "f4155ecf-7a06-4066-991e-ec7d96dfc62a" ], + "x-ms-unique-id": [ "457" ], + "x-ms-client-request-id": [ "e40c2f1d-2576-430a-a255-7749f8ea1993" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -289,37 +324,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11878" ], - "x-ms-request-id": [ "8dfcd5ff-9da8-4195-a706-31c13ff0787a" ], - "x-ms-correlation-request-id": [ "8dfcd5ff-9da8-4195-a706-31c13ff0787a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143721Z:8dfcd5ff-9da8-4195-a706-31c13ff0787a" ], + "x-ms-correlation-request-id": [ "3b07a60f-141c-4d2d-8a60-e56e516043fa" ], + "x-ms-client-request-id": [ "e40c2f1d-2576-430a-a255-7749f8ea1993_RP" ], + "x-ms-messaging-activity-id": [ "bd85346f-9bb4-44c9-8ae7-51eab6a8b190" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:17:56" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "3b07a60f-141c-4d2d-8a60-e56e516043fa" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061756Z:3b07a60f-141c-4d2d-8a60-e56e516043fa" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:20 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C53114F9100A4268A3D932A1FD434CD0 Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:55Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:55 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "938" ], + "Content-Length": [ "941" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T14:37:16.13Z\",\"updatedAt\":\"2023-02-19T14:37:20.387Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T06:17:46.887Z\",\"updatedAt\":\"2024-04-30T06:17:55.163Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+2": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "521" ], - "x-ms-client-request-id": [ "98ebf166-c6fc-4fd2-aaf0-a9c37949e483" ], + "x-ms-unique-id": [ "458" ], + "x-ms-client-request-id": [ "2720cd9a-ff4c-4abb-bc13-2b24ede3497d" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -330,28 +370,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11877" ], - "x-ms-request-id": [ "7814e1fa-9628-4a3b-bc08-2a3a81730518" ], - "x-ms-correlation-request-id": [ "7814e1fa-9628-4a3b-bc08-2a3a81730518" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143721Z:7814e1fa-9628-4a3b-bc08-2a3a81730518" ], + "x-ms-correlation-request-id": [ "d2f511ae-ef3e-49cd-baff-6e65fec85bef" ], + "x-ms-client-request-id": [ "2720cd9a-ff4c-4abb-bc13-2b24ede3497d_RP" ], + "x-ms-messaging-activity-id": [ "dec6878c-4b79-4d1c-8358-59e93499cf23" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T06:17:58" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "d2f511ae-ef3e-49cd-baff-6e65fec85bef" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061758Z:d2f511ae-ef3e-49cd-baff-6e65fec85bef" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:21 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 785F3B4B442947238641E35172FBC5F4 Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:56Z" ], + "Date": [ "Tue, 30 Apr 2024 06:17:58 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "938" ], + "Content-Length": [ "941" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T14:37:16.13Z\",\"updatedAt\":\"2023-02-19T14:37:20.387Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T06:17:46.887Z\",\"updatedAt\":\"2024-04-30T06:17:55.163Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+3": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+3": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"defaultMessageTimeToLive\": \"P7D\",\n \"maxSizeInMegabytes\": 1024,\n \"maxMessageSizeInKilobytes\": 1024,\n \"requiresDuplicateDetection\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"enableBatchedOperations\": true,\n \"status\": \"Active\",\n \"supportOrdering\": true,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -366,37 +411,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1137" ], - "x-ms-request-id": [ "2ee95a06-91e9-4554-aaf8-1609c1e17ee7" ], - "x-ms-correlation-request-id": [ "2ee95a06-91e9-4554-aaf8-1609c1e17ee7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143722Z:2ee95a06-91e9-4554-aaf8-1609c1e17ee7" ], + "x-ms-correlation-request-id": [ "508457bc-cd28-4912-a1d6-de1f0243e0d8" ], + "x-ms-client-request-id": [ "a6cdd87d-a6d6-4bb8-b054-a52bc69b97db_RP" ], + "x-ms-messaging-activity-id": [ "232ea9bf-19d9-4267-8e42-6304aa35a0ad" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-30T06:18:00" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "508457bc-cd28-4912-a1d6-de1f0243e0d8" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T061800Z:508457bc-cd28-4912-a1d6-de1f0243e0d8" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:21 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 89F7B04A14FA4B41A81A3D5D1AF70FC1 Ref B: SEL221051503025 Ref C: 2024-04-30T06:17:58Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:00 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "892" ], + "Content-Length": [ "941" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T06:17:46.887Z\",\"updatedAt\":\"2024-04-30T06:17:55.163Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+4": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "523" ], - "x-ms-client-request-id": [ "1ba443af-d6d1-4c40-a990-7b1d14f000cd" ], + "x-ms-unique-id": [ "460" ], + "x-ms-client-request-id": [ "7c302c77-6b59-4c68-96b2-3a3c64f128d7" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -407,28 +457,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11876" ], - "x-ms-request-id": [ "22080741-3506-470f-9c97-ff020754c8d1" ], - "x-ms-correlation-request-id": [ "22080741-3506-470f-9c97-ff020754c8d1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143722Z:22080741-3506-470f-9c97-ff020754c8d1" ], + "x-ms-correlation-request-id": [ "3b969733-d7c1-4213-902e-f1b98f447ae7" ], + "x-ms-client-request-id": [ "7c302c77-6b59-4c68-96b2-3a3c64f128d7_RP" ], + "x-ms-messaging-activity-id": [ "786cc9de-cbcb-4665-96e2-c74b981b40a3" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-30T06:18:01" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-request-id": [ "3b969733-d7c1-4213-902e-f1b98f447ae7" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061801Z:3b969733-d7c1-4213-902e-f1b98f447ae7" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:22 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0CCF0983CA924D4FABDAC52493588C1E Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:00Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:01 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "938" ], + "Content-Length": [ "941" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T14:37:16.13Z\",\"updatedAt\":\"2023-02-19T14:37:20.387Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T06:17:46.887Z\",\"updatedAt\":\"2024-04-30T06:17:55.163Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+5": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+5": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"defaultMessageTimeToLive\": \"P7D\",\n \"maxSizeInMegabytes\": 1024,\n \"maxMessageSizeInKilobytes\": 1024,\n \"requiresDuplicateDetection\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"enableBatchedOperations\": true,\n \"status\": \"Active\",\n \"supportOrdering\": false,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -443,37 +498,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1136" ], - "x-ms-request-id": [ "72a039d0-ec81-4e12-9572-4b4919b6afc7" ], - "x-ms-correlation-request-id": [ "72a039d0-ec81-4e12-9572-4b4919b6afc7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143723Z:72a039d0-ec81-4e12-9572-4b4919b6afc7" ], + "x-ms-correlation-request-id": [ "35c23488-c5fb-45b8-92f7-1ac574c5458d" ], + "x-ms-client-request-id": [ "83bf5094-8c6f-4a27-af44-0923333a1d9e_RP" ], + "x-ms-messaging-activity-id": [ "ecd82909-0567-43e8-83fb-22171e18dce4" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:18:03" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-request-id": [ "35c23488-c5fb-45b8-92f7-1ac574c5458d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061803Z:35c23488-c5fb-45b8-92f7-1ac574c5458d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:22 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E4069CE1A9EC45BA8C598FB1F35C1312 Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:01Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:03 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "929" ], + "Content-Length": [ "932" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:18:03Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+6": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "525" ], - "x-ms-client-request-id": [ "deb87ab2-f2fd-4df1-ae2c-76bc7125cb0b" ], + "x-ms-unique-id": [ "462" ], + "x-ms-client-request-id": [ "a3c003fd-bcd9-4e32-b768-37377f4536f4" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -484,28 +544,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11875" ], - "x-ms-request-id": [ "965f5bb2-f4b2-4757-a057-a7d68ad62b04" ], - "x-ms-correlation-request-id": [ "965f5bb2-f4b2-4757-a057-a7d68ad62b04" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143723Z:965f5bb2-f4b2-4757-a057-a7d68ad62b04" ], + "x-ms-correlation-request-id": [ "0bc61ded-ac8a-4b43-82f3-e135daad2139" ], + "x-ms-client-request-id": [ "a3c003fd-bcd9-4e32-b768-37377f4536f4_RP" ], + "x-ms-messaging-activity-id": [ "c1143902-0de4-41e6-ba5a-43a842ab9db3" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-30T06:18:05" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "0bc61ded-ac8a-4b43-82f3-e135daad2139" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240430T061805Z:0bc61ded-ac8a-4b43-82f3-e135daad2139" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:23 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 199838277AE14E0088993E7E1AA7E88F Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:03Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "939" ], + "Content-Length": [ "942" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T14:37:16.13Z\",\"updatedAt\":\"2023-02-19T14:37:23.247Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T06:17:46.887Z\",\"updatedAt\":\"2024-04-30T06:18:03.347Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+7": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+7": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"defaultMessageTimeToLive\": \"P7D\",\n \"maxSizeInMegabytes\": 2048,\n \"maxMessageSizeInKilobytes\": 1024,\n \"requiresDuplicateDetection\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"enableBatchedOperations\": true,\n \"status\": \"Active\",\n \"supportOrdering\": false,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -520,37 +585,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1135" ], - "x-ms-request-id": [ "c4ded249-19f8-4321-8574-636e7296d4db" ], - "x-ms-correlation-request-id": [ "c4ded249-19f8-4321-8574-636e7296d4db" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143724Z:c4ded249-19f8-4321-8574-636e7296d4db" ], + "x-ms-correlation-request-id": [ "0ecd23f8-c9ac-492e-b798-cf777fffe23e" ], + "x-ms-client-request-id": [ "3d4bc756-e77a-41d4-a54f-e465ce94be77_RP" ], + "x-ms-messaging-activity-id": [ "6b82bfe4-4ad4-4c43-90e7-12fcbfcd6acb" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T06:18:06" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "0ecd23f8-c9ac-492e-b798-cf777fffe23e" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061806Z:0ecd23f8-c9ac-492e-b798-cf777fffe23e" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:23 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D7FDAF1D13F34580937DE260F37D517F Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:05Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:06 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "929" ], + "Content-Length": [ "932" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:18:06Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+8": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "527" ], - "x-ms-client-request-id": [ "32807631-cbe7-45ca-b3e1-54654ad63994" ], + "x-ms-unique-id": [ "464" ], + "x-ms-client-request-id": [ "9581b77e-6aad-4683-b4db-53b76e7f50cb" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -561,28 +631,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11874" ], - "x-ms-request-id": [ "65c8ad73-6e8a-407d-9d65-da6615dc807c" ], - "x-ms-correlation-request-id": [ "65c8ad73-6e8a-407d-9d65-da6615dc807c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143725Z:65c8ad73-6e8a-407d-9d65-da6615dc807c" ], + "x-ms-correlation-request-id": [ "179aa4ba-3ba7-4782-aec7-8b51513bfc52" ], + "x-ms-client-request-id": [ "9581b77e-6aad-4683-b4db-53b76e7f50cb_RP" ], + "x-ms-messaging-activity-id": [ "fdc6b947-f684-4487-a39b-85fb5db4095f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:18:08" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "179aa4ba-3ba7-4782-aec7-8b51513bfc52" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061808Z:179aa4ba-3ba7-4782-aec7-8b51513bfc52" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:24 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7A8C039100F042D48DD89E5851AE319F Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:06Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:08 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "938" ], + "Content-Length": [ "942" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T14:37:16.13Z\",\"updatedAt\":\"2023-02-19T14:37:24.38Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T06:17:46.887Z\",\"updatedAt\":\"2024-04-30T06:18:06.673Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+9": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+9": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"defaultMessageTimeToLive\": \"P7D\",\n \"maxSizeInMegabytes\": 2048,\n \"maxMessageSizeInKilobytes\": 1024,\n \"requiresDuplicateDetection\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"enableBatchedOperations\": true,\n \"status\": \"Active\",\n \"supportOrdering\": false,\n \"autoDeleteOnIdle\": \"P428DT3H11M2S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -597,37 +672,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1134" ], - "x-ms-request-id": [ "05d72053-02d7-4818-92e4-e41df67c87d2" ], - "x-ms-correlation-request-id": [ "05d72053-02d7-4818-92e4-e41df67c87d2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143725Z:05d72053-02d7-4818-92e4-e41df67c87d2" ], + "x-ms-correlation-request-id": [ "aec41cde-24b3-4a8b-9368-cce5d9e990d6" ], + "x-ms-client-request-id": [ "8021d432-aaf1-43d5-ace8-7233b6883e00_RP" ], + "x-ms-messaging-activity-id": [ "4acc7961-f5f7-4a25-afed-8a51fa6be102" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-30T06:18:10" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "aec41cde-24b3-4a8b-9368-cce5d9e990d6" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061810Z:aec41cde-24b3-4a8b-9368-cce5d9e990d6" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:25 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DE9512A3FA534326874D8DBEB22A29CB Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:08Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:10 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "916" ], + "Content-Length": [ "919" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P428DT3H11M2S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P428DT3H11M2S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:18:10Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+10": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "529" ], - "x-ms-client-request-id": [ "753e7003-847d-4fe0-ad5d-cd122313396f" ], + "x-ms-unique-id": [ "466" ], + "x-ms-client-request-id": [ "22725a62-1b6a-4cf0-96b2-d478f59c3198" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -638,28 +718,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11873" ], - "x-ms-request-id": [ "d7f8ea0c-381e-4478-a76b-8a4faa5951ab" ], - "x-ms-correlation-request-id": [ "d7f8ea0c-381e-4478-a76b-8a4faa5951ab" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143726Z:d7f8ea0c-381e-4478-a76b-8a4faa5951ab" ], + "x-ms-correlation-request-id": [ "a2a7fe58-c369-427f-9f94-6c01ed13f066" ], + "x-ms-client-request-id": [ "22725a62-1b6a-4cf0-96b2-d478f59c3198_RP" ], + "x-ms-messaging-activity-id": [ "578900e4-762b-4fa8-bf97-c7ae67389818" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-30T06:18:11" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "a2a7fe58-c369-427f-9f94-6c01ed13f066" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061811Z:a2a7fe58-c369-427f-9f94-6c01ed13f066" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:25 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F4440F6EF663446080FC919CECADEC66 Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:10Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "924" ], + "Content-Length": [ "929" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P428DT3H11M2S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T14:37:16.13Z\",\"updatedAt\":\"2023-02-19T14:37:25.8Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P428DT3H11M2S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T06:17:46.887Z\",\"updatedAt\":\"2024-04-30T06:18:10.253Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+11": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+11": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"defaultMessageTimeToLive\": \"P7D\",\n \"maxSizeInMegabytes\": 2048,\n \"maxMessageSizeInKilobytes\": 1024,\n \"requiresDuplicateDetection\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"enableBatchedOperations\": true,\n \"status\": \"SendDisabled\",\n \"supportOrdering\": false,\n \"autoDeleteOnIdle\": \"P428DT3H11M2S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -674,37 +759,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1133" ], - "x-ms-request-id": [ "36f652f5-88f1-44e6-b3df-21a567357372" ], - "x-ms-correlation-request-id": [ "36f652f5-88f1-44e6-b3df-21a567357372" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143727Z:36f652f5-88f1-44e6-b3df-21a567357372" ], + "x-ms-correlation-request-id": [ "97f2eebd-b2a7-49d9-9fdb-b65e447ba9b3" ], + "x-ms-client-request-id": [ "15874d23-4bac-4a6a-afb8-513691ceed81_RP" ], + "x-ms-messaging-activity-id": [ "1b33fba9-c791-465b-92f7-8732833d2456" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-30T06:18:13" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "97f2eebd-b2a7-49d9-9fdb-b65e447ba9b3" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061813Z:97f2eebd-b2a7-49d9-9fdb-b65e447ba9b3" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:26 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E5578417FC8F42718E0715B8169CB55C Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:12Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:13 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "922" ], + "Content-Length": [ "925" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"SendDisabled\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P428DT3H11M2S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"SendDisabled\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P428DT3H11M2S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:18:13Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+12": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+12": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "531" ], - "x-ms-client-request-id": [ "40f201f6-5116-4f6c-a4d6-bb6b492011e8" ], + "x-ms-unique-id": [ "468" ], + "x-ms-client-request-id": [ "3f79c918-5e08-430f-a821-201512be8c1d" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -715,28 +805,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11872" ], - "x-ms-request-id": [ "38dae63d-f891-4393-86e8-ba8471e90255" ], - "x-ms-correlation-request-id": [ "38dae63d-f891-4393-86e8-ba8471e90255" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143727Z:38dae63d-f891-4393-86e8-ba8471e90255" ], + "x-ms-correlation-request-id": [ "8f391978-ae15-4ca6-bc18-9bb936639122" ], + "x-ms-client-request-id": [ "3f79c918-5e08-430f-a821-201512be8c1d_RP" ], + "x-ms-messaging-activity-id": [ "6e14a12f-2c85-4789-a141-ccdd3623050d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-30T06:18:15" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "8f391978-ae15-4ca6-bc18-9bb936639122" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061815Z:8f391978-ae15-4ca6-bc18-9bb936639122" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:26 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 98EF9F73EBA842B99B65B20D2545EE6D Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:13Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:15 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "931" ], + "Content-Length": [ "934" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"SendDisabled\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P428DT3H11M2S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T14:37:16.13Z\",\"updatedAt\":\"2023-02-19T14:37:26.95Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"SendDisabled\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P428DT3H11M2S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T06:17:46.887Z\",\"updatedAt\":\"2024-04-30T06:18:13.69Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview+13": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview+13": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"defaultMessageTimeToLive\": \"P7D\",\n \"maxSizeInMegabytes\": 2048,\n \"maxMessageSizeInKilobytes\": 1024,\n \"requiresDuplicateDetection\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT3M\",\n \"enableBatchedOperations\": true,\n \"status\": \"SendDisabled\",\n \"supportOrdering\": false,\n \"autoDeleteOnIdle\": \"P428DT3H11M2S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -751,37 +846,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1132" ], - "x-ms-request-id": [ "88188b25-2807-4276-a211-70e64bbd691e" ], - "x-ms-correlation-request-id": [ "88188b25-2807-4276-a211-70e64bbd691e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143728Z:88188b25-2807-4276-a211-70e64bbd691e" ], + "x-ms-correlation-request-id": [ "ea1cd17e-a988-4df0-b332-74b7cda1747b" ], + "x-ms-client-request-id": [ "34989b64-1263-4414-bf79-4316d6d2819b_RP" ], + "x-ms-messaging-activity-id": [ "40d2308a-494e-4bd6-b106-bad7e4931d43" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:18:16" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], + "x-ms-request-id": [ "ea1cd17e-a988-4df0-b332-74b7cda1747b" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061817Z:ea1cd17e-a988-4df0-b332-74b7cda1747b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:27 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 502ABB19964F437E919D73871AC559E4 Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:15Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:17 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "921" ], + "Content-Length": [ "924" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT3M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"SendDisabled\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P428DT3H11M2S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/topics/topicToUpdate\",\"name\":\"topicToUpdate\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":1024,\"defaultMessageTimeToLive\":\"P7D\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT3M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"SendDisabled\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"P428DT3H11M2S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:18:16Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1?api-version=2022-10-01-preview+14": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1?api-version=2022-10-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "533" ], - "x-ms-client-request-id": [ "1a728501-3b48-4512-aeb9-2fd7d28e7b61" ], + "x-ms-unique-id": [ "470" ], + "x-ms-client-request-id": [ "769274d2-ecc2-48eb-823c-5469a449a1af" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -792,37 +892,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11871" ], - "x-ms-request-id": [ "38a94698-fb31-4183-9349-32698c8be719" ], - "x-ms-correlation-request-id": [ "38a94698-fb31-4183-9349-32698c8be719" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143729Z:38a94698-fb31-4183-9349-32698c8be719" ], + "x-ms-correlation-request-id": [ "0c1e0187-0e5c-4e5a-ad3f-772decef81e1" ], + "x-ms-client-request-id": [ "769274d2-ecc2-48eb-823c-5469a449a1af_RP" ], + "x-ms-messaging-activity-id": [ "134a49b2-88af-4324-8bad-b12428d6315c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T06:18:18" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "0c1e0187-0e5c-4e5a-ad3f-772decef81e1" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061818Z:0c1e0187-0e5c-4e5a-ad3f-772decef81e1" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:28 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 11D13FD739B94C45984917823905586C Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:17Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:18 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "954" ], + "Content-Length": [ "956" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"createdAt\":\"2023-02-19T13:48:04.8237948Z\",\"updatedAt\":\"2023-02-19T13:48:04.8237948Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"createdAt\":\"2024-04-30T05:32:33.4805334Z\",\"updatedAt\":\"2024-04-30T05:32:33.4962039Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1?api-version=2022-10-01-preview+15": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1?api-version=2022-10-01-preview+15": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "534" ], - "x-ms-client-request-id": [ "d436c511-e646-4449-ab14-e4aa13833642" ], + "x-ms-unique-id": [ "471" ], + "x-ms-client-request-id": [ "305f2b54-0047-4901-84cc-7d0f4f8707f3" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -833,28 +938,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11870" ], - "x-ms-request-id": [ "5a4c1049-cf21-4da5-81a9-9f91981b06dd" ], - "x-ms-correlation-request-id": [ "5a4c1049-cf21-4da5-81a9-9f91981b06dd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143729Z:5a4c1049-cf21-4da5-81a9-9f91981b06dd" ], + "x-ms-correlation-request-id": [ "0b469f9c-859e-4467-8449-cbf48022b001" ], + "x-ms-client-request-id": [ "305f2b54-0047-4901-84cc-7d0f4f8707f3_RP" ], + "x-ms-messaging-activity-id": [ "90733b61-339e-4a4f-8331-32a2e9368fe5" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:18:20" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "0b469f9c-859e-4467-8449-cbf48022b001" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061820Z:0b469f9c-859e-4467-8449-cbf48022b001" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:28 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 89334A886B644E6DAFC6712784BDA2BB Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:18Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:20 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "954" ], + "Content-Length": [ "956" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"createdAt\":\"2023-02-19T13:48:04.8237948Z\",\"updatedAt\":\"2023-02-19T13:48:04.8237948Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"createdAt\":\"2024-04-30T05:32:33.4805334Z\",\"updatedAt\":\"2024-04-30T05:32:33.4962039Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1?api-version=2022-10-01-preview+16": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1?api-version=2022-10-01-preview+16": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"defaultMessageTimeToLive\": \"P10675199DT2H48M5.4775807S\",\n \"maxSizeInMegabytes\": 1024,\n \"maxMessageSizeInKilobytes\": 256,\n \"requiresDuplicateDetection\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"enableBatchedOperations\": true,\n \"status\": \"Active\",\n \"supportOrdering\": true,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": false\n }\n}", "isContentBase64": false, "Headers": { @@ -869,37 +979,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1131" ], - "x-ms-request-id": [ "4f4beaf4-443b-4b3b-abe8-f9816fa76cd4" ], - "x-ms-correlation-request-id": [ "4f4beaf4-443b-4b3b-abe8-f9816fa76cd4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143730Z:4f4beaf4-443b-4b3b-abe8-f9816fa76cd4" ], + "x-ms-correlation-request-id": [ "ce22d200-3e6f-4a4c-973b-bcd3d018b5b5" ], + "x-ms-client-request-id": [ "c229c824-d1b4-4b98-98b1-d083ee111017_RP" ], + "x-ms-messaging-activity-id": [ "90a91691-156d-4b31-82ae-13ea3d8aacd5" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T06:18:22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], + "x-ms-request-id": [ "ce22d200-3e6f-4a4c-973b-bcd3d018b5b5" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061822Z:ce22d200-3e6f-4a4c-973b-bcd3d018b5b5" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:29 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BB978048C6AE466C8693E45AA8779318 Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:20Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:22 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "936" ], + "Content-Length": [ "939" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:18:21Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1?api-version=2022-10-01-preview+17": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1?api-version=2022-10-01-preview+17": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "536" ], - "x-ms-client-request-id": [ "d9ef83f0-059a-415e-a828-167b9d88234c" ], + "x-ms-unique-id": [ "473" ], + "x-ms-client-request-id": [ "c36fe3de-e90b-47a7-bd77-eb77ff3eeec6" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -910,28 +1025,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11869" ], - "x-ms-request-id": [ "8b8e3c66-1a15-4027-b485-1f407ac4b196" ], - "x-ms-correlation-request-id": [ "8b8e3c66-1a15-4027-b485-1f407ac4b196" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143731Z:8b8e3c66-1a15-4027-b485-1f407ac4b196" ], + "x-ms-correlation-request-id": [ "99c89535-067c-46c0-9007-9833afa6dec6" ], + "x-ms-client-request-id": [ "c36fe3de-e90b-47a7-bd77-eb77ff3eeec6_RP" ], + "x-ms-messaging-activity-id": [ "94884462-ef2b-4b18-8bb4-06049807f4eb" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-30T06:18:22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "99c89535-067c-46c0-9007-9833afa6dec6" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061822Z:99c89535-067c-46c0-9007-9833afa6dec6" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:30 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C44F7439627C4BD794F794365234DD6B Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:22Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:22 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "955" ], + "Content-Length": [ "957" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2023-02-19T13:48:04.8237948Z\",\"updatedAt\":\"2023-02-19T14:37:30.2353926Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":false,\"createdAt\":\"2024-04-30T05:32:33.4805334Z\",\"updatedAt\":\"2024-04-30T06:18:21.9934021Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1?api-version=2022-10-01-preview+18": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1?api-version=2022-10-01-preview+18": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1?api-version=2022-10-01-preview", "Content": "{\n \"properties\": {\n \"defaultMessageTimeToLive\": \"P10675199DT2H48M5.4775807S\",\n \"maxSizeInMegabytes\": 1024,\n \"maxMessageSizeInKilobytes\": 256,\n \"requiresDuplicateDetection\": false,\n \"duplicateDetectionHistoryTimeWindow\": \"PT10M\",\n \"enableBatchedOperations\": true,\n \"status\": \"Active\",\n \"supportOrdering\": true,\n \"autoDeleteOnIdle\": \"P10675199DT2H48M5.4775807S\",\n \"enablePartitioning\": false,\n \"enableExpress\": true\n }\n}", "isContentBase64": false, "Headers": { @@ -946,37 +1066,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1130" ], - "x-ms-request-id": [ "aee190f1-c962-460d-b65c-a9eaf276c777" ], - "x-ms-correlation-request-id": [ "aee190f1-c962-460d-b65c-a9eaf276c777" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143731Z:aee190f1-c962-460d-b65c-a9eaf276c777" ], + "x-ms-correlation-request-id": [ "22d19a36-fb8f-4b9f-b838-63d4b2f3977c" ], + "x-ms-client-request-id": [ "aef06dba-743b-4291-ab45-abcd9fc075e8_RP" ], + "x-ms-messaging-activity-id": [ "588edd3e-28c5-4073-9305-7c43fb2815bc" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T06:18:24" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "22d19a36-fb8f-4b9f-b838-63d4b2f3977c" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061824Z:22d19a36-fb8f-4b9f-b838-63d4b2f3977c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:30 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 97597C4D763244DAA8CF3D3D1843D680 Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:22Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:24 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "935" ], + "Content-Length": [ "938" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-30T06:18:24Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } }, - "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1?api-version=2022-10-01-preview+19": { + "Set-AzServiceBusTopic+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1?api-version=2022-10-01-preview+19": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "538" ], - "x-ms-client-request-id": [ "ee148910-e496-4cb0-836b-029436aa988c" ], + "x-ms-unique-id": [ "475" ], + "x-ms-client-request-id": [ "7290cef7-5430-4597-af4e-41cd6afb234b" ], "CommandName": [ "Get-AzServiceBusTopic" ], "FullCommandName": [ "Get-AzServiceBusTopic_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -987,21 +1112,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11868" ], - "x-ms-request-id": [ "51795977-6eb8-4815-8522-dbe8eb2086b9" ], - "x-ms-correlation-request-id": [ "51795977-6eb8-4815-8522-dbe8eb2086b9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143732Z:51795977-6eb8-4815-8522-dbe8eb2086b9" ], + "x-ms-correlation-request-id": [ "7305c7af-f41b-45ea-8566-9a8b18d3dc85" ], + "x-ms-client-request-id": [ "7290cef7-5430-4597-af4e-41cd6afb234b_RP" ], + "x-ms-messaging-activity-id": [ "4772c12a-8264-4cd0-b690-54ee2d08ac38" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-30T06:18:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "7305c7af-f41b-45ea-8566-9a8b18d3dc85" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061825Z:7305c7af-f41b-45ea-8566-9a8b18d3dc85" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:31 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D61821748D1541F1942B3F47A52EDC44 Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:24Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:25 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "954" ], + "Content-Length": [ "956" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNametkv0jq/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"createdAt\":\"2023-02-19T13:48:04.8237948Z\",\"updatedAt\":\"2023-02-19T14:37:31.6104051Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNamep0j7ix/topics/topic1\",\"name\":\"topic1\",\"type\":\"Microsoft.ServiceBus/namespaces/topics\",\"location\":\"eastus\",\"properties\":{\"maxMessageSizeInKilobytes\":256,\"defaultMessageTimeToLive\":\"P10675199DT2H48M5.4775807S\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"PT10M\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"P10675199DT2H48M5.4775807S\",\"enablePartitioning\":false,\"enableExpress\":true,\"createdAt\":\"2024-04-30T05:32:33.4805334Z\",\"updatedAt\":\"2024-04-30T06:18:24.5403207Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"subscriptionCount\":0,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0}}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusTopic.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusTopic.Tests.ps1 index 311986642c9a..8c7181906620 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusTopic.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Set-AzServiceBusTopic.Tests.ps1 @@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzServiceBusTopic')) } function AssertTopicUpdates{ - param([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic]$expectedTopic,[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic]$actualTopic) + param([Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic]$expectedTopic,[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic]$actualTopic) $expectedTopic.Name | Should -Be $actualTopic.Name $expectedTopic.ResourceGroupName | Should -Be $actualTopic.ResourceGroupName $expectedTopic.MaxSizeInMegabytes | Should -Be $actualTopic.MaxSizeInMegabytes @@ -94,6 +94,6 @@ Describe 'Set-AzServiceBusTopic' { AssertTopicUpdates $currentTopic $updatedTopic $currentTopic = $updatedTopic - { Set-AzServiceBusTopic -InputObject $currentTopic } | Should -Throw 'Please specify the property you want to update on the -InputObject' + { Set-AzServiceBusTopic -InputObject $currentTopic -ErrorAction Stop } | Should -Throw 'Please specify the property you want to update on the -InputObject' } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Start-AzServiceBusMigration.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Start-AzServiceBusMigration.Recording.json index 2832689d6146..cfd605f2806c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Start-AzServiceBusMigration.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Start-AzServiceBusMigration.Recording.json @@ -1,15 +1,15 @@ { - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+1": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"targetNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\n \"postMigrationName\": \"postMigration2i9j5p\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"targetNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\n \"postMigrationName\": \"postMigrationmsdlz3\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "253" ] + "Content-Length": [ "255" ] } }, "Response": { @@ -17,81 +17,41 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "cbd13829-3a3c-4c46-b3d5-6b0baeffdfec_M6CH3_M6CH3" ], + "x-ms-request-id": [ "02e03039-b7a0-4e88-8d30-4cb0f76a24fd_M0CH3_M0CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1129" ], - "x-ms-correlation-request-id": [ "8ede765d-2a27-4f28-a0c5-d4ba4a6987d0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143754Z:8ede765d-2a27-4f28-a0c5-d4ba4a6987d0" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:37:54 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "577" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"migrationState\":\"Initiating\"}}", - "isContentBase64": false - } - }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "540" ], - "x-ms-client-request-id": [ "539cdc0f-b661-4140-ab29-ae577bfda6e7" ], - "CommandName": [ "Start-AzServiceBusMigration" ], - "FullCommandName": [ "Start-AzServiceBusMigration_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1d6eec13-f392-441d-b217-900fac34a421_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11867" ], - "x-ms-correlation-request-id": [ "3df7d84e-00cb-4b24-8d63-56af805c0163" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143825Z:3df7d84e-00cb-4b24-8d63-56af805c0163" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-correlation-request-id": [ "7951d987-386a-4376-97ea-682b2172d825" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061849Z:7951d987-386a-4376-97ea-682b2172d825" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:38:25 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FB602DE73EE04512879B776CBEF7DB46 Ref B: SEL221051503025 Ref C: 2024-04-30T06:18:39Z" ], + "Date": [ "Tue, 30 Apr 2024 06:18:49 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "577" ], + "Content-Length": [ "581" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"migrationState\":\"Initiating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"migrationState\":\"Initiating\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+3": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "541" ], - "x-ms-client-request-id": [ "539cdc0f-b661-4140-ab29-ae577bfda6e7" ], + "x-ms-unique-id": [ "477" ], + "x-ms-client-request-id": [ "d8ee797c-194b-4ef3-9025-926cd79e66dd" ], "CommandName": [ "Start-AzServiceBusMigration" ], "FullCommandName": [ "Start-AzServiceBusMigration_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -101,39 +61,41 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "23e2b337-371a-455f-b1a7-ae327ac1e0c5_M6CH3_M6CH3" ], + "x-ms-request-id": [ "ba705b08-8719-49d5-ba90-00200f51620e_M5CH3_M5CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11866" ], - "x-ms-correlation-request-id": [ "46e51f44-1964-4f92-bb34-65f66e2f9c4d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143856Z:46e51f44-1964-4f92-bb34-65f66e2f9c4d" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "50e66a88-4819-4d6e-baf6-f60ae584c4df" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T061920Z:50e66a88-4819-4d6e-baf6-f60ae584c4df" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:38:55 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 153B342A9D43418A9C63456DA06DE14F Ref B: SEL221051503025 Ref C: 2024-04-30T06:19:19Z" ], + "Date": [ "Tue, 30 Apr 2024 06:19:20 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "577" ], + "Content-Length": [ "581" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"migrationState\":\"Initiating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"migrationState\":\"Initiating\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+4": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "542" ], - "x-ms-client-request-id": [ "539cdc0f-b661-4140-ab29-ae577bfda6e7" ], + "x-ms-unique-id": [ "478" ], + "x-ms-client-request-id": [ "d8ee797c-194b-4ef3-9025-926cd79e66dd" ], "CommandName": [ "Start-AzServiceBusMigration" ], "FullCommandName": [ "Start-AzServiceBusMigration_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -143,39 +105,41 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "04f3a709-041f-47b8-8a17-ed8f40ccb0e1_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11865" ], - "x-ms-correlation-request-id": [ "7b8d585e-49a0-4ab0-a2e3-f0a01dce7804" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143926Z:7b8d585e-49a0-4ab0-a2e3-f0a01dce7804" ], + "x-ms-request-id": [ "5735a483-d559-4c51-96d0-c35e8d4d796d_M8SN1_M8SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "c1afff55-8c16-49b8-a7c7-69efca42fb5c" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T061952Z:c1afff55-8c16-49b8-a7c7-69efca42fb5c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:39:26 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5A854F7EA5B248E487E06B075F46D8D9 Ref B: SEL221051503025 Ref C: 2024-04-30T06:19:51Z" ], + "Date": [ "Tue, 30 Apr 2024 06:19:52 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "577" ], + "Content-Length": [ "581" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"migrationState\":\"Initiating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"migrationState\":\"Initiating\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+5": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "543" ], - "x-ms-client-request-id": [ "539cdc0f-b661-4140-ab29-ae577bfda6e7" ], + "x-ms-unique-id": [ "479" ], + "x-ms-client-request-id": [ "d8ee797c-194b-4ef3-9025-926cd79e66dd" ], "CommandName": [ "Start-AzServiceBusMigration" ], "FullCommandName": [ "Start-AzServiceBusMigration_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -185,39 +149,41 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6f7496f2-ba22-4c75-8e3a-6548c5a6b701_M10CH3_M10CH3" ], + "x-ms-request-id": [ "885e0362-e376-4ce7-a142-95863aed4cc9_M9CH3_M9CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11864" ], - "x-ms-correlation-request-id": [ "d7fb6648-d0ea-412a-b055-356de1cfb11a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T143958Z:d7fb6648-d0ea-412a-b055-356de1cfb11a" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "ac3c62c9-06ea-49c8-914d-207acb4e9616" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062024Z:ac3c62c9-06ea-49c8-914d-207acb4e9616" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:39:58 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E20982BBD80C42F58BD0C89D32E55FBB Ref B: SEL221051503025 Ref C: 2024-04-30T06:20:22Z" ], + "Date": [ "Tue, 30 Apr 2024 06:20:24 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "612" ], + "Content-Length": [ "616" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Succeeded\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"pendingReplicationOperationsCount\":0,\"migrationState\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Succeeded\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"pendingReplicationOperationsCount\":0,\"migrationState\":\"Active\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+6": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "544" ], - "x-ms-client-request-id": [ "539cdc0f-b661-4140-ab29-ae577bfda6e7" ], + "x-ms-unique-id": [ "480" ], + "x-ms-client-request-id": [ "d8ee797c-194b-4ef3-9025-926cd79e66dd" ], "CommandName": [ "Start-AzServiceBusMigration" ], "FullCommandName": [ "Start-AzServiceBusMigration_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -227,38 +193,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "73ccc188-428b-4d09-868e-a15af096de69_M9CH3_M9CH3" ], + "x-ms-request-id": [ "4115df3e-b185-4201-b8b8-2c3881c658db_M0CH3_M0CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11863" ], - "x-ms-correlation-request-id": [ "9643d30f-f492-4d14-a220-1e636bf9ec10" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144000Z:9643d30f-f492-4d14-a220-1e636bf9ec10" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "7cad0fa4-768e-49f2-a1ee-04db24b1e1dd" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062027Z:7cad0fa4-768e-49f2-a1ee-04db24b1e1dd" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:40:00 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 13BE288909194A2B9C9D7BED0E0B5B8F Ref B: SEL221051503025 Ref C: 2024-04-30T06:20:25Z" ], + "Date": [ "Tue, 30 Apr 2024 06:20:27 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "612" ], + "Content-Length": [ "616" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Succeeded\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"pendingReplicationOperationsCount\":0,\"migrationState\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Succeeded\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"pendingReplicationOperationsCount\":0,\"migrationState\":\"Active\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+7": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "545" ], - "x-ms-client-request-id": [ "ad8714e8-a408-4af6-8668-3138786de994" ], + "x-ms-unique-id": [ "481" ], + "x-ms-client-request-id": [ "d22d7962-70d7-49f2-b269-e85bdbf0d829" ], "CommandName": [ "Get-AzServiceBusMigration" ], "FullCommandName": [ "Get-AzServiceBusMigration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -269,38 +237,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "4c4bfa45-7b9e-43f6-a860-78dac5df7842_M9CH3_M9CH3" ], + "x-ms-request-id": [ "5e0580a9-496b-471e-a7da-c4a686fcc2e3_M4CH3_M4CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11862" ], - "x-ms-correlation-request-id": [ "e23d37a7-f2bc-45d8-8a93-8c449d5b0a0c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144002Z:e23d37a7-f2bc-45d8-8a93-8c449d5b0a0c" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-correlation-request-id": [ "b1b9d041-c657-42f8-a3c7-4b324fe2bcd6" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062029Z:b1b9d041-c657-42f8-a3c7-4b324fe2bcd6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:40:01 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 98E2F3A9E1974A43909EA061127413C7 Ref B: SEL221051503025 Ref C: 2024-04-30T06:20:28Z" ], + "Date": [ "Tue, 30 Apr 2024 06:20:29 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "612" ], + "Content-Length": [ "616" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Succeeded\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"pendingReplicationOperationsCount\":0,\"migrationState\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Succeeded\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"pendingReplicationOperationsCount\":0,\"migrationState\":\"Active\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default/revert?api-version=2022-10-01-preview+8": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default/revert?api-version=2022-10-01-preview+7": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default/revert?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default/revert?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "546" ], - "x-ms-client-request-id": [ "c17601ef-d0a8-4e52-9cd1-f88e455500c1" ], + "x-ms-unique-id": [ "482" ], + "x-ms-client-request-id": [ "91111004-1ea4-4516-a2ee-0a5489c553f9" ], "CommandName": [ "Stop-AzServiceBusMigration" ], "FullCommandName": [ "Stop-AzServiceBusMigration_Revert" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -311,15 +281,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3853c501-7822-41f8-8bf7-187a8c9b6101_M8CH3_M8CH3" ], + "x-ms-request-id": [ "e4b5c1f5-0484-4e77-a0bc-60671b8f995a_M5CH3_M5CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "ace3befe-90ec-40dd-999d-d778bc0f5e5c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144013Z:ace3befe-90ec-40dd-999d-d778bc0f5e5c" ], + "x-ms-correlation-request-id": [ "1afbd6a1-e69e-4107-af80-c447305f5806" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T062041Z:1afbd6a1-e69e-4107-af80-c447305f5806" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:40:13 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EDA822DB5ABD47458E10CAC8082BF574 Ref B: SEL221051503025 Ref C: 2024-04-30T06:20:40Z" ], + "Date": [ "Tue, 30 Apr 2024 06:20:41 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -329,19 +301,19 @@ "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+9": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "547" ], - "x-ms-client-request-id": [ "514ca2c5-6303-4e9e-b353-945c4f03323a" ], + "x-ms-unique-id": [ "483" ], + "x-ms-client-request-id": [ "2ccf6b73-3770-4c8e-b2fb-4f38ea8b91b0" ], "CommandName": [ "Get-AzServiceBusMigration" ], "FullCommandName": [ "Get-AzServiceBusMigration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -352,38 +324,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "56ff3323-7eee-4e12-8d33-72755f50fa34_M8CH3_M8CH3" ], + "x-ms-request-id": [ "a316f86e-2034-4151-bf56-338d32a5e8aa_M10CH3_M10CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11861" ], - "x-ms-correlation-request-id": [ "45f7f529-9062-47ac-a41f-eeb2d9a043be" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144014Z:45f7f529-9062-47ac-a41f-eeb2d9a043be" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "c9ae4a89-2b3a-4ff5-ab6b-d8501da7b4c7" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T062043Z:c9ae4a89-2b3a-4ff5-ab6b-d8501da7b4c7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:40:14 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2E6572AE66E949638B12527671C7CF2C Ref B: SEL221051503025 Ref C: 2024-04-30T06:20:41Z" ], + "Date": [ "Tue, 30 Apr 2024 06:20:43 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "576" ], + "Content-Length": [ "580" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"migrationState\":\"Reverting\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"migrationState\":\"Reverting\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+10": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "548" ], - "x-ms-client-request-id": [ "9402d112-ce03-4cd6-bc5c-a55701924214" ], + "x-ms-unique-id": [ "484" ], + "x-ms-client-request-id": [ "e58f2084-25b1-4db8-b01a-5541e62e5dba" ], "CommandName": [ "Get-AzServiceBusMigration" ], "FullCommandName": [ "Get-AzServiceBusMigration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -394,38 +368,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1f41de12-4488-4028-81e9-f9d1232646f6_M8CH3_M8CH3" ], + "x-ms-request-id": [ "d91119be-d1b1-4c88-8b14-c58a9fa93a3e_M4CH3_M4CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11860" ], - "x-ms-correlation-request-id": [ "cdd30be4-145c-4467-b2d3-a4bcbd5df833" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144025Z:cdd30be4-145c-4467-b2d3-a4bcbd5df833" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-correlation-request-id": [ "78db2063-2cb3-4308-889e-cab90f679d36" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062055Z:78db2063-2cb3-4308-889e-cab90f679d36" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:40:24 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3865DE8EE8AC4F5387B6526A344AF293 Ref B: SEL221051503025 Ref C: 2024-04-30T06:20:54Z" ], + "Date": [ "Tue, 30 Apr 2024 06:20:55 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "576" ], + "Content-Length": [ "580" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"migrationState\":\"Reverting\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"migrationState\":\"Reverting\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+11": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "549" ], - "x-ms-client-request-id": [ "ae129a66-08ed-445b-a642-a02e8cbe5741" ], + "x-ms-unique-id": [ "485" ], + "x-ms-client-request-id": [ "3ab48d1c-2866-423c-a59f-cf16c607a0b9" ], "CommandName": [ "Get-AzServiceBusMigration" ], "FullCommandName": [ "Get-AzServiceBusMigration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -436,38 +412,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "14018a37-778f-4bef-9da3-fbe189cff8b2_M8CH3_M8CH3" ], + "x-ms-request-id": [ "a9ffc495-2e16-4fbf-97fe-538e91da23a7_M9CH3_M9CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11859" ], - "x-ms-correlation-request-id": [ "8bf67b47-95af-499c-93cf-a01fd42d6fea" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144035Z:8bf67b47-95af-499c-93cf-a01fd42d6fea" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "4126fefd-dd93-4999-bc9e-70569131833b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T062107Z:4126fefd-dd93-4999-bc9e-70569131833b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:40:35 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9E89EF9A4B4E4973B14E3592D2CA739A Ref B: SEL221051503025 Ref C: 2024-04-30T06:21:05Z" ], + "Date": [ "Tue, 30 Apr 2024 06:21:07 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "576" ], + "Content-Length": [ "580" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"migrationState\":\"Reverting\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"migrationState\":\"Reverting\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+12": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+11": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "550" ], - "x-ms-client-request-id": [ "02d9c02b-1f0a-4221-9009-23391e78c507" ], + "x-ms-unique-id": [ "486" ], + "x-ms-client-request-id": [ "5020b3d5-264c-4ef5-a954-617a8fb8df4b" ], "CommandName": [ "Get-AzServiceBusMigration" ], "FullCommandName": [ "Get-AzServiceBusMigration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -478,38 +456,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "449ad115-674f-4355-953c-29dc961b2f97_M8CH3_M8CH3" ], + "x-ms-request-id": [ "82a281f4-6d6b-4228-8e81-8f3e87323e68_M11CH3_M11CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11858" ], - "x-ms-correlation-request-id": [ "b4677346-375d-42fc-87ee-a644ab149f26" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144046Z:b4677346-375d-42fc-87ee-a644ab149f26" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "20ca4a31-602d-46a5-aef2-dafc557509af" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062118Z:20ca4a31-602d-46a5-aef2-dafc557509af" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:40:45 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 58B3A09D85C240419CFBC27B1707F782 Ref B: SEL221051503025 Ref C: 2024-04-30T06:21:17Z" ], + "Date": [ "Tue, 30 Apr 2024 06:21:18 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "576" ], + "Content-Length": [ "580" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"migrationState\":\"Reverting\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"migrationState\":\"Reverting\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+13": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+12": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "551" ], - "x-ms-client-request-id": [ "ca2050ed-d910-457e-ae88-135201ddf255" ], + "x-ms-unique-id": [ "487" ], + "x-ms-client-request-id": [ "01bdac90-c03a-469c-93c1-da8d0bbbfef9" ], "CommandName": [ "Get-AzServiceBusMigration" ], "FullCommandName": [ "Get-AzServiceBusMigration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -520,38 +500,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "47ead15a-af54-403b-89af-48e8a2953903_M0CH3_M0CH3" ], + "x-ms-request-id": [ "7f4c6325-5dd6-403b-8b9e-739373d9b0d7_M4CH3_M4CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11857" ], - "x-ms-correlation-request-id": [ "41a6e986-f8da-487c-8101-fba3a67b84f0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144057Z:41a6e986-f8da-487c-8101-fba3a67b84f0" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "e3b7c19f-9967-46dc-95d2-b5ba01c617fc" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062129Z:e3b7c19f-9967-46dc-95d2-b5ba01c617fc" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:40:57 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 674CB11885574D5BAC6E6CCFFF78510F Ref B: SEL221051503025 Ref C: 2024-04-30T06:21:28Z" ], + "Date": [ "Tue, 30 Apr 2024 06:21:29 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "576" ], + "Content-Length": [ "580" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"migrationState\":\"Reverting\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"migrationState\":\"Reverting\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+14": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+13": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "552" ], - "x-ms-client-request-id": [ "98139a5f-bdf2-4f68-bd08-5262cb73461f" ], + "x-ms-unique-id": [ "488" ], + "x-ms-client-request-id": [ "39c63639-3e4d-40fb-b8b5-ee55ab590925" ], "CommandName": [ "Get-AzServiceBusMigration" ], "FullCommandName": [ "Get-AzServiceBusMigration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -562,38 +544,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "069526c0-cc72-484e-9382-311808df34a9_M0CH3_M0CH3" ], + "x-ms-request-id": [ "c95cf249-5a75-4abe-9c06-20024174d41d_M6CH3_M6CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11856" ], - "x-ms-correlation-request-id": [ "09acdb0a-3144-4222-886a-b6b9b44abf06" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144108Z:09acdb0a-3144-4222-886a-b6b9b44abf06" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "f884d07b-b054-4818-9258-a834f3678bac" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062141Z:f884d07b-b054-4818-9258-a834f3678bac" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:41:08 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F6C0BA6FC7244AFAAC5D8C77E63ECF55 Ref B: SEL221051503025 Ref C: 2024-04-30T06:21:39Z" ], + "Date": [ "Tue, 30 Apr 2024 06:21:41 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "576" ], + "Content-Length": [ "580" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"migrationState\":\"Reverting\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"migrationState\":\"Reverting\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+15": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "553" ], - "x-ms-client-request-id": [ "978a6f5a-09ce-4534-a303-2408dfbfa907" ], + "x-ms-unique-id": [ "489" ], + "x-ms-client-request-id": [ "61c634fa-a99f-4b2d-a19c-b9786e20a29b" ], "CommandName": [ "Get-AzServiceBusMigration" ], "FullCommandName": [ "Get-AzServiceBusMigration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -604,38 +588,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e63c5fc6-24b1-42d2-a0c7-40ae2c8f206b_M0CH3_M0CH3" ], + "x-ms-request-id": [ "317c2ea8-503a-4958-8dab-8c6342ad5d9c_M3CH3_M3CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11855" ], - "x-ms-correlation-request-id": [ "133977df-0ff8-4e43-9729-4384425ff4ab" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144119Z:133977df-0ff8-4e43-9729-4384425ff4ab" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "0eaff55e-d1e9-4e4b-9935-b2ef82777289" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062152Z:0eaff55e-d1e9-4e4b-9935-b2ef82777289" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:41:18 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 68BEBA1F5A7D48C1AA9176232F4AF388 Ref B: SEL221051503025 Ref C: 2024-04-30T06:21:51Z" ], + "Date": [ "Tue, 30 Apr 2024 06:21:52 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "576" ], + "Content-Length": [ "580" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"migrationState\":\"Reverting\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"migrationState\":\"Reverting\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+16": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+15": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "554" ], - "x-ms-client-request-id": [ "4a54ee8a-7c0e-484e-8f3e-39ac933b6b92" ], + "x-ms-unique-id": [ "490" ], + "x-ms-client-request-id": [ "8cafdb5f-d007-4450-a49a-abc507ee7074" ], "CommandName": [ "Get-AzServiceBusMigration" ], "FullCommandName": [ "Get-AzServiceBusMigration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -646,80 +632,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "990e77e8-d28a-4ce2-9b83-678ea4170b98_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11854" ], - "x-ms-correlation-request-id": [ "5cb86b65-23b6-4241-9164-52978e8dbeb7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144129Z:5cb86b65-23b6-4241-9164-52978e8dbeb7" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:41:28 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "576" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"migrationState\":\"Reverting\"}}", - "isContentBase64": false - } - }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+17": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "555" ], - "x-ms-client-request-id": [ "eb4c93e9-95ea-4e71-b438-8f1fc3082f00" ], - "CommandName": [ "Get-AzServiceBusMigration" ], - "FullCommandName": [ "Get-AzServiceBusMigration_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b9884486-6409-4958-99c2-8211912b463d_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11853" ], - "x-ms-correlation-request-id": [ "a0f78b29-73c1-4851-b56a-4c5f488d537b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144140Z:a0f78b29-73c1-4851-b56a-4c5f488d537b" ], + "x-ms-request-id": [ "bdae7ccf-5c5b-4843-806a-957fce4da773_M10SN1_M10SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "b3429b7a-3ecc-4949-878d-fe21fcf72551" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062203Z:b3429b7a-3ecc-4949-878d-fe21fcf72551" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:41:39 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2C0D60EC819B402ABCA24C752FE799A5 Ref B: SEL221051503025 Ref C: 2024-04-30T06:22:02Z" ], + "Date": [ "Tue, 30 Apr 2024 06:22:03 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "420" ], + "Content-Length": [ "422" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Succeeded\",\"targetNamespace\":\"\",\"postMigrationName\":\"postMigration2i9j5p\",\"migrationState\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Succeeded\",\"targetNamespace\":\"\",\"postMigrationName\":\"postMigrationmsdlz3\",\"migrationState\":\"Active\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+18": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+16": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "556" ], - "x-ms-client-request-id": [ "6a520517-5b43-4326-a340-e6b426cbaea1" ], + "x-ms-unique-id": [ "491" ], + "x-ms-client-request-id": [ "570ac802-97e8-46a3-83f1-c8786817b24a" ], "CommandName": [ "Remove-AzServiceBusMigration" ], "FullCommandName": [ "Remove-AzServiceBusMigration_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -730,36 +676,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6fbc3b93-d5e4-42ec-b220-9e30786378f2_M3CH3_M3CH3" ], + "x-ms-request-id": [ "d3449276-03f4-4e7a-877d-ed5c0f84d6e1_M0CH3_M0CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-correlation-request-id": [ "d170754c-53b5-474f-ab89-d7e52d5d2b95" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144151Z:d170754c-53b5-474f-ab89-d7e52d5d2b95" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], + "x-ms-correlation-request-id": [ "f7eea3d6-91ec-4210-91c3-d22c4f0f4ce2" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T062215Z:f7eea3d6-91ec-4210-91c3-d22c4f0f4ce2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:41:51 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0648A09436804B2B946489FD3A53A4F8 Ref B: SEL221051503025 Ref C: 2024-04-30T06:22:14Z" ], + "Date": [ "Tue, 30 Apr 2024 06:22:15 GMT" ] }, "ContentHeaders": { "Content-Length": [ "150" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"error\":{\"message\":\"Cannot delete as Alias and Primary Namespace are same. CorrelationId: d170754c-53b5-474f-ab89-d7e52d5d2b95\",\"code\":\"BadRequest\"}}", + "Content": "{\"error\":{\"message\":\"Cannot delete as Alias and Primary Namespace are same. CorrelationId: f7eea3d6-91ec-4210-91c3-d22c4f0f4ce2\",\"code\":\"BadRequest\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+19": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+17": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", - "Content": "{\n \"properties\": {\n \"targetNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\n \"postMigrationName\": \"postMigration2i9j5p\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "Content": "{\n \"properties\": {\n \"targetNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\n \"postMigrationName\": \"postMigrationmsdlz3\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "253" ] + "Content-Length": [ "255" ] } }, "Response": { @@ -767,39 +715,41 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b568c4e7-5060-4162-80dc-60afa7598fea_M3CH3_M3CH3" ], + "x-ms-request-id": [ "083a3211-b23a-4c98-a31f-70b43947962b_M4CH3_M4CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1128" ], - "x-ms-correlation-request-id": [ "8b6c0f7a-7158-4c42-8a46-d788a2169108" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144159Z:8b6c0f7a-7158-4c42-8a46-d788a2169108" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-correlation-request-id": [ "16061cf5-cae5-422c-9191-5744d8f512e1" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062223Z:16061cf5-cae5-422c-9191-5744d8f512e1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:41:59 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1943C2E4F277411B822C95B2472F34F1 Ref B: SEL221051503025 Ref C: 2024-04-30T06:22:15Z" ], + "Date": [ "Tue, 30 Apr 2024 06:22:23 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "577" ], + "Content-Length": [ "581" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"migrationState\":\"Initiating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"migrationState\":\"Initiating\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+20": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+18": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "558" ], - "x-ms-client-request-id": [ "6fda9e5e-cee9-45a2-a283-de44b096a944" ], + "x-ms-unique-id": [ "493" ], + "x-ms-client-request-id": [ "c9b6d666-6043-4c73-8100-7f2834b6aef8" ], "CommandName": [ "Start-AzServiceBusMigration" ], "FullCommandName": [ "Start-AzServiceBusMigration_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -809,39 +759,41 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f45b58f3-b2e0-46fb-8f60-30cac96e387a_M3CH3_M3CH3" ], + "x-ms-request-id": [ "afac73ff-4509-4e14-a427-d54f74a38e8d_M2CH3_M2CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11852" ], - "x-ms-correlation-request-id": [ "734b7dc7-a830-4641-a970-1515ce47b615" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144229Z:734b7dc7-a830-4641-a970-1515ce47b615" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "06f428bf-0466-42df-8a09-70e4ec1831ca" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062255Z:06f428bf-0466-42df-8a09-70e4ec1831ca" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:42:29 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3BC267E921EC46D9A7CD1039A3951891 Ref B: SEL221051503025 Ref C: 2024-04-30T06:22:53Z" ], + "Date": [ "Tue, 30 Apr 2024 06:22:55 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "577" ], + "Content-Length": [ "581" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"migrationState\":\"Initiating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"migrationState\":\"Initiating\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+21": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+19": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "559" ], - "x-ms-client-request-id": [ "6fda9e5e-cee9-45a2-a283-de44b096a944" ], + "x-ms-unique-id": [ "494" ], + "x-ms-client-request-id": [ "c9b6d666-6043-4c73-8100-7f2834b6aef8" ], "CommandName": [ "Start-AzServiceBusMigration" ], "FullCommandName": [ "Start-AzServiceBusMigration_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -851,39 +803,41 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "68af9bab-882f-45cb-bac9-ef981e7531aa_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11851" ], - "x-ms-correlation-request-id": [ "195aec11-b9eb-4611-886e-5b5c1de8e69d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144301Z:195aec11-b9eb-4611-886e-5b5c1de8e69d" ], + "x-ms-request-id": [ "574c1f59-e6a7-4f5d-b732-8f88a5482534_M7CH3_M7CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "996b9584-f2f5-4570-b865-ee2ae535f137" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062327Z:996b9584-f2f5-4570-b865-ee2ae535f137" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:43:00 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6DDBB95293F0497C88F894E2C8CCF5B0 Ref B: SEL221051503025 Ref C: 2024-04-30T06:23:26Z" ], + "Date": [ "Tue, 30 Apr 2024 06:23:27 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "577" ], + "Content-Length": [ "581" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"migrationState\":\"Initiating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Accepted\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"migrationState\":\"Initiating\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+22": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+20": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "560" ], - "x-ms-client-request-id": [ "6fda9e5e-cee9-45a2-a283-de44b096a944" ], + "x-ms-unique-id": [ "495" ], + "x-ms-client-request-id": [ "c9b6d666-6043-4c73-8100-7f2834b6aef8" ], "CommandName": [ "Start-AzServiceBusMigration" ], "FullCommandName": [ "Start-AzServiceBusMigration_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -893,39 +847,41 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2ae1553b-6661-4f80-b9f6-332bc3f8c29a_M0SN1_M0SN1" ], + "x-ms-request-id": [ "daa553f7-79d7-40a0-a816-f6e6f5718e69_M8SN1_M8SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11850" ], - "x-ms-correlation-request-id": [ "37569250-ffc2-4813-b9fa-7dde09acc785" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144332Z:37569250-ffc2-4813-b9fa-7dde09acc785" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "5907f294-626a-4698-a94c-587c4812f761" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062402Z:5907f294-626a-4698-a94c-587c4812f761" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:43:32 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4CDCFBC6B11648D3B2179F9991B98099 Ref B: SEL221051503025 Ref C: 2024-04-30T06:23:57Z" ], + "Date": [ "Tue, 30 Apr 2024 06:24:01 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "612" ], + "Content-Length": [ "616" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Succeeded\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"pendingReplicationOperationsCount\":0,\"migrationState\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Succeeded\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"pendingReplicationOperationsCount\":0,\"migrationState\":\"Active\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+23": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+21": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "561" ], - "x-ms-client-request-id": [ "6fda9e5e-cee9-45a2-a283-de44b096a944" ], + "x-ms-unique-id": [ "496" ], + "x-ms-client-request-id": [ "c9b6d666-6043-4c73-8100-7f2834b6aef8" ], "CommandName": [ "Start-AzServiceBusMigration" ], "FullCommandName": [ "Start-AzServiceBusMigration_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ] }, "ContentHeaders": { } @@ -935,38 +891,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7d03b02a-53a0-4fc0-a430-fb283a30ec16_M0SN1_M0SN1" ], + "x-ms-request-id": [ "71f1773e-4648-4c7e-a41d-3ecf45c91dc3_M3SN1_M3SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11849" ], - "x-ms-correlation-request-id": [ "939c096f-e1df-4cd7-b8f6-7ea2051494e5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144334Z:939c096f-e1df-4cd7-b8f6-7ea2051494e5" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "35933800-91b1-4938-9896-058bd2ccf7be" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T062404Z:35933800-91b1-4938-9896-058bd2ccf7be" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:43:33 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 39FB3D3DBC1F4B1C8A694DE0E3787D44 Ref B: SEL221051503025 Ref C: 2024-04-30T06:24:02Z" ], + "Date": [ "Tue, 30 Apr 2024 06:24:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "612" ], + "Content-Length": [ "616" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Succeeded\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"pendingReplicationOperationsCount\":0,\"migrationState\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Succeeded\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"pendingReplicationOperationsCount\":0,\"migrationState\":\"Active\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview+24": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview+22": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "562" ], - "x-ms-client-request-id": [ "271c169a-9dcd-4409-86d8-a58c7735afc7" ], + "x-ms-unique-id": [ "497" ], + "x-ms-client-request-id": [ "9c7f23f3-4b94-4459-8978-e5f13610a529" ], "CommandName": [ "Get-AzServiceBusMigration" ], "FullCommandName": [ "Get-AzServiceBusMigration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -977,38 +935,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "aac0752e-1d3d-4eee-bbac-4af41b351782_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11848" ], - "x-ms-correlation-request-id": [ "673b8fc9-8c80-41b5-9344-0ce5d402eb99" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144335Z:673b8fc9-8c80-41b5-9344-0ce5d402eb99" ], + "x-ms-request-id": [ "6b41ed6e-f3c1-496b-ac31-6827f1408d87_M9CH3_M9CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-correlation-request-id": [ "ee838550-6d2a-4623-845b-5da500cdf6a4" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062406Z:ee838550-6d2a-4623-845b-5da500cdf6a4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:43:34 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 68801941B76340278A595E53F65347BF Ref B: SEL221051503025 Ref C: 2024-04-30T06:24:04Z" ], + "Date": [ "Tue, 30 Apr 2024 06:24:06 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "612" ], + "Content-Length": [ "616" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/$default\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Succeeded\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa\",\"postMigrationName\":\"postMigration2i9j5p\",\"pendingReplicationOperationsCount\":0,\"migrationState\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/$default\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/migrationconfigurations\",\"properties\":{\"provisioningState\":\"Succeeded\",\"targetNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb\",\"postMigrationName\":\"postMigrationmsdlz3\",\"pendingReplicationOperationsCount\":0,\"migrationState\":\"Active\"}}", "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default/upgrade?api-version=2022-10-01-preview+25": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default/upgrade?api-version=2022-10-01-preview+23": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a/migrationConfigurations/%24default/upgrade?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6/migrationConfigurations/%24default/upgrade?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "563" ], - "x-ms-client-request-id": [ "7fe783c9-896d-4982-955e-4ffb1a088009" ], + "x-ms-unique-id": [ "498" ], + "x-ms-client-request-id": [ "67b6c57b-c5c2-42f8-947a-386fd2a1ec08" ], "CommandName": [ "Complete-AzServiceBusMigration" ], "FullCommandName": [ "Complete-AzServiceBusMigration_Complete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1019,15 +979,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "022eb4ca-ec72-4ba0-9771-6f516ec097c3_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "Server": [ "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "d2168cd4-9b90-48cc-b271-503c1a2750fe" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144346Z:d2168cd4-9b90-48cc-b271-503c1a2750fe" ], + "x-ms-request-id": [ "a9025487-89ea-4a66-87a1-09b8630b3485_M11CH3_M11CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "2d56cde4-65e9-4443-aa6b-1ccfafd7f203" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062419Z:2d56cde4-65e9-4443-aa6b-1ccfafd7f203" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:43:46 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 86376E3F464D486794FAD4DFAA10A9C6 Ref B: SEL221051503025 Ref C: 2024-04-30T06:24:16Z" ], + "Date": [ "Tue, 30 Apr 2024 06:24:18 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -1037,19 +999,19 @@ "isContentBase64": false } }, - "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa/disasterRecoveryConfigs/primaryNSp1xb3a?api-version=2022-10-01-preview+26": { + "Start-AzServiceBusMigration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb/disasterRecoveryConfigs/primaryNSqi3or6?api-version=2022-10-01-preview+24": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa/disasterRecoveryConfigs/primaryNSp1xb3a?api-version=2022-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb/disasterRecoveryConfigs/primaryNSqi3or6?api-version=2022-10-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "564" ], - "x-ms-client-request-id": [ "777323ba-e863-4282-8ed7-9ebed801efcb" ], + "x-ms-unique-id": [ "499" ], + "x-ms-client-request-id": [ "3f0ec113-561f-4dc3-ae47-aa7201642bbd" ], "CommandName": [ "Get-AzServiceBusGeoDRConfiguration" ], "FullCommandName": [ "Get-AzServiceBusGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ServiceBus/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.ServiceBus/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1060,22 +1022,24 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "36e9433d-b270-4fb1-b43a-ba98dbe977a2_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11847" ], - "x-ms-correlation-request-id": [ "e3593069-8dad-4b5c-b278-c69c11325c02" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144747Z:e3593069-8dad-4b5c-b278-c69c11325c02" ], + "x-ms-request-id": [ "972d2c49-4a04-4f5d-8f98-966d7950e78f_M1SN1_M1SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "b3f278cf-ffbb-4a2c-972f-504a67c4a3db" ], + "x-ms-routing-request-id": [ "EASTASIA:20240430T062820Z:b3f278cf-ffbb-4a2c-972f-504a67c4a3db" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:47:47 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2652FADAF6C1408586333EF24F110C1B Ref B: SEL221051503009 Ref C: 2024-04-30T06:28:19Z" ], + "Date": [ "Tue, 30 Apr 2024 06:28:20 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "422" ], + "Content-Length": [ "424" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa/disasterRecoveryConfigs/primaryNSp1xb3a\",\"name\":\"primaryNSp1xb3a\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb/disasterRecoveryConfigs/primaryNSqi3or6\",\"name\":\"primaryNSqi3or6\",\"type\":\"Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Start-AzServiceBusMigration.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Start-AzServiceBusMigration.Tests.ps1 index 16531fff62b0..41460ad65bb4 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Start-AzServiceBusMigration.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Start-AzServiceBusMigration.Tests.ps1 @@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Start-AzServiceBusMigration') } Describe 'Start-AzServiceBusMigration' { - It 'CreateExpanded' { + It 'CreateExpanded' -skip:$($env.secondaryLocation -eq '') { $migrationConfig = Start-AzServiceBusMigration -ResourceGroupName $env.resourceGroup -NamespaceName $env.migrationPrimaryNamespace -PostMigrationName $env.postMigrationName -TargetNamespace $env.migrationSecondaryNamespaceResourceId $migrationConfig.Name | Should -Be $env.migrationPrimaryNamespace $migrationConfig.PostMigrationName | Should -Be $env.postMigrationName @@ -23,20 +23,20 @@ Describe 'Start-AzServiceBusMigration' { do { $migrationConfig = Get-AzServiceBusMigration -ResourceGroupName $env.resourceGroup -NamespaceName $env.migrationPrimaryNamespace - Start-TestSleep 10 + Start-Sleep 10 } while($migrationConfig.ProvisioningState -ne 'Succeeded') Stop-AzServiceBusMigration -ResourceGroupName $env.resourceGroup -NamespaceName $env.migrationPrimaryNamespace do { $migrationConfig = Get-AzServiceBusMigration -ResourceGroupName $env.resourceGroup -NamespaceName $env.migrationPrimaryNamespace - Start-TestSleep 10 + Start-Sleep 10 } while($migrationConfig.ProvisioningState -ne 'Succeeded') $migrationConfig.TargetNamespace | Should -Be "" - { Remove-AzServiceBusMigration -ResourceGroupName $env.resourceGroup -NamespaceName $env.migrationPrimaryNamespace } | Should -Throw - + { Remove-AzServiceBusMigration -ResourceGroupName $env.resourceGroup -NamespaceName $env.migrationPrimaryNamespace -ErrorAction Stop } | Should -Throw + $migrationConfig = Start-AzServiceBusMigration -ResourceGroupName $env.resourceGroup -NamespaceName $env.migrationPrimaryNamespace -PostMigrationName $env.postMigrationName -TargetNamespace $env.migrationSecondaryNamespaceResourceId $migrationConfig.Name | Should -Be $env.migrationPrimaryNamespace $migrationConfig.PostMigrationName | Should -Be $env.postMigrationName @@ -44,18 +44,18 @@ Describe 'Start-AzServiceBusMigration' { do { $migrationConfig = Get-AzServiceBusMigration -ResourceGroupName $env.resourceGroup -NamespaceName $env.migrationPrimaryNamespace - Start-TestSleep 10 + Start-Sleep 10 } while($migrationConfig.ProvisioningState -ne 'Succeeded') Complete-AzServiceBusMigration -ResourceGroupName $env.resourceGroup -NamespaceName $env.migrationPrimaryNamespace - - Start-TestSleep 240 + + Start-Sleep 240 $drConfig = Get-AzServiceBusGeoDRConfiguration -ResourceGroupName $env.resourceGroup -Name $env.migrationPrimaryNamespace -NamespaceName $env.migrationSecondaryNamespace $drConfig.Name | Should -Be $env.migrationPrimaryNamespace $drConfig.ResourceGroupName | Should -Be $env.resourceGroup $drConfig.PartnerNamespace | Should -Be "" $drConfig.Role | Should -Be "PrimaryNotReplicating" - + } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Test-AzServiceBusName.Recording.json b/src/ServiceBus/ServiceBus.Autorest/test/Test-AzServiceBusName.Recording.json index 8caaad1a6088..89cb55d0318f 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Test-AzServiceBusName.Recording.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/Test-AzServiceBusName.Recording.json @@ -3,7 +3,7 @@ "Request": { "Method": "POST", "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.ServiceBus/CheckNameAvailability?api-version=2022-10-01-preview", - "Content": "{\n \"name\": \"namespaceNamehjil09\"\n}", + "Content": "{\n \"name\": \"namespaceNamep0j7ix\"\n}", "isContentBase64": false, "Headers": { }, @@ -17,15 +17,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6abe660d-3c20-4245-8046-384de729f719_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-correlation-request-id": [ "536103f4-2aa0-4fdd-b773-dd5bbe4fe695" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144828Z:536103f4-2aa0-4fdd-b773-dd5bbe4fe695" ], + "x-ms-request-id": [ "daa1d506-5b84-4d4b-a2c0-3aa6e4844f0e_M2SN1_M2SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "86c8d115-40d4-4707-a8cd-9bc766aa4aeb" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062902Z:86c8d115-40d4-4707-a8cd-9bc766aa4aeb" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:48:28 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C5E6E582D9D245CB957D117E785A67D2 Ref B: SEL221051503009 Ref C: 2024-04-30T06:29:02Z" ], + "Date": [ "Tue, 30 Apr 2024 06:29:02 GMT" ] }, "ContentHeaders": { "Content-Length": [ "159" ], @@ -36,11 +38,11 @@ "isContentBase64": false } }, - "Test-AzServiceBusName+[NoContext]+AliasAvailability+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/disasterRecoveryConfigs/CheckNameAvailability?api-version=2022-10-01-preview+1": { + "Test-AzServiceBusName+[NoContext]+AliasAvailability+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/disasterRecoveryConfigs/CheckNameAvailability?api-version=2022-10-01-preview+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09/disasterRecoveryConfigs/CheckNameAvailability?api-version=2022-10-01-preview", - "Content": "{\n \"name\": \"aliasq6x0t1\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np/disasterRecoveryConfigs/CheckNameAvailability?api-version=2022-10-01-preview", + "Content": "{\n \"name\": \"aliastkildm\"\n}", "isContentBase64": false, "Headers": { }, @@ -54,15 +56,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "58e3189a-f641-4c62-8981-a0026e3fdacf_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "Server": [ "Service-Bus-Resource-Provider/CH3", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], - "x-ms-correlation-request-id": [ "7a88c3f7-a701-498b-82ce-d9d874b8591e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230219T144829Z:7a88c3f7-a701-498b-82ce-d9d874b8591e" ], + "x-ms-request-id": [ "8f351814-7181-480e-a9c0-a4c0f667ccfa_M8SN1_M8SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-correlation-request-id": [ "43b545ae-56b3-4ded-b4e9-ddba34e24bbf" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240430T062904Z:43b545ae-56b3-4ded-b4e9-ddba34e24bbf" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 19 Feb 2023 14:48:29 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 43D6A02C79E84E2FBCFA17AEA3B82343 Ref B: SEL221051503009 Ref C: 2024-04-30T06:29:02Z" ], + "Date": [ "Tue, 30 Apr 2024 06:29:03 GMT" ] }, "ContentHeaders": { "Content-Length": [ "38" ], diff --git a/src/ServiceBus/ServiceBus.Autorest/test/Test-AzServiceBusName.Tests.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/Test-AzServiceBusName.Tests.ps1 index 00fb3a446a79..044424227621 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/Test-AzServiceBusName.Tests.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/Test-AzServiceBusName.Tests.ps1 @@ -16,11 +16,11 @@ if(($null -eq $TestName) -or ($TestName -contains 'Test-AzServiceBusName')) Describe 'Test-AzServiceBusName' { It 'NamespaceAvailability' { - $checkName = Test-AzServiceBusName -NamespaceName $env.namespace + $checkName = Test-AzServiceBusName -NamespaceName $env.standardNamespace $checkName.NameAvailable | Should -Be $false } - It 'AliasAvailability' { + It 'AliasAvailability'{ $checkName = Test-AzServiceBusName -NamespaceName $env.namespace -ResourceGroupName $env.resourceGroup -AliasName $env.alias $checkName.NameAvailable | Should -Be $true } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/DependentResourcesParameters.json b/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/DependentResourcesParameters.json new file mode 100644 index 000000000000..aac903ddd43d --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/DependentResourcesParameters.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "resource_name_prefix": { + "value": "sb-ps-v8aenr" + }, + "useZoneRedundancy": { + "value": true + } + } +} diff --git a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/DependentResourcesTemplate.json b/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/DependentResourcesTemplate.json new file mode 100644 index 000000000000..77e3d5ee6b94 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/DependentResourcesTemplate.json @@ -0,0 +1,165 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "defaultValue": "[resourceGroup().location]", + "type": "string" + }, + "resource_name_prefix": { + "defaultValue": "ps-testing", + "type": "string" + }, + "useZoneRedundancy": { + "defaultValue": true, + "type": "bool" + } + }, + "variables": { + "msi1Name": "[concat(parameters('resource_name_prefix'), '-msi1')]", + "msi2Name": "[concat(parameters('resource_name_prefix'), '-msi2')]", + "nsgName": "[concat(parameters('resource_name_prefix'), '-nsg')]", + "vnetName": "[concat(parameters('resource_name_prefix'), '-vnet')]" + }, + "resources": [ + { + "type": "Microsoft.ManagedIdentity/userAssignedIdentities", + "apiVersion": "2023-01-31", + "name": "[variables('msi1Name')]", + "location": "[parameters('location')]" + }, + { + "type": "Microsoft.ManagedIdentity/userAssignedIdentities", + "apiVersion": "2023-01-31", + "name": "[variables('msi2Name')]", + "location": "[parameters('location')]" + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2023-02-01", + "name": "[variables('nsgName')]", + "location": "[parameters('location')]", + "properties": { + "securityRules": [] + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2023-02-01", + "name": "[variables('vnetName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "subnets": [ + { + "name": "default1", + "properties": { + "addressPrefix": "10.0.1.0/24", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + }, + "serviceEndpoints": [ + { + "service": "Microsoft.EventHub", + "locations": [ + "*" + ] + }, + { + "service": "Microsoft.ServiceBus", + "locations": [ + "*" + ] + } + ], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + } + }, + { + "name": "default2", + "properties": { + "addressPrefix": "10.0.2.0/24", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + }, + "serviceEndpoints": [ + { + "service": "Microsoft.EventHub", + "locations": [ + "*" + ] + }, + { + "service": "Microsoft.ServiceBus", + "locations": [ + "*" + ] + } + ], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + } + }, + { + "name": "default3", + "properties": { + "addressPrefix": "10.0.3.0/24", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + }, + "serviceEndpoints": [ + { + "service": "Microsoft.EventHub", + "locations": [ + "*" + ] + }, + { + "service": "Microsoft.ServiceBus", + "locations": [ + "*" + ] + } + ], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + } + }, + { + "name": "default", + "properties": { + "addressPrefix": "10.0.0.0/24", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + }, + "serviceEndpoints": [ + { + "service": "Microsoft.EventHub", + "locations": [ + "*" + ] + }, + { + "service": "Microsoft.ServiceBus", + "locations": [ + "*" + ] + } + ], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + } + } + ] + }, + "dependsOn": [ + "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" + ] + } + ] +} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/DisasterRecoveryParameter.json b/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/DisasterRecoveryParameter.json deleted file mode 100644 index c09969b26ad1..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/DisasterRecoveryParameter.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "primarynamespace_name": { - "value": "primaryNSd7oma3" - }, - "secondarynamespace_name": { - "value": "secondaryNSjazpct" - }, - "migrationPrimaryNamespace": { - "value": "primaryNSp1xb3a" - }, - "migrationSecondaryNamespace": { - "value": "secondaryNS5doyqa" - } - } -} diff --git a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/DisasterRecoveryTemplate.json b/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/DisasterRecoveryTemplate.json deleted file mode 100644 index 9a117de4a80c..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/DisasterRecoveryTemplate.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "primarynamespace_name": { - "defaultValue": "AutomatedPSTesting", - "type": "String" - }, - "secondarynamespace_name": { - "defaultValue": "testnamespace", - "type": "String" - }, - "migrationPrimaryNamespace": { - "defaultValue": "testnamespace", - "type": "String" - }, - "migrationSecondaryNamespace": { - "defaultValue": "testnamespace", - "type": "String" - } - }, - "variables": { - }, - "resources": [ - { - "type": "Microsoft.ServiceBus/namespaces", - "apiVersion": "2022-01-01-preview", - "name": "[parameters('primarynamespace_name')]", - "location": "eastus", - "sku": { - "name": "Premium", - "tier": "Premium" - }, - "properties": { - "minimumTlsVersion": "1.2", - "publicNetworkAccess": "Enabled", - "disableLocalAuth": false, - "zoneRedundant": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces", - "apiVersion": "2022-01-01-preview", - "name": "[parameters('secondarynamespace_name')]", - "location": "southcentralus", - "sku": { - "name": "Premium", - "tier": "Premium" - }, - "properties": { - "minimumTlsVersion": "1.2", - "publicNetworkAccess": "Enabled", - "disableLocalAuth": false, - "zoneRedundant": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces", - "apiVersion": "2022-01-01-preview", - "name": "[parameters('migrationPrimaryNamespace')]", - "location": "East US", - "sku": { - "name": "Standard", - "tier": "Standard" - }, - "properties": { - "minimumTlsVersion": "1.2", - "publicNetworkAccess": "Enabled", - "disableLocalAuth": false, - "zoneRedundant": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces", - "apiVersion": "2022-01-01-preview", - "name": "[parameters('migrationSecondaryNamespace')]", - "location": "southcentralus", - "sku": { - "name": "Premium", - "tier": "Premium" - }, - "properties": { - "minimumTlsVersion": "1.2", - "publicNetworkAccess": "Enabled", - "disableLocalAuth": false, - "zoneRedundant": false - } - } - ] -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/keyVaultParameter.json b/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/keyVaultParameter.json deleted file mode 100644 index fca298465bd3..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/keyVaultParameter.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "key_Vault_Name": { - "value": "keyVaultNamedur8ab" - }, - "tenant_id": { - "value": "72f988bf-86f1-41af-91ab-2d7cd011db47" - }, - "object_id": { - "value": "05ff947d-d140-41f0-8107-16ca5893799b" - }, - "object_id_msi1": { - "value": "624205aa-192c-4303-9606-990d06cbd997" - }, - "object_id_msi2": { - "value": "1bdb6af0-4284-47f4-b049-94aa2868d90b" - } - } -} diff --git a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/keyVaultParameters.json b/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/keyVaultParameters.json new file mode 100644 index 000000000000..7f6ca2bb22dd --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/keyVaultParameters.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "resource_name_prefix": { + "value": "sb-ps-v8aenr" + }, + "system_assigned_namespace_name": { + "value": "namespaceName6auipl" + } + } +} diff --git a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/keyVaultTemplate.json b/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/keyVaultTemplate.json index bae681119b9b..466b4f94eb45 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/keyVaultTemplate.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/keyVaultTemplate.json @@ -2,44 +2,40 @@ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { - "key_Vault_Name": { - "defaultValue": "PS-Test-kv1", - "type": "String" - }, - "tenant_id": { - "defaultValue": "00000-0000", - "type": "string" - }, - "object_id_msi1": { - "defaultValue": "00000-0000", + "location": { + "defaultValue": "[resourceGroup().location]", "type": "string" }, - "object_id_msi2": { - "defaultValue": "00000-0000", + "resource_name_prefix": { + "defaultValue": "ps-testing", "type": "string" }, - "object_id": { - "defaultValue": "00000-0000", + "system_assigned_namespace_name": { + "defaultValue": "AutomatedPSTesting", "type": "string" } }, - "variables": {}, + "variables": { + "keyVaultName": "[concat(parameters('resource_name_prefix'), '-kv1')]", + "msi1Name": "[concat(parameters('resource_name_prefix'), '-msi1')]", + "msi2Name": "[concat(parameters('resource_name_prefix'), '-msi2')]" + }, "resources": [ { "type": "Microsoft.KeyVault/vaults", "apiVersion": "2022-07-01", - "name": "[parameters('key_Vault_Name')]", - "location": "eastus", + "name": "[variables('keyVaultName')]", + "location": "[parameters('location')]", "properties": { "sku": { "family": "A", "name": "standard" }, - "tenantId": "[parameters('tenant_id')]", + "tenantId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('msi1Name')), '2023-01-31').tenantId]", "accessPolicies": [ { - "tenantId": "[parameters('tenant_id')]", - "objectId": "[parameters('object_id')]", + "tenantId": "[reference(resourceId('Microsoft.ServiceBus/namespaces', parameters('system_assigned_namespace_name')), '2022-01-01-preview', 'Full').identity.tenantId]", + "objectId": "[reference(resourceId('Microsoft.ServiceBus/namespaces', parameters('system_assigned_namespace_name')), '2022-01-01-preview', 'Full').identity.principalId]", "permissions": { "keys": [ "WrapKey", @@ -52,8 +48,8 @@ } }, { - "tenantId": "[parameters('tenant_id')]", - "objectId": "[parameters('object_id_msi1')]", + "tenantId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('msi1Name')), '2023-01-31').tenantId]", + "objectId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('msi1Name')), '2023-01-31').principalId]", "permissions": { "keys": [ "WrapKey", @@ -66,8 +62,8 @@ } }, { - "tenantId": "[parameters('tenant_id')]", - "objectId": "[parameters('object_id_msi1')]", + "tenantId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('msi2Name')), '2023-01-31').tenantId]", + "objectId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('msi2Name')), '2023-01-31').principalId]", "permissions": { "keys": [ "WrapKey", @@ -87,10 +83,10 @@ { "type": "Microsoft.KeyVault/vaults/keys", "apiVersion": "2022-07-01", - "name": "[concat(parameters('key_Vault_Name'), '/key1')]", - "location": "eastus", + "name": "[concat(variables('keyVaultName'), '/key1')]", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', parameters('key_Vault_Name'))]" + "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]" ], "properties": { "attributes": { @@ -102,10 +98,10 @@ { "type": "Microsoft.KeyVault/vaults/keys", "apiVersion": "2022-07-01", - "name": "[concat(parameters('key_Vault_Name'), '/key2')]", - "location": "eastus", + "name": "[concat(variables('keyVaultName'), '/key2')]", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', parameters('key_Vault_Name'))]" + "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]" ], "properties": { "attributes": { @@ -117,10 +113,10 @@ { "type": "Microsoft.KeyVault/vaults/keys", "apiVersion": "2022-07-01", - "name": "[concat(parameters('key_Vault_Name'), '/key3')]", - "location": "eastus", + "name": "[concat(variables('keyVaultName'), '/key3')]", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', parameters('key_Vault_Name'))]" + "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]" ], "properties": { "attributes": { @@ -132,25 +128,25 @@ { "type": "Microsoft.KeyVault/vaults/keys", "apiVersion": "2022-07-01", - "name": "[concat(parameters('key_Vault_Name'), '/key4')]", - "location": "eastus", + "name": "[concat(variables('keyVaultName'), '/key4')]", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', parameters('key_Vault_Name'))]" + "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]" ], "properties": { "attributes": { "enabled": true }, - "kty": "RSA" + "kty": "RSA" } }, { "type": "Microsoft.KeyVault/vaults/keys", "apiVersion": "2022-07-01", - "name": "[concat(parameters('key_Vault_Name'), '/key5')]", - "location": "eastus", + "name": "[concat(variables('keyVaultName'), '/key5')]", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', parameters('key_Vault_Name'))]" + "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]" ], "properties": { "attributes": { @@ -162,10 +158,10 @@ { "type": "Microsoft.KeyVault/vaults/keys", "apiVersion": "2022-07-01", - "name": "[concat(parameters('key_Vault_Name'), '/key6')]", - "location": "eastus", + "name": "[concat(variables('keyVaultName'), '/key6')]", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', parameters('key_Vault_Name'))]" + "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]" ], "properties": { "attributes": { diff --git a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/parameter.json b/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/parameter.json index da7b47620942..f83ce8a664cf 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/parameter.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/parameter.json @@ -2,23 +2,41 @@ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", "contentVersion": "1.0.0.0", "parameters": { + "secondaryLocation": { + "value": "southcentralus" + }, "namespace_name": { - "value": "namespaceNamehjil09" + "value": "namespaceNameg2d9np" + }, + "standard_namespace_name": { + "value": "namespaceNamep0j7ix" }, "system_assigned_namespace_name": { - "value": "namespaceNamembaip3" + "value": "namespaceName6auipl" }, - "standard_namespace_name": { - "value": "namespaceNametkv0jq" + "primarynamespace_name": { + "value": "primaryNSibt9vz" }, - "namespaceResourceId": { - "value": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09" + "secondarynamespace_name": { + "value": "secondaryNSkhnx2q" + }, + "migrationPrimaryNamespace": { + "value": "primaryNSqi3or6" + }, + "migrationSecondaryNamespace": { + "value": "secondaryNSuegwsb" + }, + "subnet1Id": { + "value": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default" }, "peName1": { - "value": "pe1w0yv9t" + "value": "pe1ase46u" }, "peName2": { - "value": "pe2otyvgf" + "value": "pe2a10kcs" + }, + "useZoneRedundancy": { + "value": true } } } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/pre-created-resources/parameter.json b/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/pre-created-resources/parameter.json deleted file mode 100644 index 889e21dd6330..000000000000 --- a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/pre-created-resources/parameter.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "storageAccountId": { - "value": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount" - }, - "blobContainer": { - "value": "container" - }, - "virtualNetworkId": { - "value": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default" - }, - "virtualNetworkId2": { - "value": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2" - }, - "virtualNetworkId3": { - "value": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3" - }, - "msi1": { - "value": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1" - }, - "msi2": { - "value": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2" - } - } -} \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/template.json b/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/template.json index 3eacebcf70d0..cf327f046043 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/template.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/deployment-template/template.json @@ -2,38 +2,68 @@ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { + "location": { + "defaultValue": "[resourceGroup().location]", + "type": "string" + }, + "secondaryLocation": { + "defaultValue": "southcentralus", + "type": "string" + }, "namespace_name": { "defaultValue": "testSBARMTemplate", - "type": "String" + "type": "string" + }, + "standard_namespace_name": { + "defaultValue": "testSBARMTemplate", + "type": "string" }, "system_assigned_namespace_name": { "defaultValue": "AutomatedPSTesting", - "type": "String" + "type": "string" }, - "standard_namespace_name": { - "defaultValue": "testSBARMTemplate", - "type": "String" + "primarynamespace_name": { + "defaultValue": "AutomatedPSTesting", + "type": "string" }, - "namespaceResourceId": { + "secondarynamespace_name": { + "defaultValue": "testnamespace", + "type": "string" + }, + "migrationPrimaryNamespace": { + "defaultValue": "testnamespace", + "type": "string" + }, + "migrationSecondaryNamespace": { + "defaultValue": "testnamespace", + "type": "string" + }, + "subnet1Id": { "defaultValue": "/", - "type": "String" + "type": "string" }, "peName1": { "defaultValue": "/", - "type": "String" + "type": "string" }, "peName2": { "defaultValue": "/", - "type": "String" + "type": "string" + }, + "useZoneRedundancy": { + "defaultValue": true, + "type": "bool" } }, - "variables": {}, + "variables": { + "deploySecondaryNamespace": "[not(empty(parameters('secondaryLocation')))]" + }, "resources": [ { "type": "Microsoft.ServiceBus/namespaces", "apiVersion": "2022-01-01-preview", "name": "[parameters('namespace_name')]", - "location": "eastus", + "location": "[parameters('location')]", "sku": { "name": "Premium", "tier": "Premium" @@ -49,7 +79,7 @@ "type": "Microsoft.ServiceBus/namespaces", "apiVersion": "2022-01-01-preview", "name": "[parameters('standard_namespace_name')]", - "location": "eastus", + "location": "[parameters('location')]", "sku": { "name": "Standard", "tier": "Standard" @@ -65,7 +95,7 @@ "type": "Microsoft.ServiceBus/namespaces", "apiVersion": "2022-01-01-preview", "name": "[parameters('system_assigned_namespace_name')]", - "location": "eastus", + "location": "[parameters('location')]", "sku": { "name": "Premium", "tier": "Premium", @@ -78,19 +108,34 @@ "minimumTlsVersion": "1.2", "publicNetworkAccess": "Enabled", "disableLocalAuth": false, - "zoneRedundant": true, + "zoneRedundant": "[parameters('useZoneRedundancy')]", "isAutoInflateEnabled": false } }, + { + "type": "Microsoft.ServiceBus/namespaces/AuthorizationRules", + "apiVersion": "2022-01-01-preview", + "name": "[concat(parameters('namespace_name'), '/RootManageSharedAccessKey')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]" + ], + "properties": { + "rights": [ + "Listen", + "Manage", + "Send" + ] + } + }, { "type": "Microsoft.ServiceBus/namespaces/AuthorizationRules", "apiVersion": "2022-01-01-preview", "name": "[concat(parameters('namespace_name'), '/namespaceAuthRule1')]", - "location": "eastus", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]", - "[resourceId('Microsoft.ServiceBus/namespaces/AuthorizationRules', parameters('namespace_name'), 'RootManageSharedAccessKey')]", - "[resourceId('Microsoft.ServiceBus/namespaces/AuthorizationRules', parameters('namespace_name'), 'namespaceAuthRule2')]" + "[resourceId('Microsoft.ServiceBus/namespaces/AuthorizationRules', parameters('namespace_name'), 'RootManageSharedAccessKey')]" ], "properties": { "rights": [ @@ -104,10 +149,9 @@ "type": "Microsoft.ServiceBus/namespaces/AuthorizationRules", "apiVersion": "2022-01-01-preview", "name": "[concat(parameters('namespace_name'), '/namespaceAuthRule2')]", - "location": "eastus", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]", - "[resourceId('Microsoft.ServiceBus/namespaces/AuthorizationRules', parameters('namespace_name'), 'RootManageSharedAccessKey')]" + "[resourceId('Microsoft.ServiceBus/namespaces/AuthorizationRules', parameters('namespace_name'), 'namespaceAuthRule1')]" ], "properties": { "rights": [ @@ -118,15 +162,13 @@ { "type": "Microsoft.ServiceBus/namespaces/AuthorizationRules", "apiVersion": "2022-01-01-preview", - "name": "[concat(parameters('namespace_name'), '/RootManageSharedAccessKey')]", - "location": "eastus", + "name": "[concat(parameters('namespace_name'), '/namespaceAuthRule3')]", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]" + "[resourceId('Microsoft.ServiceBus/namespaces/AuthorizationRules', parameters('namespace_name'), 'namespaceAuthRule2')]" ], "properties": { "rights": [ - "Listen", - "Manage", "Send" ] } @@ -135,7 +177,7 @@ "type": "Microsoft.ServiceBus/namespaces/queues", "apiVersion": "2022-01-01-preview", "name": "[concat(parameters('namespace_name'), '/queue1')]", - "location": "eastus", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]" ], @@ -146,7 +188,7 @@ "type": "Microsoft.ServiceBus/namespaces/topics", "apiVersion": "2022-01-01-preview", "name": "[concat(parameters('namespace_name'), '/topic1')]", - "location": "eastus", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]" ], @@ -157,7 +199,7 @@ "type": "Microsoft.ServiceBus/namespaces/queues/authorizationrules", "apiVersion": "2022-01-01-preview", "name": "[concat(parameters('namespace_name'), '/queue1/queueAuthRule1')]", - "location": "eastus", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.ServiceBus/namespaces/queues', parameters('namespace_name'), 'queue1')]", "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]" @@ -174,7 +216,24 @@ "type": "Microsoft.ServiceBus/namespaces/queues/authorizationrules", "apiVersion": "2022-01-01-preview", "name": "[concat(parameters('namespace_name'), '/queue1/queueAuthRule2')]", - "location": "eastus", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces/queues', parameters('namespace_name'), 'queue1')]", + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]" + ], + "properties": { + "rights": [ + "Manage", + "Listen", + "Send" + ] + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues/authorizationrules", + "apiVersion": "2022-01-01-preview", + "name": "[concat(parameters('namespace_name'), '/queue1/queueAuthRule3')]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.ServiceBus/namespaces/queues', parameters('namespace_name'), 'queue1')]", "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]" @@ -191,7 +250,7 @@ "type": "Microsoft.ServiceBus/namespaces/topics/authorizationrules", "apiVersion": "2022-01-01-preview", "name": "[concat(parameters('namespace_name'), '/topic1/topicAuthRule1')]", - "location": "eastus", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('namespace_name'), 'topic1')]", "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]" @@ -208,7 +267,22 @@ "type": "Microsoft.ServiceBus/namespaces/topics/authorizationrules", "apiVersion": "2022-01-01-preview", "name": "[concat(parameters('namespace_name'), '/topic1/topicAuthRule2')]", - "location": "eastus", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('namespace_name'), 'topic1')]", + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]" + ], + "properties": { + "rights": [ + "Listen" + ] + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/topics/authorizationrules", + "apiVersion": "2022-01-01-preview", + "name": "[concat(parameters('namespace_name'), '/topic1/topicAuthRule3')]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('namespace_name'), 'topic1')]", "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]" @@ -223,7 +297,7 @@ "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions", "apiVersion": "2022-01-01-preview", "name": "[concat(parameters('namespace_name'), '/topic1/subscription1')]", - "location": "eastus", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('namespace_name'), 'topic1')]", "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]" @@ -235,7 +309,7 @@ "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions/rules", "apiVersion": "2022-01-01-preview", "name": "[concat(parameters('namespace_name'), '/topic1/subscription1/sqlRule1')]", - "location": "eastus", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', parameters('namespace_name'), 'topic1', 'subscription1')]", "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('namespace_name'), 'topic1')]", @@ -254,7 +328,7 @@ "type": "Microsoft.Network/privateEndpoints", "apiVersion": "2020-11-01", "name": "[parameters('peName1')]", - "location": "eastus", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]" ], @@ -264,7 +338,7 @@ { "name": "connection1", "properties": { - "privateLinkServiceId": "[parameters('namespaceResourceId')]", + "privateLinkServiceId": "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]", "groupIds": [ "namespace" ], @@ -276,7 +350,7 @@ } ], "subnet": { - "id": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default" + "id": "[parameters('subnet1Id')]" } } }, @@ -284,7 +358,7 @@ "type": "Microsoft.Network/privateEndpoints", "apiVersion": "2020-11-01", "name": "[parameters('peName2')]", - "location": "eastus", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]" ], @@ -294,7 +368,7 @@ { "name": "connection2", "properties": { - "privateLinkServiceId": "[parameters('namespaceResourceId')]", + "privateLinkServiceId": "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespace_name'))]", "groupIds": [ "namespace" ], @@ -306,9 +380,75 @@ } ], "subnet": { - "id": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default" + "id": "[parameters('subnet1Id')]" } } + }, + { + "type": "Microsoft.ServiceBus/namespaces", + "apiVersion": "2022-01-01-preview", + "name": "[parameters('primarynamespace_name')]", + "location": "[parameters('location')]", + "sku": { + "name": "Premium", + "tier": "Premium" + }, + "properties": { + "minimumTlsVersion": "1.2", + "publicNetworkAccess": "Enabled", + "disableLocalAuth": false, + "zoneRedundant": false + } + }, + { + "condition": "[variables('deploySecondaryNamespace')]", + "type": "Microsoft.ServiceBus/namespaces", + "apiVersion": "2022-01-01-preview", + "name": "[parameters('secondarynamespace_name')]", + "location": "[parameters('secondaryLocation')]", + "sku": { + "name": "Premium", + "tier": "Premium" + }, + "properties": { + "minimumTlsVersion": "1.2", + "publicNetworkAccess": "Enabled", + "disableLocalAuth": false, + "zoneRedundant": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces", + "apiVersion": "2022-01-01-preview", + "name": "[parameters('migrationPrimaryNamespace')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": { + "minimumTlsVersion": "1.2", + "publicNetworkAccess": "Enabled", + "disableLocalAuth": false, + "zoneRedundant": false + } + }, + { + "condition": "[variables('deploySecondaryNamespace')]", + "type": "Microsoft.ServiceBus/namespaces", + "apiVersion": "2022-01-01-preview", + "name": "[parameters('migrationSecondaryNamespace')]", + "location": "[parameters('secondaryLocation')]", + "sku": { + "name": "Premium", + "tier": "Premium" + }, + "properties": { + "minimumTlsVersion": "1.2", + "publicNetworkAccess": "Enabled", + "disableLocalAuth": false, + "zoneRedundant": false + } } ] } \ No newline at end of file diff --git a/src/ServiceBus/ServiceBus.Autorest/test/env.json b/src/ServiceBus/ServiceBus.Autorest/test/env.json index 6a1f9c4dcb8e..8bf1dca14682 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/env.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/env.json @@ -1,43 +1,45 @@ { - "migrationSecondaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNS5doyqa", - "queuePrimaryKey": "0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=", - "queueSecondaryKey": "0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=", - "migrationPrimaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSp1xb3a", - "namespaceV5": "namespaceV5xdns25", - "primaryNamespace": "primaryNSd7oma3", - "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "namespaceV3": "namespaceV3279pui", - "namespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/namespaceNamehjil09", - "standardNamespace": "namespaceNametkv0jq", - "topicSecondaryKey": "0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=", - "blobContainer": "container", - "subnetId1": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default", - "namespaceV4": "namespaceV4du8ar3", - "namespaceSecondaryKey": "0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=", - "subnetId2": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2", - "storageAccountId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount", - "pe2": "pe2otyvgf", - "namespaceV6": "namespaceV6umnflt", - "secondaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/secondaryNSjazpct", - "resourceGroup": "resourceGroupAutorestxe2h9c", - "postMigrationName": "postMigration2i9j5p", - "namespaceV2": "namespaceV26ovc29", - "namespaceV9": "namespaceV94qljkm", - "topicPrimaryKey": "0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=", - "migrationSecondaryNamespace": "secondaryNS5doyqa", - "alias": "aliasq6x0t1", - "namespaceV7": "namespaceV7qbxiho", - "namespace": "namespaceNamehjil09", - "keyVaultUri": "https://keyVaultNamedur8ab.vault.azure.net/", + "migrationSecondaryNamespace": "secondaryNSuegwsb", + "systemAssignedNamespaceName": "namespaceName6auipl", "SubscriptionId": "326100e2-f69d-4268-8503-075374f62b6e", - "namespacePrimaryKey": "0LEcx/yFU8sXDd2zckHjaGoPK2eXXdO2uaOftyKomHw=", - "msi2": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2", - "migrationPrimaryNamespace": "primaryNSp1xb3a", - "namespaceV8": "namespaceV85v4e0c", - "primaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestxe2h9c/providers/Microsoft.ServiceBus/namespaces/primaryNSd7oma3", - "subnetId3": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3", - "systemAssignedNamespaceName": "namespaceNamembaip3", - "msi1": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1", - "secondaryNamespace": "secondaryNSjazpct", - "pe1": "pe1w0yv9t" + "secondaryLocation": "southcentralus", + "namespaceV4": "namespaceV4jslnwt", + "subnetId2": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default2", + "namespace": "namespaceNameg2d9np", + "namespaceV8": "namespaceV8vc59lw", + "pe1": "pe1ase46u", + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "namespaceV6": "namespaceV62vmrx5", + "msi1": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi1", + "namespaceSecondaryKey": "Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=", + "queuePrimaryKey": "Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=", + "msi2": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-v8aenr-msi2", + "namespaceV3": "namespaceV3twc6l2", + "topicPrimaryKey": "Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=", + "alias": "aliastkildm", + "queueSecondaryKey": "Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=", + "secondaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSkhnx2q", + "migrationPrimaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSqi3or6", + "secondaryNamespace": "secondaryNSkhnx2q", + "pe2": "pe2a10kcs", + "postMigrationName": "postMigrationmsdlz3", + "primaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/primaryNSibt9vz", + "namespaceV7": "namespaceV7i84pmj", + "location": "eastus", + "namespacePrimaryKey": "Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=", + "subnetId3": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default3", + "usePartitionedNamespace": true, + "standardNamespace": "namespaceNamep0j7ix", + "useZoneRedundancy": true, + "primaryNamespace": "primaryNSibt9vz", + "resourceGroup": "Autorest-PS-ServiceBus-2n3eh9", + "migrationSecondaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/secondaryNSuegwsb", + "namespaceV9": "namespaceV9efv5ht", + "namespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.ServiceBus/namespaces/namespaceNameg2d9np", + "keyVaultUri": "https://sb-ps-v8aenr-kv1.vault.azure.net/", + "topicSecondaryKey": "Rjjojgc2JyxXVx3oDZbX6JAST+WlPDfEOjBL8gAwY1w=", + "migrationPrimaryNamespace": "primaryNSqi3or6", + "subnetId1": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-2n3eh9/providers/Microsoft.Network/virtualNetworks/sb-ps-v8aenr-vnet/subnets/default", + "namespaceV2": "namespaceV2rxp7v1", + "namespaceV5": "namespaceV5x9bvki" } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/localEnv.json b/src/ServiceBus/ServiceBus.Autorest/test/localEnv.json index 7bbb870b214b..3c70d78e51de 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/localEnv.json +++ b/src/ServiceBus/ServiceBus.Autorest/test/localEnv.json @@ -1,43 +1,45 @@ { - "migrationSecondaryNamespace": "secondaryNS70bd5l", + "msi2": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-6xcrdo-msi2", + "alias": "alias5016jb", + "subnetId1": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.Network/virtualNetworks/sb-ps-6xcrdo-vnet/subnets/default", + "namespaceV9": "namespaceV9915h3i", + "migrationPrimaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/primaryNSvrj1mp", + "namespace": "namespaceNamelm5sgq", + "subnetId3": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.Network/virtualNetworks/sb-ps-6xcrdo-vnet/subnets/default3", + "primaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/primaryNSr5o0yh", + "secondaryNamespace": "secondaryNSyag4fo", + "queueSecondaryKey": "TafQksEDodaUXhRzSPKal4MouzC0EssuMKhxKxzRNwg=", + "pe1": "pe1l5o69x", + "namespaceV8": "namespaceV8wyg2mx", + "namespacePrimaryKey": "TafQksEDodaUXhRzSPKal4MouzC0EssuMKhxKxzRNwg=", + "namespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/namespaceNamelm5sgq", + "usePartitionedNamespace": true, + "keyVaultUri": "https://sb-ps-6xcrdo-kv1.vault.azure.net/", + "subnetId2": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.Network/virtualNetworks/sb-ps-6xcrdo-vnet/subnets/default2", + "namespaceV3": "namespaceV3xgl2om", + "migrationPrimaryNamespace": "primaryNSvrj1mp", + "location": "eastus", + "namespaceV7": "namespaceV7lsm0rw", + "namespaceV2": "namespaceV2syp0gq", + "namespaceV4": "namespaceV416isnr", + "secondaryLocation": "southcentralus", + "migrationSecondaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/secondaryNSmb3t1u", + "msi1": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sb-ps-6xcrdo-msi1", "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "postMigrationName": "postMigration8izo02", - "queuePrimaryKey": "zobqk5Yadejx4i/IxA9S6OI1Hgh0CSzY2V/Jn2XDBbU=", - "resourceGroup": "resourceGroupAutoresth9y5k7", - "pe2": "pe2meraf2", + "secondaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-ServiceBus-zctiqf/providers/Microsoft.ServiceBus/namespaces/secondaryNSyag4fo", + "pe2": "pe2zcwl70", "SubscriptionId": "326100e2-f69d-4268-8503-075374f62b6e", - "namespaceV8": "namespaceV8564bms", - "secondaryNamespace": "secondaryNSne4fcr", - "migrationPrimaryNamespace": "primaryNS07w8gm", - "namespaceSecondaryKey": "zobqk5Yadejx4i/IxA9S6OI1Hgh0CSzY2V/Jn2XDBbU=", - "alias": "alias36f4jx", - "standardNamespace": "namespaceNamepytzea", - "keyVaultUri": "https://keyVaultName6voyhr.vault.azure.net/", - "namespacePrimaryKey": "zobqk5Yadejx4i/IxA9S6OI1Hgh0CSzY2V/Jn2XDBbU=", - "subnetId1": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default", - "namespaceV9": "namespaceV9wglq0f", - "storageAccountId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount", - "systemAssignedNamespaceName": "namespaceNamesjih2u", - "msi2": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2", - "namespaceV5": "namespaceV5dqg19s", - "topicSecondaryKey": "zobqk5Yadejx4i/IxA9S6OI1Hgh0CSzY2V/Jn2XDBbU=", - "secondaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresth9y5k7/providers/Microsoft.ServiceBus/namespaces/secondaryNSne4fcr", - "migrationSecondaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresth9y5k7/providers/Microsoft.ServiceBus/namespaces/secondaryNS70bd5l", - "namespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresth9y5k7/providers/Microsoft.ServiceBus/namespaces/namespaceNameytbhqx", - "namespaceV6": "namespaceV6knrhdl", - "queueSecondaryKey": "zobqk5Yadejx4i/IxA9S6OI1Hgh0CSzY2V/Jn2XDBbU=", - "migrationPrimaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresth9y5k7/providers/Microsoft.ServiceBus/namespaces/primaryNS07w8gm", - "namespace": "namespaceNameytbhqx", - "blobContainer": "container", - "primaryNamespace": "primaryNS8s0qhv", - "subnetId3": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default3", - "namespaceV3": "namespaceV3qortp2", - "namespaceV2": "namespaceV2rjuszc", - "msi1": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1", - "namespaceV4": "namespaceV4kvrdm7", - "primaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresth9y5k7/providers/Microsoft.ServiceBus/namespaces/primaryNS8s0qhv", - "pe1": "pe1c7vpn9", - "subnetId2": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/test-vn-northeurope/subnets/default2", - "topicPrimaryKey": "zobqk5Yadejx4i/IxA9S6OI1Hgh0CSzY2V/Jn2XDBbU=", - "namespaceV7": "namespaceV7g71pno" + "topicPrimaryKey": "TafQksEDodaUXhRzSPKal4MouzC0EssuMKhxKxzRNwg=", + "resourceGroup": "Autorest-PS-ServiceBus-zctiqf", + "namespaceV5": "namespaceV5hbmvuo", + "primaryNamespace": "primaryNSr5o0yh", + "standardNamespace": "namespaceNamesgerv4", + "postMigrationName": "postMigrationjh51xi", + "useZoneRedundancy": true, + "migrationSecondaryNamespace": "secondaryNSmb3t1u", + "systemAssignedNamespaceName": "namespaceName61l8y5", + "namespaceSecondaryKey": "TafQksEDodaUXhRzSPKal4MouzC0EssuMKhxKxzRNwg=", + "topicSecondaryKey": "TafQksEDodaUXhRzSPKal4MouzC0EssuMKhxKxzRNwg=", + "namespaceV6": "namespaceV6psbrf2", + "queuePrimaryKey": "TafQksEDodaUXhRzSPKal4MouzC0EssuMKhxKxzRNwg=" } diff --git a/src/ServiceBus/ServiceBus.Autorest/test/utils.ps1 b/src/ServiceBus/ServiceBus.Autorest/test/utils.ps1 index 105961a9c953..51e08f38fb87 100644 --- a/src/ServiceBus/ServiceBus.Autorest/test/utils.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/test/utils.ps1 @@ -5,31 +5,6 @@ function RandomString([bool]$allChars, [int32]$len) { return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) } } -function Start-TestSleep { - [CmdletBinding(DefaultParameterSetName = 'SleepBySeconds')] - param( - [parameter(Mandatory = $true, Position = 0, ParameterSetName = 'SleepBySeconds')] - [ValidateRange(0.0, 2147483.0)] - [double] $Seconds, - - [parameter(Mandatory = $true, ParameterSetName = 'SleepByMilliseconds')] - [ValidateRange('NonNegative')] - [Alias('ms')] - [int] $Milliseconds - ) - - if ($TestMode -ne 'playback') { - switch ($PSCmdlet.ParameterSetName) { - 'SleepBySeconds' { - Start-Sleep -Seconds $Seconds - } - 'SleepByMilliseconds' { - Start-Sleep -Milliseconds $Milliseconds - } - } - } -} - $env = @{} if ($UsePreviousConfigForRecord) { $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json @@ -38,13 +13,18 @@ if ($UsePreviousConfigForRecord) { # Add script method called AddWithCache to $env, when useCache is set true, it will try to get the value from the $env first. # example: $val = $env.AddWithCache('key', $val, $true) $env | Add-Member -Type ScriptMethod -Value { param( [string]$key, [object]$val, [bool]$useCache) if ($this.Contains($key) -and $useCache) { return $this[$key] } else { $this[$key] = $val; return $val } } -Name 'AddWithCache' -function setupEnv() { +function setupEnv( + $location = 'eastus', + $secondaryLocation = 'southcentralus', + $usePartitionedNamespace = $true, + $useZoneRedundancy = $true, + $verbose = $false) { # Preload subscriptionId and tenant from context, which will be used in test # as default. You could change them if needed. $env.SubscriptionId = (Get-AzContext).Subscription.Id $env.Tenant = (Get-AzContext).Tenant.Id # For any resources you created for test, you should add it to $env here. - $resourceGroup = "resourceGroupAutorest" + (RandomString -allChars $false -len 6) + $resourceGroup = "Autorest-PS-ServiceBus-" + (RandomString -allChars $false -len 6) $namespaceName = "namespaceName" + (RandomString -allChars $false -len 6) $namespaceV2 = "namespaceV2" + (RandomString -allChars $false -len 6) $namespaceV3 = "namespaceV3" + (RandomString -allChars $false -len 6) @@ -54,26 +34,43 @@ function setupEnv() { $namespaceV7 = "namespaceV7" + (RandomString -allChars $false -len 6) $namespaceV8 = "namespaceV8" + (RandomString -allChars $false -len 6) $namespaceV9 = "namespaceV9" + (RandomString -allChars $false -len 6) - #$msi1 = "msi1" + (RandomString -allChars $false -len 6) - #$msi2 = "msi2" + (RandomString -allChars $false -len 6) $standardNamespaceName = "namespaceName" + (RandomString -allChars $false -len 6) $systemAssignedNamespaceName = "namespaceName" + (RandomString -allChars $false -len 6) - $keyVaultName = "keyVaultName" + (RandomString -allChars $false -len 6) + $dependentResourcesPrefix = "sb-ps-" + (RandomString -allChars $false -len 6) + $keyVaultName = $dependentResourcesPrefix + "-kv1" $keyVaultUri = "https://" + $keyVaultName + ".vault.azure.net/" - $namespaceResourceId = "/subscriptions/" + $env.SubscriptionId + "/resourceGroups/" + $resourceGroup + "/providers/Microsoft.ServiceBus/namespaces/" + $namespaceName + $resourceGroupArmId = "/subscriptions/" + $env.SubscriptionId + "/resourceGroups/" + $resourceGroup + $namespaceResourceId = $resourceGroupArmId + "/providers/Microsoft.ServiceBus/namespaces/" + $namespaceName $primaryNamespaceName = "primaryNS" + (RandomString -allChars $false -len 6) - $primaryNamespaceResourceId = "/subscriptions/" + $env.SubscriptionId + "/resourceGroups/" + $resourceGroup + "/providers/Microsoft.ServiceBus/namespaces/" + $primaryNamespaceName + $primaryNamespaceResourceId = $resourceGroupArmId + "/providers/Microsoft.ServiceBus/namespaces/" + $primaryNamespaceName $secondaryNamespaceName = "secondaryNS" + (RandomString -allChars $false -len 6) - $secondaryNamespaceResourceId = "/subscriptions/" + $env.SubscriptionId + "/resourceGroups/" + $resourceGroup + "/providers/Microsoft.ServiceBus/namespaces/" + $secondaryNamespaceName + $secondaryNamespaceResourceId = $resourceGroupArmId + "/providers/Microsoft.ServiceBus/namespaces/" + $secondaryNamespaceName $migrationPrimaryNamespaceName = "primaryNS" + (RandomString -allChars $false -len 6) - $migrationPrimaryNamespaceResourceId = "/subscriptions/" + $env.SubscriptionId + "/resourceGroups/" + $resourceGroup + "/providers/Microsoft.ServiceBus/namespaces/" + $migrationPrimaryNamespaceName + $migrationPrimaryNamespaceResourceId = $resourceGroupArmId + "/providers/Microsoft.ServiceBus/namespaces/" + $migrationPrimaryNamespaceName $migrationSecondaryNamespaceName = "secondaryNS" + (RandomString -allChars $false -len 6) - $migrationSecondaryNamespaceResourceId = "/subscriptions/" + $env.SubscriptionId + "/resourceGroups/" + $resourceGroup + "/providers/Microsoft.ServiceBus/namespaces/" + $migrationSecondaryNamespaceName + $migrationSecondaryNamespaceResourceId = $resourceGroupArmId + "/providers/Microsoft.ServiceBus/namespaces/" + $migrationSecondaryNamespaceName + $vnetResourceId = "$resourceGroupArmId/providers/Microsoft.Network/virtualNetworks/$dependentResourcesPrefix-vnet" + $subnet1ResourceId = "$vnetResourceId/subnets/default" + $subnet2ResourceId = "$vnetResourceId/subnets/default2" + $subnet3ResourceId = "$vnetResourceId/subnets/default3" + $msi1ResourceId = "$resourceGroupArmId/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$dependentResourcesPrefix-msi1" + $msi2ResourceId = "$resourceGroupArmId/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$dependentResourcesPrefix-msi2" $peName1 = "pe1" + (RandomString -allChars $false -len 6) $peName2 = "pe2" + (RandomString -allChars $false -len 6) $alias = "alias" + (RandomString -allChars $false -len 6) $postMigrationName = "postMigration" + (RandomString -allChars $false -len 6) + $namespacePrimaryKey = GenerateSASKey + $namespaceSecondaryKey = GenerateSASKey + $queuePrimaryKey = GenerateSASKey + $queueSecondaryKey = GenerateSASKey + $topicPrimaryKey = GenerateSASKey + $topicSecondaryKey = GenerateSASKey + + $env.Add("location", $location) + $env.Add("secondaryLocation", $secondaryLocation) + $env.Add("useZoneRedundancy", $useZoneRedundancy) + $env.Add("usePartitionedNamespace", $usePartitionedNamespace) $env.Add('resourceGroup', $resourceGroup) $env.Add('namespace', $namespaceName) $env.Add("namespaceV2", $namespaceV2) @@ -100,13 +97,11 @@ function setupEnv() { $env.Add('pe1', $peName1) $env.Add('pe2', $peName2) $env.Add('alias', $alias) - - $namespacePrimaryKey = GenerateSASKey - $namespaceSecondaryKey = GenerateSASKey - $queuePrimaryKey = GenerateSASKey - $queueSecondaryKey = GenerateSASKey - $topicPrimaryKey = GenerateSASKey - $topicSecondaryKey = GenerateSASKey + $env.Add("subnetId1", $subnet1ResourceId) + $env.Add("subnetId2", $subnet2ResourceId) + $env.Add("subnetId3", $subnet3ResourceId) + $env.Add("msi1", $msi1ResourceId) + $env.Add("msi2", $msi2ResourceId) $env.Add('namespacePrimaryKey', $namespacePrimaryKey) $env.Add('namespaceSecondaryKey', $namespaceSecondaryKey) @@ -115,52 +110,50 @@ function setupEnv() { $env.Add('topicPrimaryKey', $topicPrimaryKey) $env.Add('topicSecondaryKey', $topicSecondaryKey) - New-AzResourceGroup -Name $resourceGroup -Location eastus + Write-Host -ForegroundColor Magenta "Creating resource group $resourceGroup in $location" + + New-AzResourceGroup -Name $resourceGroup -Location $location -Verbose:$verbose + + Write-Host -ForegroundColor Magenta "Deploying dependencies ARM template" + + $dependentResourcesTemplate = Get-Content .\test\deployment-template\DependentResourcesParameters.json | ConvertFrom-Json + $dependentResourcesTemplate.parameters.resource_name_prefix.value = $dependentResourcesPrefix + $dependentResourcesTemplate.parameters.useZoneRedundancy.value = $useZoneRedundancy + Set-Content -Path .\test\deployment-template\DependentResourcesParameters.json -Value (ConvertTo-Json $dependentResourcesTemplate) + $rg = New-AzResourceGroupDeployment -TemplateFile .\test\deployment-template\DependentResourcesTemplate.json -TemplateParameterFile .\test\deployment-template\DependentResourcesParameters.json -Name dependenciesTemplate -ResourceGroupName $resourceGroup -Verbose:$verbose + + Write-Host -ForegroundColor Magenta "Deployed dependencies ARM template" + + Write-Host -ForegroundColor Magenta "Deploying Service Bus namespace template" $serviceBusTemplate = Get-Content .\test\deployment-template\parameter.json | ConvertFrom-Json + $serviceBusTemplate.parameters.secondaryLocation.value = $secondaryLocation $serviceBusTemplate.parameters.namespace_name.value = $namespaceName $serviceBusTemplate.parameters.standard_namespace_name.value = $standardNamespaceName $serviceBusTemplate.parameters.system_assigned_namespace_name.value = $systemAssignedNamespaceName - $serviceBusTemplate.parameters.namespaceResourceId.value = $namespaceResourceId - $serviceBusTemplate.parameters.peName1.value = $peName1 - $serviceBusTemplate.parameters.peName2.value = $peName2 - Set-Content -Path .\test\deployment-template\parameter.json -Value (ConvertTo-Json $serviceBusTemplate) - $rg = New-AzResourceGroupDeployment -TemplateFile .\test\deployment-template\template.json -TemplateParameterFile .\test\deployment-template\parameter.json -Name serviceBusTemplate -ResourceGroupName $resourceGroup - - $serviceBusTemplate = Get-Content .\test\deployment-template\DisasterRecoveryParameter.json | ConvertFrom-Json $serviceBusTemplate.parameters.primarynamespace_name.value = $primaryNamespaceName $serviceBusTemplate.parameters.secondarynamespace_name.value = $secondaryNamespaceName $serviceBusTemplate.parameters.migrationPrimaryNamespace.value = $migrationPrimaryNamespaceName $serviceBusTemplate.parameters.migrationSecondaryNamespace.value = $migrationSecondaryNamespaceName - Set-Content -Path .\test\deployment-template\DisasterRecoveryParameter.json -Value (ConvertTo-Json $serviceBusTemplate) - $rg = New-AzResourceGroupDeployment -TemplateFile .\test\deployment-template\DisasterRecoveryTemplate.json -TemplateParameterFile .\test\deployment-template\DisasterRecoveryParameter.json -Name disasterRecoveryTemplate -ResourceGroupName $resourceGroup + $serviceBusTemplate.parameters.subnet1Id.value = $subnet1ResourceId + $serviceBusTemplate.parameters.peName1.value = $peName1 + $serviceBusTemplate.parameters.peName2.value = $peName2 + $serviceBusTemplate.parameters.useZoneRedundancy.value = $useZoneRedundancy + Set-Content -Path .\test\deployment-template\parameter.json -Value (ConvertTo-Json $serviceBusTemplate) + $rg = New-AzResourceGroupDeployment -TemplateFile .\test\deployment-template\template.json -TemplateParameterFile .\test\deployment-template\parameter.json -Name serviceBusTemplate -ResourceGroupName $resourceGroup -Verbose:$verbose - #$resourceNames = Get-Content .\test\deployment-template\pre-created-resources\parameter.json | ConvertFrom-Json - #$env.Add("subnetId1", $resourceNames.parameters.virtualNetworkId.Value) - #$env.Add("subnetId2", $resourceNames.parameters.virtualNetworkId2.Value) - #$env.Add("subnetId3", $resourceNames.parameters.virtualNetworkId3.Value) + Write-Host -ForegroundColor Magenta "Deployed Service Bus namespace template" - Write-Host -ForegroundColor Magenta "Deploying KeyVault ARM template" + Write-Host -ForegroundColor Magenta "Deploying KeyVault ARM template" - $namespace = Get-AzServiceBusNamespaceV2 -ResourceGroupName $env.resourceGroup -NamespaceName $env.systemAssignedNamespaceName - $keyVaultTemplate = Get-Content .\test\deployment-template\keyVaultParameter.json | ConvertFrom-Json - $keyVaultTemplate.parameters.key_Vault_Name.value = $keyVaultName - $keyVaultTemplate.parameters.tenant_id.value = $env.Tenant - $keyVaultTemplate.parameters.object_id.value = $namespace.PrincipalId - Set-Content -Path .\test\deployment-template\keyVaultParameter.json -Value (ConvertTo-Json $keyVaultTemplate) - $rg = New-AzResourceGroupDeployment -TemplateFile .\test\deployment-template\keyVaultTemplate.json -TemplateParameterFile .\test\deployment-template\keyVaultParameter.json -Name keyVaultTemplate -ResourceGroupName $resourceGroup + $keyVaultTemplate = Get-Content .\test\deployment-template\KeyVaultParameters.json | ConvertFrom-Json + $keyVaultTemplate.parameters.resource_name_prefix.value = $dependentResourcesPrefix + $keyVaultTemplate.parameters.system_assigned_namespace_name.value = $systemAssignedNamespaceName + Set-Content -Path .\test\deployment-template\KeyVaultParameters.json -Value (ConvertTo-Json $keyVaultTemplate) + $rg = New-AzResourceGroupDeployment -TemplateFile .\test\deployment-template\KeyVaultTemplate.json -TemplateParameterFile .\test\deployment-template\KeyVaultParameters.json -Name keyVaultTemplate -ResourceGroupName $resourceGroup -Verbose:$verbose Write-Host -ForegroundColor Magenta "Deployed KeyVault ARM template" - $resourceNames = Get-Content .\test\deployment-template\pre-created-resources\parameter.json | ConvertFrom-Json - $env.Add("storageAccountId", $resourceNames.parameters.storageAccountId.Value) - $env.Add("blobContainer", $resourceNames.parameters.blobContainer.Value) - $env.Add("subnetId1", $resourceNames.parameters.virtualNetworkId.Value) - $env.Add("subnetId2", $resourceNames.parameters.virtualNetworkId2.Value) - $env.Add("subnetId3", $resourceNames.parameters.virtualNetworkId3.Value) - $env.Add("msi1", $resourceNames.parameters.msi1.Value) - $env.Add("msi2", $resourceNames.parameters.msi2.Value) - $envFile = 'env.json' if ($TestMode -eq 'live') { $envFile = 'localEnv.json' @@ -183,8 +176,9 @@ function GenerateSASKey { $Signature } -function cleanupEnv() { +function cleanupEnv( + $verbose = $false) { # Clean resources you create for testing - Remove-AzResourceGroup -Name $env.resourceGroup + Remove-AzResourceGroup -Name $env.resourceGroup -Confirm:$false -Verbose:$verbose } diff --git a/src/ServiceBus/ServiceBus/Az.ServiceBus.psd1 b/src/ServiceBus/ServiceBus/Az.ServiceBus.psd1 index a57e8bfcb55f..5f43fc42cd11 100644 --- a/src/ServiceBus/ServiceBus/Az.ServiceBus.psd1 +++ b/src/ServiceBus/ServiceBus/Az.ServiceBus.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 23/04/2024 +# Generated on: 5/6/2024 # @{ @@ -60,13 +60,13 @@ RequiredAssemblies = 'Microsoft.Azure.Management.ServiceBus.dll', 'ServiceBus.Autorest/bin/Az.ServiceBus.private.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() +ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() +TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = 'ServiceBus.Autorest\Az.ServiceBus.format.ps1xml', +FormatsToProcess = 'ServiceBus.Autorest/Az.ServiceBus.format.ps1xml', 'ServiceBus.format.ps1xml' # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess @@ -132,7 +132,7 @@ PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','ServiceBus' + Tags = 'Azure', 'ResourceManager', 'ARM', 'ServiceBus' # A URL to the license for this module. LicenseUri = 'https://aka.ms/azps-license' @@ -157,7 +157,7 @@ PrivateData = @{ } # End of PSData hashtable - } # End of PrivateData hashtable +} # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' diff --git a/src/ServiceBus/ServiceBus/ChangeLog.md b/src/ServiceBus/ServiceBus/ChangeLog.md index c706f75b5569..dbe81073dd1c 100644 --- a/src/ServiceBus/ServiceBus/ChangeLog.md +++ b/src/ServiceBus/ServiceBus/ChangeLog.md @@ -19,6 +19,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Moved cmdlets to V4. ## Version 3.1.1 * Introduced secrets detection feature to safeguard sensitive data. diff --git a/src/ServiceBus/ServiceBus/help/Approve-AzServiceBusPrivateEndpointConnection.md b/src/ServiceBus/ServiceBus/help/Approve-AzServiceBusPrivateEndpointConnection.md index 00a926310e25..e1903742ce8f 100644 --- a/src/ServiceBus/ServiceBus/help/Approve-AzServiceBusPrivateEndpointConnection.md +++ b/src/ServiceBus/ServiceBus/help/Approve-AzServiceBusPrivateEndpointConnection.md @@ -16,13 +16,13 @@ Approves a ServiceBus PrivateEndpointConnection ``` Approve-AzServiceBusPrivateEndpointConnection -NamespaceName -ResourceGroupName [-Name ] [-SubscriptionId ] [-Description ] [-DefaultProfile ] [-AsJob] - [-NoWait] [] + [-NoWait] [-ProgressAction ] [] ``` ### SetViaIdentityExpanded ``` Approve-AzServiceBusPrivateEndpointConnection -InputObject [-Description ] - [-DefaultProfile ] [-AsJob] [-NoWait] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -176,6 +176,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -216,7 +231,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Az.ServiceBus.md b/src/ServiceBus/ServiceBus/help/Az.ServiceBus.md index ac01c9006cb7..243257ea9c2f 100644 --- a/src/ServiceBus/ServiceBus/help/Az.ServiceBus.md +++ b/src/ServiceBus/ServiceBus/help/Az.ServiceBus.md @@ -64,7 +64,7 @@ Creates a ServiceBus Namespace, Queue, Topic Authorization Rule Generates a SAS token for Azure servicebus authorization rule of namespace/queue/topic. ### [New-AzServiceBusGeoDRConfiguration](New-AzServiceBusGeoDRConfiguration.md) -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) ### [New-AzServiceBusIPRuleConfig](New-AzServiceBusIPRuleConfig.md) Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzServiceBusNetworkRuleSet @@ -79,17 +79,17 @@ Create an in-memory object for KeyVaultProperties. Creates a new ServiceBus namespace. ### [New-AzServiceBusQueue](New-AzServiceBusQueue.md) -Creates or updates a Service Bus queue. +Create a Service Bus queue. This operation is idempotent. ### [New-AzServiceBusRule](New-AzServiceBusRule.md) -Creates a new rule and updates an existing rule +Create a new rule and updates an existing rule ### [New-AzServiceBusSubscription](New-AzServiceBusSubscription.md) -Creates a topic subscription. +Create a topic subscription. ### [New-AzServiceBusTopic](New-AzServiceBusTopic.md) -Creates a topic in the specified namespace. +Create a topic in the specified namespace. ### [New-AzServiceBusVirtualNetworkRuleConfig](New-AzServiceBusVirtualNetworkRuleConfig.md) Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzServiceBusNetworkRuleSet @@ -150,7 +150,7 @@ Updates a ServiceBus Subscription Updates a ServiceBus Topic ### [Start-AzServiceBusMigration](Start-AzServiceBusMigration.md) -Creates Migration configuration and starts migration of entities from Standard to Premium namespace +Create Migration configuration and starts migration of entities from Standard to Premium namespace ### [Stop-AzServiceBusMigration](Stop-AzServiceBusMigration.md) This operation reverts Migration diff --git a/src/ServiceBus/ServiceBus/help/Complete-AzServiceBusMigration.md b/src/ServiceBus/ServiceBus/help/Complete-AzServiceBusMigration.md index 97d07f13eff8..d4c61ce76a63 100644 --- a/src/ServiceBus/ServiceBus/help/Complete-AzServiceBusMigration.md +++ b/src/ServiceBus/ServiceBus/help/Complete-AzServiceBusMigration.md @@ -16,14 +16,14 @@ CompleteMigration operation will fail when entity migration is in-progress. ### Complete (Default) ``` Complete-AzServiceBusMigration -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-PassThru] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CompleteViaIdentity ``` Complete-AzServiceBusMigration -InputObject [-DefaultProfile ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -60,7 +60,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -104,6 +103,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. diff --git a/src/ServiceBus/ServiceBus/help/Deny-AzServiceBusPrivateEndpointConnection.md b/src/ServiceBus/ServiceBus/help/Deny-AzServiceBusPrivateEndpointConnection.md index 33f218b776d8..b0e031f87ae0 100644 --- a/src/ServiceBus/ServiceBus/help/Deny-AzServiceBusPrivateEndpointConnection.md +++ b/src/ServiceBus/ServiceBus/help/Deny-AzServiceBusPrivateEndpointConnection.md @@ -16,13 +16,13 @@ Denies a ServiceBus PrivateEndpointConnection ``` Deny-AzServiceBusPrivateEndpointConnection -NamespaceName -ResourceGroupName [-Name ] [-SubscriptionId ] [-Description ] [-DefaultProfile ] [-AsJob] [-NoWait] - [] + [-ProgressAction ] [] ``` ### SetViaIdentityExpanded ``` Deny-AzServiceBusPrivateEndpointConnection -InputObject [-Description ] - [-DefaultProfile ] [-AsJob] [-NoWait] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -176,6 +176,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -216,7 +231,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusAuthorizationRule.md b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusAuthorizationRule.md index 177e46f553f6..daadb3c3ef3c 100644 --- a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusAuthorizationRule.md +++ b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusAuthorizationRule.md @@ -15,7 +15,7 @@ Gets the Authorization Rule of a ServiceBus namespace, queue or topic. ### GetExpandedNamespace (Default) ``` Get-AzServiceBusAuthorizationRule -NamespaceName -ResourceGroupName [-Name ] - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -23,27 +23,27 @@ Get-AzServiceBusAuthorizationRule -NamespaceName -ResourceGroupName -ResourceGroupName [-Name ] [-SubscriptionId ] -QueueName [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetExpandedTopic ``` Get-AzServiceBusAuthorizationRule -NamespaceName -ResourceGroupName [-Name ] [-SubscriptionId ] -TopicName [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetExpandedAlias ``` Get-AzServiceBusAuthorizationRule -NamespaceName -ResourceGroupName [-Name ] [-SubscriptionId ] -AliasName [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentityExpanded ``` Get-AzServiceBusAuthorizationRule -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -168,6 +168,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -QueueName The name of the Service Bus queue. @@ -238,7 +253,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusGeoDRConfiguration.md b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusGeoDRConfiguration.md index 2d2872568a77..7a589f6b34e1 100644 --- a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusGeoDRConfiguration.md +++ b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusGeoDRConfiguration.md @@ -15,21 +15,27 @@ Retrieves Alias(Disaster Recovery configuration) for primary or secondary namesp ### List (Default) ``` Get-AzServiceBusGeoDRConfiguration -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` +### GetViaIdentityNamespace +``` +Get-AzServiceBusGeoDRConfiguration -Name -NamespaceInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + ### Get ``` Get-AzServiceBusGeoDRConfiguration -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzServiceBusGeoDRConfiguration -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -76,7 +82,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -95,7 +100,7 @@ The Disaster Recovery configuration name ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: GetViaIdentityNamespace, Get Aliases: Required: True @@ -105,6 +110,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -120,6 +140,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -160,7 +195,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusKey.md b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusKey.md index be774d85d36f..cad8c914af97 100644 --- a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusKey.md +++ b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusKey.md @@ -16,28 +16,28 @@ Gets the SASKey of a ServiceBus namespace, queue or topic. ``` Get-AzServiceBusKey -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [] + [-ProgressAction ] [] ``` ### GetExpandedAlias ``` Get-AzServiceBusKey -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] -AliasName [-DefaultProfile ] [-AsJob] [-NoWait] - [] + [-ProgressAction ] [] ``` ### GetExpandedTopic ``` Get-AzServiceBusKey -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] -TopicName [-DefaultProfile ] [-AsJob] [-NoWait] - [] + [-ProgressAction ] [] ``` ### GetExpandedQueue ``` Get-AzServiceBusKey -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] -QueueName [-DefaultProfile ] [-AsJob] [-NoWait] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -188,6 +188,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -QueueName The name of the ServiceBus queue. @@ -256,7 +271,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusMigration.md b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusMigration.md index d5558eccb077..d74b5399d609 100644 --- a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusMigration.md +++ b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusMigration.md @@ -15,19 +15,19 @@ Retrieves Migration Config ### Get (Default) ``` Get-AzServiceBusMigration -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### List ``` Get-AzServiceBusMigration -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzServiceBusMigration -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -82,7 +82,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -111,6 +110,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -151,7 +165,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusNamespace.md b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusNamespace.md index 2262f0c030f7..b7a675759d71 100644 --- a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusNamespace.md +++ b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusNamespace.md @@ -15,25 +15,25 @@ Gets a description for the specified namespace. ### List (Default) ``` Get-AzServiceBusNamespace [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### Get ``` Get-AzServiceBusNamespace -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### List1 ``` Get-AzServiceBusNamespace -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzServiceBusNamespace -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -138,7 +138,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -167,6 +166,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -207,7 +221,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace ## NOTES @@ -216,3 +230,8 @@ ALIASES Get-AzServiceBusNamespaceV2 ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx) + +[https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx) + diff --git a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusNetworkRuleSet.md b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusNetworkRuleSet.md index 5988be6ca4c3..306e8acb1aca 100644 --- a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusNetworkRuleSet.md +++ b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusNetworkRuleSet.md @@ -15,19 +15,19 @@ Gets NetworkRuleSet for a Namespace. ### Get (Default) ``` Get-AzServiceBusNetworkRuleSet -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### List ``` Get-AzServiceBusNetworkRuleSet -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzServiceBusNetworkRuleSet -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -73,7 +73,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -102,6 +101,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -142,7 +156,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusPrivateEndpointConnection.md b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusPrivateEndpointConnection.md index 3b15bf11cbfb..5308da17dbc4 100644 --- a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusPrivateEndpointConnection.md +++ b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusPrivateEndpointConnection.md @@ -15,21 +15,27 @@ Gets a description for the specified Private Endpoint Connection. ### List (Default) ``` Get-AzServiceBusPrivateEndpointConnection -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` +### GetViaIdentityNamespace +``` +Get-AzServiceBusPrivateEndpointConnection -Name -NamespaceInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + ### Get ``` Get-AzServiceBusPrivateEndpointConnection -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzServiceBusPrivateEndpointConnection -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -83,7 +89,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -102,7 +107,7 @@ The PrivateEndpointConnection name ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: GetViaIdentityNamespace, Get Aliases: PrivateEndpointConnectionName Required: True @@ -112,6 +117,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -127,6 +147,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -167,8 +202,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection ## NOTES ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx) + +[https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx) + diff --git a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusPrivateLink.md b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusPrivateLink.md index 1e3fa55d586b..11e05f9f75d9 100644 --- a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusPrivateLink.md +++ b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusPrivateLink.md @@ -14,7 +14,7 @@ Gets lists of resources that supports Privatelinks. ``` Get-AzServiceBusPrivateLink -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -71,6 +71,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -109,8 +124,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResourcesListResult ## NOTES ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx) + diff --git a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusQueue.md b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusQueue.md index 59a357a3d7fb..cc4435e35534 100644 --- a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusQueue.md +++ b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusQueue.md @@ -15,21 +15,27 @@ Returns a description for the specified queue. ### List (Default) ``` Get-AzServiceBusQueue -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-Skip ] [-Top ] [-DefaultProfile ] + [-Skip ] [-Top ] [-DefaultProfile ] [-ProgressAction ] [] ``` +### GetViaIdentityNamespace +``` +Get-AzServiceBusQueue -Name -NamespaceInputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + ### Get ``` Get-AzServiceBusQueue -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzServiceBusQueue -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -103,7 +109,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -122,7 +127,7 @@ The queue name. ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: GetViaIdentityNamespace, Get Aliases: QueueName Required: True @@ -132,6 +137,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -147,6 +167,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -218,8 +253,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue ## NOTES ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639380.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639380.aspx) + +[https://msdn.microsoft.com/en-us/library/azure/mt639415.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639415.aspx) + diff --git a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusRule.md b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusRule.md index 152733449f38..25a989449b79 100644 --- a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusRule.md +++ b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusRule.md @@ -16,6 +16,25 @@ Retrieves the description for the specified rule. ``` Get-AzServiceBusRule -NamespaceName -ResourceGroupName [-SubscriptionId ] -SubscriptionName -TopicName [-Skip ] [-Top ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentityTopic +``` +Get-AzServiceBusRule -Name -SubscriptionName -TopicInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentitySubscription +``` +Get-AzServiceBusRule -Name -SubscriptionInputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentityNamespace +``` +Get-AzServiceBusRule -Name -SubscriptionName -TopicName + -NamespaceInputObject [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -23,13 +42,13 @@ Get-AzServiceBusRule -NamespaceName -ResourceGroupName [-Subsc ``` Get-AzServiceBusRule -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] -SubscriptionName -TopicName [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzServiceBusRule -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -94,7 +113,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -113,7 +131,7 @@ The rule name. ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: GetViaIdentityTopic, GetViaIdentitySubscription, GetViaIdentityNamespace, Get Aliases: RuleName Required: True @@ -123,6 +141,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -138,6 +171,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -169,12 +217,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -SubscriptionInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentitySubscription +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -SubscriptionName The subscription name. ```yaml Type: System.String -Parameter Sets: List, Get +Parameter Sets: List, GetViaIdentityTopic, GetViaIdentityNamespace, Get Aliases: Required: True @@ -199,12 +262,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -TopicInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentityTopic +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -TopicName The topic name. ```yaml Type: System.String -Parameter Sets: List, Get +Parameter Sets: List, GetViaIdentityNamespace, Get Aliases: Required: True @@ -239,7 +317,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusSubscription.md b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusSubscription.md index 62554e3609f9..b20ec44143fe 100644 --- a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusSubscription.md +++ b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusSubscription.md @@ -16,20 +16,32 @@ Returns a subscription description for the specified topic. ``` Get-AzServiceBusSubscription -NamespaceName -ResourceGroupName [-SubscriptionId ] -TopicName [-Skip ] [-Top ] [-DefaultProfile ] - [] + [-ProgressAction ] [] +``` + +### GetViaIdentityTopic +``` +Get-AzServiceBusSubscription -Name -TopicInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentityNamespace +``` +Get-AzServiceBusSubscription -Name -TopicName -NamespaceInputObject + [-DefaultProfile ] [-ProgressAction ] [] ``` ### Get ``` Get-AzServiceBusSubscription -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] -TopicName [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzServiceBusSubscription -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -103,7 +115,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -122,7 +133,7 @@ The subscription name. ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: GetViaIdentityTopic, GetViaIdentityNamespace, Get Aliases: SubscriptionName Required: True @@ -132,6 +143,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -147,6 +173,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -193,12 +234,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -TopicInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentityTopic +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -TopicName The topic name. ```yaml Type: System.String -Parameter Sets: List, Get +Parameter Sets: List, GetViaIdentityNamespace, Get Aliases: Required: True @@ -233,8 +289,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription ## NOTES ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639402.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639402.aspx) + +[https://msdn.microsoft.com/en-us/library/azure/mt639400.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639400.aspx) + diff --git a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusTopic.md b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusTopic.md index d1b9550e96b6..961a634fef36 100644 --- a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusTopic.md +++ b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusTopic.md @@ -15,21 +15,27 @@ Returns a description for the specified topic. ### List (Default) ``` Get-AzServiceBusTopic -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-Skip ] [-Top ] [-DefaultProfile ] + [-Skip ] [-Top ] [-DefaultProfile ] [-ProgressAction ] [] ``` +### GetViaIdentityNamespace +``` +Get-AzServiceBusTopic -Name -NamespaceInputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + ### Get ``` Get-AzServiceBusTopic -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzServiceBusTopic -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -93,7 +99,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -112,7 +117,7 @@ The topic name. ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: GetViaIdentityNamespace, Get Aliases: TopicName Required: True @@ -122,6 +127,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -137,6 +157,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -208,8 +243,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic ## NOTES ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639399.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639399.aspx) + +[https://msdn.microsoft.com/en-us/library/azure/mt639388.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639388.aspx) + diff --git a/src/ServiceBus/ServiceBus/help/New-AzServiceBusAuthorizationRule.md b/src/ServiceBus/ServiceBus/help/New-AzServiceBusAuthorizationRule.md index 1518b20f2b6a..8dedebee039b 100644 --- a/src/ServiceBus/ServiceBus/help/New-AzServiceBusAuthorizationRule.md +++ b/src/ServiceBus/ServiceBus/help/New-AzServiceBusAuthorizationRule.md @@ -15,22 +15,22 @@ Creates a ServiceBus Namespace, Queue, Topic Authorization Rule ### NewExpandedNamespace (Default) ``` New-AzServiceBusAuthorizationRule -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] -Rights [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-SubscriptionId ] -Rights [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### NewExpandedQueue ``` New-AzServiceBusAuthorizationRule -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] -QueueName -Rights [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-SubscriptionId ] -QueueName -Rights [-DefaultProfile ] [-AsJob] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### NewExpandedTopic ``` New-AzServiceBusAuthorizationRule -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] -TopicName -Rights [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-SubscriptionId ] -TopicName -Rights [-DefaultProfile ] [-AsJob] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -145,6 +145,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -QueueName The name of the Service Bus Queue. @@ -180,7 +195,7 @@ Accept wildcard characters: False The rights associated with the rule. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[] +Type: System.String[] Parameter Sets: (All) Aliases: @@ -259,7 +274,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/New-AzServiceBusAuthorizationRuleSASToken.md b/src/ServiceBus/ServiceBus/help/New-AzServiceBusAuthorizationRuleSASToken.md index 5a9261e299c0..cba28883c7dc 100644 --- a/src/ServiceBus/ServiceBus/help/New-AzServiceBusAuthorizationRuleSASToken.md +++ b/src/ServiceBus/ServiceBus/help/New-AzServiceBusAuthorizationRuleSASToken.md @@ -15,7 +15,7 @@ Generates a SAS token for Azure servicebus authorization rule of namespace/queue ``` New-AzServiceBusAuthorizationRuleSASToken [-AuthorizationRuleId] [-KeyType] [-ExpiryTime] [-StartTime ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -103,6 +103,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -StartTime Start Time diff --git a/src/ServiceBus/ServiceBus/help/New-AzServiceBusGeoDRConfiguration.md b/src/ServiceBus/ServiceBus/help/New-AzServiceBusGeoDRConfiguration.md index 8bc2e61eb333..69b82bb0a68f 100644 --- a/src/ServiceBus/ServiceBus/help/New-AzServiceBusGeoDRConfiguration.md +++ b/src/ServiceBus/ServiceBus/help/New-AzServiceBusGeoDRConfiguration.md @@ -8,18 +8,33 @@ schema: 2.0.0 # New-AzServiceBusGeoDRConfiguration ## SYNOPSIS -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) ## SYNTAX +### CreateExpanded (Default) ``` New-AzServiceBusGeoDRConfiguration -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-AlternateName ] [-PartnerNamespace ] [-DefaultProfile ] - [-PassThru] [-WhatIf] [-Confirm] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzServiceBusGeoDRConfiguration -Name -NamespaceInputObject + [-AlternateName ] [-PartnerNamespace ] [-DefaultProfile ] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentityNamespace +``` +New-AzServiceBusGeoDRConfiguration -Name -NamespaceInputObject + -Parameter [-DefaultProfile ] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) ## EXAMPLES @@ -50,7 +65,7 @@ Primary/Secondary eventhub namespace name, which is part of GEO DR pairing ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -91,12 +106,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: CreateViaIdentityNamespaceExpanded, CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -106,12 +136,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +Single item in List or Get Alias(Disaster Recovery configuration) operation + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery +Parameter Sets: CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -PartnerNamespace ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -136,12 +181,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -157,7 +217,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -203,9 +263,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery + +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IArmDisasterRecovery ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/New-AzServiceBusIPRuleConfig.md b/src/ServiceBus/ServiceBus/help/New-AzServiceBusIPRuleConfig.md index a7a5d1a13cb5..caaed729a082 100644 --- a/src/ServiceBus/ServiceBus/help/New-AzServiceBusIPRuleConfig.md +++ b/src/ServiceBus/ServiceBus/help/New-AzServiceBusIPRuleConfig.md @@ -13,7 +13,7 @@ Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzService ## SYNTAX ``` -New-AzServiceBusIPRuleConfig -IPMask [-Action ] +New-AzServiceBusIPRuleConfig -IPMask [-Action ] [-ProgressAction ] [] ``` @@ -41,7 +41,7 @@ Please refer examples for Set-AzServiceBusNetworkRuleSet to know more. The IP Filter Action ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction +Type: System.String Parameter Sets: (All) Aliases: @@ -67,6 +67,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -74,7 +89,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/New-AzServiceBusKey.md b/src/ServiceBus/ServiceBus/help/New-AzServiceBusKey.md index b159416c9516..8d5f94f3e593 100644 --- a/src/ServiceBus/ServiceBus/help/New-AzServiceBusKey.md +++ b/src/ServiceBus/ServiceBus/help/New-AzServiceBusKey.md @@ -15,23 +15,23 @@ Regenerates the SASKey of a ServiceBus namespace, queue or topic. ### NewExpandedNamespace (Default) ``` New-AzServiceBusKey -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] -KeyType [-KeyValue ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-SubscriptionId ] -KeyType [-KeyValue ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### NewExpandedTopic ``` New-AzServiceBusKey -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] -TopicName -KeyType [-KeyValue ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-SubscriptionId ] -TopicName -KeyType [-KeyValue ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### NewExpandedQueue ``` New-AzServiceBusKey -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] -QueueName -KeyType [-KeyValue ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-SubscriptionId ] -QueueName -KeyType [-KeyValue ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -121,7 +121,7 @@ Accept wildcard characters: False The access key to regenerate. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType +Type: System.String Parameter Sets: (All) Aliases: RegenerateKey @@ -192,6 +192,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -QueueName The name of the ServiceBus queue. @@ -291,7 +306,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IAccessKeys +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IAccessKeys ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/New-AzServiceBusKeyVaultPropertiesObject.md b/src/ServiceBus/ServiceBus/help/New-AzServiceBusKeyVaultPropertiesObject.md index 4be441372d69..bc9e053dac67 100644 --- a/src/ServiceBus/ServiceBus/help/New-AzServiceBusKeyVaultPropertiesObject.md +++ b/src/ServiceBus/ServiceBus/help/New-AzServiceBusKeyVaultPropertiesObject.md @@ -1,7 +1,7 @@ --- external help file: Az.ServiceBus-help.xml Module Name: Az.ServiceBus -online version: https://learn.microsoft.com/powershell/module/Az.ServiceBus/new-AzServiceBusKeyVaultPropertiesObject +online version: https://learn.microsoft.com/powershell/module/Az.ServiceBus/new-azservicebuskeyvaultpropertiesobject schema: 2.0.0 --- @@ -14,7 +14,7 @@ Create an in-memory object for KeyVaultProperties. ``` New-AzServiceBusKeyVaultPropertiesObject [-KeyName ] [-KeyVaultUri ] [-KeyVersion ] - [-UserAssignedIdentity ] [] + [-UserAssignedIdentity ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -100,6 +100,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -UserAssignedIdentity ARM ID of user Identity selected for encryption. @@ -122,7 +137,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.KeyVaultProperties +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.KeyVaultProperties ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/New-AzServiceBusNamespace.md b/src/ServiceBus/ServiceBus/help/New-AzServiceBusNamespace.md index c146447f0f5c..a3b603f79d28 100644 --- a/src/ServiceBus/ServiceBus/help/New-AzServiceBusNamespace.md +++ b/src/ServiceBus/ServiceBus/help/New-AzServiceBusNamespace.md @@ -15,11 +15,11 @@ Creates a new ServiceBus namespace. ``` New-AzServiceBusNamespace -Name -ResourceGroupName [-SubscriptionId ] -Location [-AlternateName ] [-DisableLocalAuth] [-KeyVaultProperty ] - [-PremiumMessagingPartition ] [-RequireInfrastructureEncryption] - [-IdentityType ] [-ZoneRedundant] [-UserAssignedIdentityId ] - [-MinimumTlsVersion ] [-PublicNetworkAccess ] [-SkuName ] - [-SkuCapacity ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-PremiumMessagingPartition ] [-RequireInfrastructureEncryption] [-IdentityType ] + [-ZoneRedundant] [-UserAssignedIdentityId ] [-MinimumTlsVersion ] + [-PublicNetworkAccess ] [-SkuName ] [-SkuCapacity ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -263,7 +263,7 @@ Accept wildcard characters: False Type of managed service identity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType +Type: System.String Parameter Sets: (All) Aliases: @@ -276,10 +276,9 @@ Accept wildcard characters: False ### -KeyVaultProperty Properties of KeyVault -To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties[] Parameter Sets: (All) Aliases: @@ -368,12 +367,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PublicNetworkAccess This determines if traffic is allowed over public network. By default it is enabled. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess +Type: System.String Parameter Sets: (All) Aliases: @@ -434,7 +448,7 @@ Accept wildcard characters: False Name of this SKU. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName +Type: System.String Parameter Sets: (All) Aliases: @@ -543,7 +557,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/New-AzServiceBusQueue.md b/src/ServiceBus/ServiceBus/help/New-AzServiceBusQueue.md index f23eae115b09..64e37d2d17d2 100644 --- a/src/ServiceBus/ServiceBus/help/New-AzServiceBusQueue.md +++ b/src/ServiceBus/ServiceBus/help/New-AzServiceBusQueue.md @@ -8,11 +8,12 @@ schema: 2.0.0 # New-AzServiceBusQueue ## SYNOPSIS -Creates or updates a Service Bus queue. +Create a Service Bus queue. This operation is idempotent. ## SYNTAX +### CreateExpanded (Default) ``` New-AzServiceBusQueue -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-AutoDeleteOnIdle ] [-DeadLetteringOnMessageExpiration] @@ -20,12 +21,29 @@ New-AzServiceBusQueue -Name -NamespaceName -ResourceGroupName [-EnableBatchedOperations] [-EnableExpress] [-EnablePartitioning] [-ForwardDeadLetteredMessagesTo ] [-ForwardTo ] [-LockDuration ] [-MaxDeliveryCount ] [-MaxMessageSizeInKilobytes ] [-MaxSizeInMegabytes ] [-RequiresDuplicateDetection] - [-RequiresSession] [-Status ] [-DefaultProfile ] + [-RequiresSession] [-Status ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` +### CreateViaIdentityNamespaceExpanded +``` +New-AzServiceBusQueue -Name -NamespaceInputObject [-AutoDeleteOnIdle ] + [-DeadLetteringOnMessageExpiration] [-DefaultMessageTimeToLive ] + [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] [-EnableExpress] + [-EnablePartitioning] [-ForwardDeadLetteredMessagesTo ] [-ForwardTo ] + [-LockDuration ] [-MaxDeliveryCount ] [-MaxMessageSizeInKilobytes ] + [-MaxSizeInMegabytes ] [-RequiresDuplicateDetection] [-RequiresSession] [-Status ] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentityNamespace +``` +New-AzServiceBusQueue -Name -NamespaceInputObject -Parameter + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + ## DESCRIPTION -Creates or updates a Service Bus queue. +Create a Service Bus queue. This operation is idempotent. ## EXAMPLES @@ -77,7 +95,7 @@ The minimum duration is 5 minutes. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -92,7 +110,7 @@ A value that indicates whether this queue has dead letter support when a message ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -108,7 +126,7 @@ This is the default value used when TimeToLive is not set on a message itself. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -140,7 +158,7 @@ The default value is 10 minutes. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -155,7 +173,7 @@ Value that indicates whether server-side batched operations are enabled. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -171,7 +189,7 @@ An express queue holds a message in memory temporarily before writing it to pers ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -186,7 +204,7 @@ A value that indicates whether the queue is to be partitioned across multiple me ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -201,7 +219,7 @@ Queue/Topic name to forward the Dead Letter message ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -216,7 +234,7 @@ Queue/Topic name to forward the messages ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -232,7 +250,7 @@ The maximum value for LockDuration is 5 minutes; the default value is 1 minute. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -249,7 +267,7 @@ default value is 10. ```yaml Type: System.Int32 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -265,7 +283,7 @@ This property is only used in Premium today and default is 1024. ```yaml Type: System.Int64 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -281,7 +299,7 @@ Default is 1024. ```yaml Type: System.Int32 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -306,12 +324,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: CreateViaIdentityNamespaceExpanded, CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -321,12 +354,42 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +Description of queue Resource. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue +Parameter Sets: CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RequiresDuplicateDetection A value indicating if this queue requires duplicate detection. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -341,7 +404,7 @@ A value that indicates whether the queue supports the concept of sessions. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -356,7 +419,7 @@ Name of the Resource group within the Azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -370,8 +433,8 @@ Accept wildcard characters: False Enumerates the possible values for the status of a messaging entity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -387,7 +450,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -433,10 +496,17 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue + +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue ## NOTES ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639395.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639395.aspx) + diff --git a/src/ServiceBus/ServiceBus/help/New-AzServiceBusRule.md b/src/ServiceBus/ServiceBus/help/New-AzServiceBusRule.md index 4f8402757cb5..bbdb5c8d7162 100644 --- a/src/ServiceBus/ServiceBus/help/New-AzServiceBusRule.md +++ b/src/ServiceBus/ServiceBus/help/New-AzServiceBusRule.md @@ -8,22 +8,76 @@ schema: 2.0.0 # New-AzServiceBusRule ## SYNOPSIS -Creates a new rule and updates an existing rule +Create a new rule and updates an existing rule ## SYNTAX +### CreateExpanded (Default) ``` New-AzServiceBusRule -Name -NamespaceName -ResourceGroupName - -SubscriptionName -TopicName [-SubscriptionId ] [-ActionRequiresPreprocessing] + [-SubscriptionId ] -SubscriptionName -TopicName [-ActionRequiresPreprocessing] [-ActionSqlExpression ] [-ContentType ] [-CorrelationFilterProperty ] - [-CorrelationFilterRequiresPreprocessing] [-CorrelationId ] [-FilterType ] - [-Label ] [-MessageId ] [-ReplyTo ] [-ReplyToSessionId ] [-SessionId ] + [-CorrelationFilterRequiresPreprocessing] [-CorrelationId ] [-FilterType ] [-Label ] + [-MessageId ] [-ReplyTo ] [-ReplyToSessionId ] [-SessionId ] [-SqlExpression ] [-SqlFilterRequiresPreprocessing] [-To ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentityTopicExpanded +``` +New-AzServiceBusRule -Name -SubscriptionName -TopicInputObject + [-ActionRequiresPreprocessing] [-ActionSqlExpression ] [-ContentType ] + [-CorrelationFilterProperty ] [-CorrelationFilterRequiresPreprocessing] [-CorrelationId ] + [-FilterType ] [-Label ] [-MessageId ] [-ReplyTo ] + [-ReplyToSessionId ] [-SessionId ] [-SqlExpression ] [-SqlFilterRequiresPreprocessing] + [-To ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaIdentityTopic +``` +New-AzServiceBusRule -Name -SubscriptionName -TopicInputObject + -Parameter [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzServiceBusRule -Name -SubscriptionName -TopicName + -NamespaceInputObject [-ActionRequiresPreprocessing] [-ActionSqlExpression ] + [-ContentType ] [-CorrelationFilterProperty ] [-CorrelationFilterRequiresPreprocessing] + [-CorrelationId ] [-FilterType ] [-Label ] [-MessageId ] [-ReplyTo ] + [-ReplyToSessionId ] [-SessionId ] [-SqlExpression ] [-SqlFilterRequiresPreprocessing] + [-To ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaIdentityNamespace +``` +New-AzServiceBusRule -Name -SubscriptionName -TopicName + -NamespaceInputObject -Parameter [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentitySubscriptionExpanded +``` +New-AzServiceBusRule -Name -SubscriptionInputObject + [-ActionRequiresPreprocessing] [-ActionSqlExpression ] [-ContentType ] + [-CorrelationFilterProperty ] [-CorrelationFilterRequiresPreprocessing] [-CorrelationId ] + [-FilterType ] [-Label ] [-MessageId ] [-ReplyTo ] + [-ReplyToSessionId ] [-SessionId ] [-SqlExpression ] [-SqlFilterRequiresPreprocessing] + [-To ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaIdentitySubscription +``` +New-AzServiceBusRule -Name -SubscriptionInputObject -Parameter + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Creates a new rule and updates an existing rule +Create a new rule and updates an existing rule ## EXAMPLES @@ -97,7 +151,7 @@ Value that indicates whether the rule action requires preprocessing. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityTopicExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded Aliases: Required: False @@ -114,7 +168,7 @@ MyProperty='ABC' ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityTopicExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded Aliases: Required: False @@ -129,7 +183,7 @@ Content type of the message. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityTopicExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded Aliases: Required: False @@ -144,7 +198,7 @@ dictionary object for custom filters ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityTopicExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded Aliases: Required: False @@ -159,7 +213,7 @@ Value that indicates whether the rule action requires preprocessing. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityTopicExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded Aliases: Required: False @@ -174,7 +228,7 @@ Identifier of the correlation. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityTopicExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded Aliases: Required: False @@ -204,8 +258,8 @@ Accept wildcard characters: False Filter type that is evaluated against a BrokeredMessage. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityTopicExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded Aliases: Required: False @@ -220,7 +274,7 @@ Application specific label. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityTopicExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded Aliases: Required: False @@ -235,7 +289,7 @@ Identifier of the message. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityTopicExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded Aliases: Required: False @@ -260,17 +314,62 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: CreateViaIdentityNamespaceExpanded, CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Parameter +Description of Rule Resource. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule +Parameter Sets: CreateViaIdentityTopic, CreateViaIdentityNamespace, CreateViaIdentitySubscription Aliases: Required: True Position: Named Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -280,7 +379,7 @@ Address of the queue to reply to. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityTopicExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded Aliases: Required: False @@ -295,7 +394,7 @@ Session identifier to reply to. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityTopicExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded Aliases: Required: False @@ -310,7 +409,7 @@ Name of the Resource group within the Azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -325,7 +424,7 @@ Session identifier. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityTopicExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded Aliases: Required: False @@ -342,7 +441,7 @@ MyProperty='ABC' ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityTopicExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded Aliases: Required: False @@ -357,7 +456,7 @@ Value that indicates whether the rule action requires preprocessing. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityTopicExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded Aliases: Required: False @@ -373,7 +472,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -383,12 +482,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -SubscriptionInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: CreateViaIdentitySubscriptionExpanded, CreateViaIdentitySubscription +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -SubscriptionName The subscription name. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityTopicExpanded, CreateViaIdentityTopic, CreateViaIdentityNamespaceExpanded, CreateViaIdentityNamespace Aliases: Required: True @@ -403,7 +517,7 @@ Address to send to. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityTopicExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentitySubscriptionExpanded Aliases: Required: False @@ -413,12 +527,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -TopicInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: CreateViaIdentityTopicExpanded, CreateViaIdentityTopic +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -TopicName The topic name. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityNamespace Aliases: Required: True @@ -464,9 +593,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule + +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/New-AzServiceBusSubscription.md b/src/ServiceBus/ServiceBus/help/New-AzServiceBusSubscription.md index 571999c7091f..a2c80cf5de6a 100644 --- a/src/ServiceBus/ServiceBus/help/New-AzServiceBusSubscription.md +++ b/src/ServiceBus/ServiceBus/help/New-AzServiceBusSubscription.md @@ -8,23 +8,60 @@ schema: 2.0.0 # New-AzServiceBusSubscription ## SYNOPSIS -Creates a topic subscription. +Create a topic subscription. ## SYNTAX +### CreateExpanded (Default) ``` New-AzServiceBusSubscription -Name -NamespaceName -ResourceGroupName - -TopicName [-SubscriptionId ] [-AutoDeleteOnIdle ] [-ClientId ] + [-SubscriptionId ] -TopicName [-AutoDeleteOnIdle ] [-ClientId ] [-DeadLetteringOnFilterEvaluationException] [-DeadLetteringOnMessageExpiration] [-DefaultMessageTimeToLive ] [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] [-ForwardDeadLetteredMessagesTo ] [-ForwardTo ] [-IsClientAffine] [-IsDurable] [-IsShared] [-LockDuration ] [-MaxDeliveryCount ] [-RequiresSession] - [-Status ] [-DefaultProfile ] [-WhatIf] + [-Status ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzServiceBusSubscription -Name -TopicName -NamespaceInputObject + [-AutoDeleteOnIdle ] [-ClientId ] [-DeadLetteringOnFilterEvaluationException] + [-DeadLetteringOnMessageExpiration] [-DefaultMessageTimeToLive ] + [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] + [-ForwardDeadLetteredMessagesTo ] [-ForwardTo ] [-IsClientAffine] [-IsDurable] [-IsShared] + [-LockDuration ] [-MaxDeliveryCount ] [-RequiresSession] [-Status ] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentityNamespace +``` +New-AzServiceBusSubscription -Name -TopicName -NamespaceInputObject + -Parameter [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + +### CreateViaIdentityTopicExpanded +``` +New-AzServiceBusSubscription -Name -TopicInputObject + [-AutoDeleteOnIdle ] [-ClientId ] [-DeadLetteringOnFilterEvaluationException] + [-DeadLetteringOnMessageExpiration] [-DefaultMessageTimeToLive ] + [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] + [-ForwardDeadLetteredMessagesTo ] [-ForwardTo ] [-IsClientAffine] [-IsDurable] [-IsShared] + [-LockDuration ] [-MaxDeliveryCount ] [-RequiresSession] [-Status ] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentityTopic +``` +New-AzServiceBusSubscription -Name -TopicInputObject + -Parameter [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Creates a topic subscription. +Create a topic subscription. ## EXAMPLES @@ -75,7 +112,7 @@ The minimum duration is 5 minutes. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -90,7 +127,7 @@ Indicates the Client ID of the application that created the client-affine subscr ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -105,7 +142,7 @@ Value that indicates whether a subscription has dead letter support on filter ev ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -120,7 +157,7 @@ Value that indicates whether a subscription has dead letter support when a messa ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -136,7 +173,7 @@ This is the default value used when TimeToLive is not set on a message itself. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -168,7 +205,7 @@ The default value is 10 minutes. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -183,7 +220,7 @@ Value that indicates whether server-side batched operations are enabled. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -198,7 +235,7 @@ Queue/Topic name to forward the Dead Letter message ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -213,7 +250,7 @@ Queue/Topic name to forward the messages ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -228,7 +265,7 @@ Value that indicates whether the subscription has an affinity to the client id. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -243,7 +280,7 @@ For client-affine subscriptions, this value indicates whether the subscription i ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -258,7 +295,7 @@ For client-affine subscriptions, this value indicates whether the subscription i ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -274,7 +311,7 @@ The maximum value for LockDuration is 5 minutes; the default value is 1 minute. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -289,7 +326,7 @@ Number of maximum deliveries. ```yaml Type: System.Int32 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -314,12 +351,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: CreateViaIdentityNamespaceExpanded, CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -329,12 +381,42 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +Description of subscription resource. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription +Parameter Sets: CreateViaIdentityNamespace, CreateViaIdentityTopic +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RequiresSession Value indicating if a subscription supports the concept of sessions. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -349,7 +431,7 @@ Name of the Resource group within the Azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -363,8 +445,8 @@ Accept wildcard characters: False Enumerates the possible values for the status of a messaging entity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityTopicExpanded Aliases: Required: False @@ -380,7 +462,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -390,12 +472,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -TopicInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: CreateViaIdentityTopicExpanded, CreateViaIdentityTopic +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -TopicName The topic name. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityNamespace Aliases: Required: True @@ -441,10 +538,17 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription + +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription ## NOTES ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx) + diff --git a/src/ServiceBus/ServiceBus/help/New-AzServiceBusTopic.md b/src/ServiceBus/ServiceBus/help/New-AzServiceBusTopic.md index bc1ec9bff15f..2e5fa1c938c6 100644 --- a/src/ServiceBus/ServiceBus/help/New-AzServiceBusTopic.md +++ b/src/ServiceBus/ServiceBus/help/New-AzServiceBusTopic.md @@ -8,21 +8,37 @@ schema: 2.0.0 # New-AzServiceBusTopic ## SYNOPSIS -Creates a topic in the specified namespace. +Create a topic in the specified namespace. ## SYNTAX +### CreateExpanded (Default) ``` New-AzServiceBusTopic -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-AutoDeleteOnIdle ] [-DefaultMessageTimeToLive ] [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] [-EnableExpress] [-EnablePartitioning] [-MaxMessageSizeInKilobytes ] [-MaxSizeInMegabytes ] - [-RequiresDuplicateDetection] [-Status ] [-SupportOrdering] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-RequiresDuplicateDetection] [-Status ] [-SupportOrdering] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzServiceBusTopic -Name -NamespaceInputObject [-AutoDeleteOnIdle ] + [-DefaultMessageTimeToLive ] [-DuplicateDetectionHistoryTimeWindow ] + [-EnableBatchedOperations] [-EnableExpress] [-EnablePartitioning] [-MaxMessageSizeInKilobytes ] + [-MaxSizeInMegabytes ] [-RequiresDuplicateDetection] [-Status ] [-SupportOrdering] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentityNamespace +``` +New-AzServiceBusTopic -Name -NamespaceInputObject -Parameter + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Creates a topic in the specified namespace. +Create a topic in the specified namespace. ## EXAMPLES @@ -68,7 +84,7 @@ The minimum duration is 5 minutes. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -84,7 +100,7 @@ This is the default value used when TimeToLive is not set on a message itself. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -116,7 +132,7 @@ The default value is 10 minutes. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -131,7 +147,7 @@ Value that indicates whether server-side batched operations are enabled. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -147,7 +163,7 @@ An express topic holds a message in memory temporarily before writing it to pers ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -162,7 +178,7 @@ Value that indicates whether the topic to be partitioned across multiple message ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -178,7 +194,7 @@ This property is only used in Premium today and default is 1024. ```yaml Type: System.Int64 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -194,7 +210,7 @@ Default is 1024. ```yaml Type: System.Int32 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -219,17 +235,62 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: CreateViaIdentityNamespaceExpanded, CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Parameter +Description of topic resource. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic +Parameter Sets: CreateViaIdentityNamespace Aliases: Required: True Position: Named Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -239,7 +300,7 @@ Value indicating if this topic requires duplicate detection. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -254,7 +315,7 @@ Name of the Resource group within the Azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -268,8 +329,8 @@ Accept wildcard characters: False Enumerates the possible values for the status of a messaging entity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -285,7 +346,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -300,7 +361,7 @@ Value that indicates whether the topic supports ordering. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -346,10 +407,17 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic + +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic ## NOTES ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx) + diff --git a/src/ServiceBus/ServiceBus/help/New-AzServiceBusVirtualNetworkRuleConfig.md b/src/ServiceBus/ServiceBus/help/New-AzServiceBusVirtualNetworkRuleConfig.md index 7ec55863fdd2..6042d92bb8cd 100644 --- a/src/ServiceBus/ServiceBus/help/New-AzServiceBusVirtualNetworkRuleConfig.md +++ b/src/ServiceBus/ServiceBus/help/New-AzServiceBusVirtualNetworkRuleConfig.md @@ -14,7 +14,7 @@ Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzService ``` New-AzServiceBusVirtualNetworkRuleConfig -SubnetId [-IgnoreMissingVnetServiceEndpoint] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -52,6 +52,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -SubnetId Resource ID of Virtual Network Subnet @@ -74,7 +89,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusAuthorizationRule.md b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusAuthorizationRule.md index 1b5afafb7d27..390d99a90821 100644 --- a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusAuthorizationRule.md +++ b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusAuthorizationRule.md @@ -16,27 +16,27 @@ Removes the Authorization Rule of a ServiceBus Namespace, Queue or Topic ``` Remove-AzServiceBusAuthorizationRule -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### RemoveExpandedQueue ``` Remove-AzServiceBusAuthorizationRule -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] -QueueName [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### RemoveExpandedTopic ``` Remove-AzServiceBusAuthorizationRule -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] -TopicName [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### RemoveViaIdentityExpanded ``` Remove-AzServiceBusAuthorizationRule -InputObject [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -151,6 +151,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -QueueName The name of the ServiceBus Queue entity. @@ -252,7 +267,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusGeoDRConfiguration.md b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusGeoDRConfiguration.md index 17225f7cc140..e9bb0e669828 100644 --- a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusGeoDRConfiguration.md +++ b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusGeoDRConfiguration.md @@ -15,14 +15,21 @@ Deletes an Alias(Disaster Recovery configuration) ### Delete (Default) ``` Remove-AzServiceBusGeoDRConfiguration -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [-PassThru] + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzServiceBusGeoDRConfiguration -Name -NamespaceInputObject + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + ### DeleteViaIdentity ``` Remove-AzServiceBusGeoDRConfiguration -InputObject [-DefaultProfile ] - [-PassThru] [-WhatIf] [-Confirm] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -57,7 +64,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -76,7 +82,7 @@ The Disaster Recovery configuration name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: Required: True @@ -86,6 +92,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -116,6 +137,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. diff --git a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusMigration.md b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusMigration.md index a4e78777ee40..e28b92c78c3e 100644 --- a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusMigration.md +++ b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusMigration.md @@ -15,14 +15,14 @@ Deletes a MigrationConfiguration ### Delete (Default) ``` Remove-AzServiceBusMigration -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-PassThru] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzServiceBusMigration -InputObject [-DefaultProfile ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -57,7 +57,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -101,6 +100,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. diff --git a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusNamespace.md b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusNamespace.md index 3d0b6d79f1fb..ada0c781c290 100644 --- a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusNamespace.md +++ b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusNamespace.md @@ -16,14 +16,14 @@ This operation also removes all associated resources under the namespace. ### Delete (Default) ``` Remove-AzServiceBusNamespace -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzServiceBusNamespace -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-WhatIf] [-Confirm] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -82,7 +82,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -141,6 +140,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -221,3 +235,6 @@ ALIASES Remove-AzServiceBusNamespaceV2 ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx) + diff --git a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusPrivateEndpointConnection.md b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusPrivateEndpointConnection.md index 9661b82502e3..8f008897bf9f 100644 --- a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusPrivateEndpointConnection.md +++ b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusPrivateEndpointConnection.md @@ -16,13 +16,20 @@ Deletes an existing Private Endpoint Connection. ``` Remove-AzServiceBusPrivateEndpointConnection -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### DeleteViaIdentityNamespace +``` +Remove-AzServiceBusPrivateEndpointConnection -Name -NamespaceInputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzServiceBusPrivateEndpointConnection -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] + [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -72,7 +79,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -91,7 +97,7 @@ The PrivateEndpointConnection name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: PrivateEndpointConnectionName Required: True @@ -101,6 +107,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -146,6 +167,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -222,3 +258,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx) + diff --git a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusQueue.md b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusQueue.md index 95031a2c6457..1727024febaa 100644 --- a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusQueue.md +++ b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusQueue.md @@ -15,14 +15,21 @@ Deletes a queue from the specified namespace in a resource group. ### Delete (Default) ``` Remove-AzServiceBusQueue -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [-PassThru] + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzServiceBusQueue -Name -NamespaceInputObject + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + ### DeleteViaIdentity ``` Remove-AzServiceBusQueue -InputObject [-DefaultProfile ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -57,7 +64,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -76,7 +82,7 @@ The queue name. ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: QueueName Required: True @@ -86,6 +92,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -116,6 +137,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -192,3 +228,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639411.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639411.aspx) + diff --git a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusRule.md b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusRule.md index e1368ebb0194..6ff3373877c4 100644 --- a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusRule.md +++ b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusRule.md @@ -16,13 +16,34 @@ Deletes an existing rule. ``` Remove-AzServiceBusRule -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] -SubscriptionName -TopicName [-DefaultProfile ] - [-PassThru] [-WhatIf] [-Confirm] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### DeleteViaIdentityTopic +``` +Remove-AzServiceBusRule -Name -SubscriptionName -TopicInputObject + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### DeleteViaIdentitySubscription +``` +Remove-AzServiceBusRule -Name -SubscriptionInputObject + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### DeleteViaIdentityNamespace +``` +Remove-AzServiceBusRule -Name -SubscriptionName -TopicName + -NamespaceInputObject [-DefaultProfile ] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzServiceBusRule -InputObject [-DefaultProfile ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -57,7 +78,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -76,7 +96,7 @@ The rule name. ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityTopic, DeleteViaIdentitySubscription, DeleteViaIdentityNamespace Aliases: RuleName Required: True @@ -86,6 +106,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -116,6 +151,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -147,12 +197,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -SubscriptionInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentitySubscription +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -SubscriptionName The subscription name. ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityTopic, DeleteViaIdentityNamespace Aliases: Required: True @@ -162,12 +227,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -TopicInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentityTopic +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -TopicName The topic name. ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: Required: True diff --git a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusSubscription.md b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusSubscription.md index 1a33b8903c47..5588d0edfb57 100644 --- a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusSubscription.md +++ b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusSubscription.md @@ -16,13 +16,27 @@ Deletes a subscription from the specified topic. ``` Remove-AzServiceBusSubscription -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] -TopicName [-DefaultProfile ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### DeleteViaIdentityTopic +``` +Remove-AzServiceBusSubscription -Name -TopicInputObject + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### DeleteViaIdentityNamespace +``` +Remove-AzServiceBusSubscription -Name -TopicName -NamespaceInputObject + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### DeleteViaIdentity ``` Remove-AzServiceBusSubscription -InputObject [-DefaultProfile ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -57,7 +71,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -76,7 +89,7 @@ The subscription name. ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityTopic, DeleteViaIdentityNamespace Aliases: SubscriptionName Required: True @@ -86,6 +99,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -116,6 +144,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -147,12 +190,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -TopicInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentityTopic +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -TopicName The topic name. ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: Required: True @@ -207,3 +265,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639381.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639381.aspx) + diff --git a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusTopic.md b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusTopic.md index 8d423c520518..217033ae3b6b 100644 --- a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusTopic.md +++ b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusTopic.md @@ -15,14 +15,21 @@ Deletes a topic from the specified namespace and resource group. ### Delete (Default) ``` Remove-AzServiceBusTopic -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [-PassThru] + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzServiceBusTopic -Name -NamespaceInputObject + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + ### DeleteViaIdentity ``` Remove-AzServiceBusTopic -InputObject [-DefaultProfile ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -57,7 +64,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -76,7 +82,7 @@ The topic name. ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: TopicName Required: True @@ -86,6 +92,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The namespace name @@ -116,6 +137,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -192,3 +228,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639404.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639404.aspx) + diff --git a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusAuthorizationRule.md b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusAuthorizationRule.md index 15fe73b5fbea..b267e6978f1d 100644 --- a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusAuthorizationRule.md +++ b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusAuthorizationRule.md @@ -15,28 +15,28 @@ Updates the authorization rule of a ServiceBus namespace, queue or topic. ### SetExpandedNamespace (Default) ``` Set-AzServiceBusAuthorizationRule -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] -Rights [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-SubscriptionId ] -Rights [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### SetExpandedTopic ``` Set-AzServiceBusAuthorizationRule -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] -TopicName -Rights [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-SubscriptionId ] -TopicName -Rights [-DefaultProfile ] [-AsJob] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### SetExpandedQueue ``` Set-AzServiceBusAuthorizationRule -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] -QueueName -Rights [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-SubscriptionId ] -QueueName -Rights [-DefaultProfile ] [-AsJob] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### SetViaIdentityExpanded ``` -Set-AzServiceBusAuthorizationRule -InputObject -Rights - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] +Set-AzServiceBusAuthorizationRule -InputObject -Rights + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -170,6 +170,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -QueueName The name of the ServiceBus queue. @@ -205,7 +220,7 @@ Accept wildcard characters: False The rights associated with the rule. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[] +Type: System.String[] Parameter Sets: (All) Aliases: @@ -286,7 +301,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbAuthorizationRule ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusGeoDRConfigurationBreakPair.md b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusGeoDRConfigurationBreakPair.md index ecb87cf14f75..f86ce4e6a2af 100644 --- a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusGeoDRConfigurationBreakPair.md +++ b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusGeoDRConfigurationBreakPair.md @@ -16,13 +16,13 @@ This operation disables the Disaster Recovery and stops replicating changes from ``` Set-AzServiceBusGeoDRConfigurationBreakPair -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### BreakViaIdentity ``` Set-AzServiceBusGeoDRConfigurationBreakPair -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -130,6 +130,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusGeoDRConfigurationFailOver.md b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusGeoDRConfigurationFailOver.md index 4f72d7f369f1..366aed519a9a 100644 --- a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusGeoDRConfigurationFailOver.md +++ b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusGeoDRConfigurationFailOver.md @@ -16,13 +16,13 @@ Invokes GEO DR failover and reconfigure the alias to point to the secondary name ``` Set-AzServiceBusGeoDRConfigurationFailOver -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### FailViaIdentity ``` Set-AzServiceBusGeoDRConfigurationFailOver -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -130,6 +130,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNamespace.md b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNamespace.md index ae072a43d085..ec790f19e4c1 100644 --- a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNamespace.md +++ b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNamespace.md @@ -16,21 +16,19 @@ Updates a ServiceBus namespace ``` Set-AzServiceBusNamespace -Name -ResourceGroupName [-SubscriptionId ] [-AlternateName ] [-DisableLocalAuth] [-KeyVaultProperty ] - [-RequireInfrastructureEncryption] [-IdentityType ] - [-UserAssignedIdentityId ] [-MinimumTlsVersion ] - [-PublicNetworkAccess ] [-SkuName ] [-SkuCapacity ] [-Tag ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] + [-RequireInfrastructureEncryption] [-IdentityType ] [-UserAssignedIdentityId ] + [-MinimumTlsVersion ] [-PublicNetworkAccess ] [-SkuName ] [-SkuCapacity ] + [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` ### SetViaIdentityExpanded ``` Set-AzServiceBusNamespace [-InputObject ] [-AlternateName ] [-DisableLocalAuth] - [-KeyVaultProperty ] [-RequireInfrastructureEncryption] - [-IdentityType ] [-UserAssignedIdentityId ] - [-MinimumTlsVersion ] [-PublicNetworkAccess ] [-SkuName ] - [-SkuCapacity ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-KeyVaultProperty ] [-RequireInfrastructureEncryption] [-IdentityType ] + [-UserAssignedIdentityId ] [-MinimumTlsVersion ] [-PublicNetworkAccess ] + [-SkuName ] [-SkuCapacity ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -352,7 +350,7 @@ Accept wildcard characters: False Type of managed service identity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType +Type: System.String Parameter Sets: (All) Aliases: @@ -381,10 +379,9 @@ Accept wildcard characters: False ### -KeyVaultProperty Properties of KeyVault -To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IKeyVaultProperties[] +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties[] Parameter Sets: (All) Aliases: @@ -441,12 +438,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PublicNetworkAccess This determines if traffic is allowed over public network. By default it is enabled. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess +Type: System.String Parameter Sets: (All) Aliases: @@ -507,7 +519,7 @@ Accept wildcard characters: False Name of this SKU. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName +Type: System.String Parameter Sets: (All) Aliases: @@ -601,7 +613,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbNamespace ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md index f2ba2f036a10..0180f3ada67e 100644 --- a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md +++ b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md @@ -15,18 +15,18 @@ Updates the NetworkRuleSet of a ServiceBus namespace ### SetExpanded (Default) ``` Set-AzServiceBusNetworkRuleSet -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-PublicNetworkAccess ] [-TrustedServiceAccessEnabled] [-DefaultAction ] + [-PublicNetworkAccess ] [-TrustedServiceAccessEnabled] [-DefaultAction ] [-IPRule ] [-VirtualNetworkRule ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### SetViaIdentityExpanded ``` -Set-AzServiceBusNetworkRuleSet -InputObject [-PublicNetworkAccess ] - [-TrustedServiceAccessEnabled] [-DefaultAction ] [-IPRule ] +Set-AzServiceBusNetworkRuleSet -InputObject [-PublicNetworkAccess ] + [-TrustedServiceAccessEnabled] [-DefaultAction ] [-IPRule ] [-VirtualNetworkRule ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -142,7 +142,7 @@ Accept wildcard characters: False Default Action for Network Rule Set ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction +Type: System.String Parameter Sets: (All) Aliases: @@ -186,10 +186,9 @@ Accept wildcard characters: False ### -IPRule List of IpRules -To construct, see NOTES section for IPRULE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules[] +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules[] Parameter Sets: (All) Aliases: @@ -230,13 +229,28 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PublicNetworkAccess 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. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess +Type: System.String Parameter Sets: (All) Aliases: @@ -295,10 +309,9 @@ Accept wildcard characters: False ### -VirtualNetworkRule List of VirtualNetwork Rules -To construct, see NOTES section for VIRTUALNETWORKRULE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetVirtualNetworkRules[] +Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules[] Parameter Sets: (All) Aliases: @@ -349,7 +362,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INetworkRuleSet ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusQueue.md b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusQueue.md index 049435d812c3..c9152f1540df 100644 --- a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusQueue.md +++ b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusQueue.md @@ -19,8 +19,8 @@ Set-AzServiceBusQueue -Name -NamespaceName -ResourceGroupName [-DuplicateDetectionHistoryTimeWindow ] [-LockDuration ] [-DeadLetteringOnMessageExpiration] [-EnableBatchedOperations] [-EnableExpress] [-ForwardTo ] [-ForwardDeadLetteredMessagesTo ] [-MaxDeliveryCount ] [-MaxSizeInMegabytes ] - [-MaxMessageSizeInKilobytes ] [-Status ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-MaxMessageSizeInKilobytes ] [-Status ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### SetViaIdentityExpanded @@ -29,8 +29,8 @@ Set-AzServiceBusQueue -InputObject [-AutoDeleteOnIdle ] [-DuplicateDetectionHistoryTimeWindow ] [-LockDuration ] [-DeadLetteringOnMessageExpiration] [-EnableBatchedOperations] [-EnableExpress] [-ForwardTo ] [-ForwardDeadLetteredMessagesTo ] [-MaxDeliveryCount ] - [-MaxSizeInMegabytes ] [-MaxMessageSizeInKilobytes ] [-Status ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-MaxSizeInMegabytes ] [-MaxMessageSizeInKilobytes ] [-Status ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -403,6 +403,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -420,11 +435,10 @@ Accept wildcard characters: False ``` ### -Status -Maximum size (in KB) of the message payload that can be accepted by the queue. -This property is only used in Premium today and default is 1024. +Enumerates the possible values for the status of a messaging entity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus +Type: System.String Parameter Sets: (All) Aliases: @@ -490,7 +504,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbQueue ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusRule.md b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusRule.md index d1e2519d8c7e..4b46be0eaef1 100644 --- a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusRule.md +++ b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusRule.md @@ -19,8 +19,8 @@ Set-AzServiceBusRule -Name -TopicName -SubscriptionName ] [-CorrelationId ] [-Label ] [-MessageId ] [-CorrelationFilterProperty ] [-ReplyTo ] [-ReplyToSessionId ] [-CorrelationFilterRequiresPreprocessing] [-SessionId ] [-To ] - [-FilterType ] [-ActionRequiresPreprocessing] [-ActionSqlExpression ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-FilterType ] [-ActionRequiresPreprocessing] [-ActionSqlExpression ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -30,8 +30,8 @@ Set-AzServiceBusRule -InputObject [-SqlExpression [-SqlFilterRequiresPreprocessing] [-ContentType ] [-CorrelationId ] [-Label ] [-MessageId ] [-CorrelationFilterProperty ] [-ReplyTo ] [-ReplyToSessionId ] [-CorrelationFilterRequiresPreprocessing] [-SessionId ] [-To ] - [-FilterType ] [-ActionRequiresPreprocessing] [-ActionSqlExpression ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-FilterType ] [-ActionRequiresPreprocessing] [-ActionSqlExpression ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -232,7 +232,7 @@ Accept wildcard characters: False Filter type that is evaluated against a BrokeredMessage. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType +Type: System.String Parameter Sets: (All) Aliases: @@ -334,6 +334,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ReplyTo Address of the queue to reply to. @@ -527,7 +542,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IRule ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusSubscription.md b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusSubscription.md index 0dcdf815ed45..8024e2d9b53e 100644 --- a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusSubscription.md +++ b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusSubscription.md @@ -17,20 +17,20 @@ Updates a ServiceBus Subscription Set-AzServiceBusSubscription -Name -TopicName -NamespaceName -ResourceGroupName [-SubscriptionId ] [-AutoDeleteOnIdle ] [-DefaultMessageTimeToLive ] [-DuplicateDetectionHistoryTimeWindow ] - [-LockDuration ] [-EnableBatchedOperations] [-Status ] [-ForwardTo ] + [-LockDuration ] [-EnableBatchedOperations] [-Status ] [-ForwardTo ] [-ForwardDeadLetteredMessagesTo ] [-MaxDeliveryCount ] [-DeadLetteringOnFilterEvaluationException] [-DeadLetteringOnMessageExpiration] [-DefaultProfile ] - [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### SetViaIdentityExpanded ``` Set-AzServiceBusSubscription -InputObject [-AutoDeleteOnIdle ] [-DefaultMessageTimeToLive ] [-DuplicateDetectionHistoryTimeWindow ] - [-LockDuration ] [-EnableBatchedOperations] [-Status ] [-ForwardTo ] + [-LockDuration ] [-EnableBatchedOperations] [-Status ] [-ForwardTo ] [-ForwardDeadLetteredMessagesTo ] [-MaxDeliveryCount ] [-DeadLetteringOnFilterEvaluationException] [-DeadLetteringOnMessageExpiration] [-DefaultProfile ] - [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -365,6 +365,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -385,7 +400,7 @@ Accept wildcard characters: False Enumerates the possible values for the status of a messaging entity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus +Type: System.String Parameter Sets: (All) Aliases: @@ -466,7 +481,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbSubscription ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusTopic.md b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusTopic.md index 20db8b7f1108..c58413c150b8 100644 --- a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusTopic.md +++ b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusTopic.md @@ -17,8 +17,8 @@ Updates a ServiceBus Topic Set-AzServiceBusTopic -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-AutoDeleteOnIdle ] [-DefaultMessageTimeToLive ] [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] [-EnableExpress] - [-SupportOrdering] [-MaxSizeInMegabytes ] [-MaxMessageSizeInKilobytes ] [-Status ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-SupportOrdering] [-MaxSizeInMegabytes ] [-MaxMessageSizeInKilobytes ] [-Status ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -27,8 +27,8 @@ Set-AzServiceBusTopic -Name -NamespaceName -ResourceGroupName Set-AzServiceBusTopic -InputObject [-AutoDeleteOnIdle ] [-DefaultMessageTimeToLive ] [-DuplicateDetectionHistoryTimeWindow ] [-EnableBatchedOperations] [-EnableExpress] [-SupportOrdering] [-MaxSizeInMegabytes ] - [-MaxMessageSizeInKilobytes ] [-Status ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-MaxMessageSizeInKilobytes ] [-Status ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -311,6 +311,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -328,11 +343,10 @@ Accept wildcard characters: False ``` ### -Status -Maximum size (in KB) of the message payload that can be accepted by the topic. -This property is only used in Premium today and default is 1024. +Enumerates the possible values for the status of a messaging entity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus +Type: System.String Parameter Sets: (All) Aliases: @@ -413,7 +427,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ISbTopic ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Start-AzServiceBusMigration.md b/src/ServiceBus/ServiceBus/help/Start-AzServiceBusMigration.md index 6e7116abd587..0fcd5cde06b6 100644 --- a/src/ServiceBus/ServiceBus/help/Start-AzServiceBusMigration.md +++ b/src/ServiceBus/ServiceBus/help/Start-AzServiceBusMigration.md @@ -8,18 +8,18 @@ schema: 2.0.0 # Start-AzServiceBusMigration ## SYNOPSIS -Creates Migration configuration and starts migration of entities from Standard to Premium namespace +Create Migration configuration and starts migration of entities from Standard to Premium namespace ## SYNTAX ``` Start-AzServiceBusMigration -NamespaceName -ResourceGroupName [-SubscriptionId ] [-PostMigrationName ] [-TargetNamespace ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Creates Migration configuration and starts migration of entities from Standard to Premium namespace +Create Migration configuration and starts migration of entities from Standard to Premium namespace ## EXAMPLES @@ -128,6 +128,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. @@ -212,7 +227,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IMigrationConfigProperties ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Stop-AzServiceBusMigration.md b/src/ServiceBus/ServiceBus/help/Stop-AzServiceBusMigration.md index 1e18214b5eaa..1bdaed817742 100644 --- a/src/ServiceBus/ServiceBus/help/Stop-AzServiceBusMigration.md +++ b/src/ServiceBus/ServiceBus/help/Stop-AzServiceBusMigration.md @@ -15,14 +15,14 @@ This operation reverts Migration ### Revert (Default) ``` Stop-AzServiceBusMigration -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-PassThru] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### RevertViaIdentity ``` Stop-AzServiceBusMigration -InputObject [-DefaultProfile ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -57,7 +57,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity @@ -101,6 +100,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the Resource group within the Azure subscription. diff --git a/src/ServiceBus/ServiceBus/help/Test-AzServiceBusName.md b/src/ServiceBus/ServiceBus/help/Test-AzServiceBusName.md index ec4faf415f07..15cf7948cf92 100644 --- a/src/ServiceBus/ServiceBus/help/Test-AzServiceBusName.md +++ b/src/ServiceBus/ServiceBus/help/Test-AzServiceBusName.md @@ -15,14 +15,14 @@ Checks availability of a namespace name or disaster recovery alias. ### NamespaceAvailability (Default) ``` Test-AzServiceBusName -NamespaceName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] - [-NoWait] [] + [-NoWait] [-ProgressAction ] [] ``` ### AliasAvailability ``` Test-AzServiceBusName -NamespaceName [-SubscriptionId ] -AliasName -ResourceGroupName [-DefaultProfile ] [-AsJob] [-NoWait] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -133,6 +133,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource @@ -170,7 +185,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult +### Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.ICheckNameAvailabilityResult ## NOTES diff --git a/src/ServiceBus/ServiceBus/help/Test-AzServiceBusNameAvailability.md b/src/ServiceBus/ServiceBus/help/Test-AzServiceBusNameAvailability.md index 2db5b5126f70..2cebf4bb3e1f 100644 --- a/src/ServiceBus/ServiceBus/help/Test-AzServiceBusNameAvailability.md +++ b/src/ServiceBus/ServiceBus/help/Test-AzServiceBusNameAvailability.md @@ -15,13 +15,13 @@ Checks the Availability of the given Queue or Topic name ### QueueCheckNameAvailabilitySet (Default) ``` Test-AzServiceBusNameAvailability [-ResourceGroupName] [-Namespace] [-Name] [-Queue] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### TopicCheckNameAvailabilitySet ``` Test-AzServiceBusNameAvailability [-ResourceGroupName] [-Namespace] [-Name] [-Topic] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -98,6 +98,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Queue To Check Name Availability for Queue Name diff --git a/tools/StaticAnalysis/Exceptions/Az.ServiceBus/BreakingChangeIssues.csv b/tools/StaticAnalysis/Exceptions/Az.ServiceBus/BreakingChangeIssues.csv new file mode 100644 index 000000000000..e6336e9a42af --- /dev/null +++ b/tools/StaticAnalysis/Exceptions/Az.ServiceBus/BreakingChangeIssues.csv @@ -0,0 +1,171 @@ +"Module","ClassName","Target","Severity","ProblemId","Description","Remediation" +"Az.ServiceBus","Approve-AzServiceBusPrivateEndpointConnection","Approve-AzServiceBusPrivateEndpointConnection","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Approve-AzServiceBusPrivateEndpointConnection","Approve-AzServiceBusPrivateEndpointConnection","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Approve-AzServiceBusPrivateEndpointConnection","Approve-AzServiceBusPrivateEndpointConnection","0","3000","The type of property 'ProvisioningState' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState]' to 'System.String'.","Change the type of property 'ProvisioningState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState]'." +"Az.ServiceBus","Approve-AzServiceBusPrivateEndpointConnection","Approve-AzServiceBusPrivateEndpointConnection","0","3000","The type of property 'ConnectionState' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus]' to 'System.String'.","Change the type of property 'ConnectionState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus]'." +"Az.ServiceBus","Approve-AzServiceBusPrivateEndpointConnection","Approve-AzServiceBusPrivateEndpointConnection","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Complete-AzServiceBusMigration","Complete-AzServiceBusMigration","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Deny-AzServiceBusPrivateEndpointConnection","Deny-AzServiceBusPrivateEndpointConnection","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Deny-AzServiceBusPrivateEndpointConnection","Deny-AzServiceBusPrivateEndpointConnection","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Deny-AzServiceBusPrivateEndpointConnection","Deny-AzServiceBusPrivateEndpointConnection","0","3000","The type of property 'ProvisioningState' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState]' to 'System.String'.","Change the type of property 'ProvisioningState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState]'." +"Az.ServiceBus","Deny-AzServiceBusPrivateEndpointConnection","Deny-AzServiceBusPrivateEndpointConnection","0","3000","The type of property 'ConnectionState' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus]' to 'System.String'.","Change the type of property 'ConnectionState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus]'." +"Az.ServiceBus","Deny-AzServiceBusPrivateEndpointConnection","Deny-AzServiceBusPrivateEndpointConnection","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Get-AzServiceBusAuthorizationRule","Get-AzServiceBusAuthorizationRule","0","3000","The type of property 'Rights' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Rights' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]'." +"Az.ServiceBus","Get-AzServiceBusAuthorizationRule","Get-AzServiceBusAuthorizationRule","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusAuthorizationRule","Get-AzServiceBusAuthorizationRule","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusAuthorizationRule","Get-AzServiceBusAuthorizationRule","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Get-AzServiceBusGeoDRConfiguration","Get-AzServiceBusGeoDRConfiguration","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusGeoDRConfiguration","Get-AzServiceBusGeoDRConfiguration","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusGeoDRConfiguration","Get-AzServiceBusGeoDRConfiguration","0","3000","The type of property 'ProvisioningState' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr]' to 'System.String'.","Change the type of property 'ProvisioningState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr]'." +"Az.ServiceBus","Get-AzServiceBusGeoDRConfiguration","Get-AzServiceBusGeoDRConfiguration","0","3000","The type of property 'Role' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery]' to 'System.String'.","Change the type of property 'Role' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery]'." +"Az.ServiceBus","Get-AzServiceBusGeoDRConfiguration","Get-AzServiceBusGeoDRConfiguration","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Get-AzServiceBusMigration","Get-AzServiceBusMigration","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusMigration","Get-AzServiceBusMigration","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusMigration","Get-AzServiceBusMigration","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Get-AzServiceBusNamespace","Get-AzServiceBusNamespace","0","3000","The type of property 'KeyVaultProperty' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties]'.","Change the type of property 'KeyVaultProperty' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties'." +"Az.ServiceBus","Get-AzServiceBusNamespace","Get-AzServiceBusNamespace","0","3000","The type of property 'PrivateEndpointConnection' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection]'.","Change the type of property 'PrivateEndpointConnection' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection'." +"Az.ServiceBus","Get-AzServiceBusNamespace","Get-AzServiceBusNamespace","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusNamespace","Get-AzServiceBusNamespace","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusNamespace","Get-AzServiceBusNamespace","0","3000","The type of property 'KeySource' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource]' to 'System.String'.","Change the type of property 'KeySource' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource]'." +"Az.ServiceBus","Get-AzServiceBusNamespace","Get-AzServiceBusNamespace","0","3000","The type of property 'IdentityType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType]' to 'System.String'.","Change the type of property 'IdentityType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType]'." +"Az.ServiceBus","Get-AzServiceBusNamespace","Get-AzServiceBusNamespace","0","3000","The type of property 'PublicNetworkAccess' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess]' to 'System.String'.","Change the type of property 'PublicNetworkAccess' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess]'." +"Az.ServiceBus","Get-AzServiceBusNamespace","Get-AzServiceBusNamespace","0","3000","The type of property 'SkuName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName]' to 'System.String'.","Change the type of property 'SkuName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName]'." +"Az.ServiceBus","Get-AzServiceBusNamespace","Get-AzServiceBusNamespace","0","3000","The type of property 'SkuTier' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier]' to 'System.String'.","Change the type of property 'SkuTier' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier]'." +"Az.ServiceBus","Get-AzServiceBusNamespace","Get-AzServiceBusNamespace","0","3000","The type of property 'MinimumTlsVersion' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion]' to 'System.String'.","Change the type of property 'MinimumTlsVersion' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion]'." +"Az.ServiceBus","Get-AzServiceBusNamespace","Get-AzServiceBusNamespace","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Get-AzServiceBusNetworkRuleSet","Get-AzServiceBusNetworkRuleSet","0","3000","The type of property 'IPRule' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules]'.","Change the type of property 'IPRule' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules'." +"Az.ServiceBus","Get-AzServiceBusNetworkRuleSet","Get-AzServiceBusNetworkRuleSet","0","3000","The type of property 'VirtualNetworkRule' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules]'.","Change the type of property 'VirtualNetworkRule' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules'." +"Az.ServiceBus","Get-AzServiceBusNetworkRuleSet","Get-AzServiceBusNetworkRuleSet","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusNetworkRuleSet","Get-AzServiceBusNetworkRuleSet","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusNetworkRuleSet","Get-AzServiceBusNetworkRuleSet","0","3000","The type of property 'DefaultAction' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction]' to 'System.String'.","Change the type of property 'DefaultAction' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction]'." +"Az.ServiceBus","Get-AzServiceBusNetworkRuleSet","Get-AzServiceBusNetworkRuleSet","0","3000","The type of property 'PublicNetworkAccess' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag]' to 'System.String'.","Change the type of property 'PublicNetworkAccess' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag]'." +"Az.ServiceBus","Get-AzServiceBusNetworkRuleSet","Get-AzServiceBusNetworkRuleSet","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Get-AzServiceBusPrivateEndpointConnection","Get-AzServiceBusPrivateEndpointConnection","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusPrivateEndpointConnection","Get-AzServiceBusPrivateEndpointConnection","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusPrivateEndpointConnection","Get-AzServiceBusPrivateEndpointConnection","0","3000","The type of property 'ProvisioningState' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState]' to 'System.String'.","Change the type of property 'ProvisioningState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EndPointProvisioningState]'." +"Az.ServiceBus","Get-AzServiceBusPrivateEndpointConnection","Get-AzServiceBusPrivateEndpointConnection","0","3000","The type of property 'ConnectionState' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus]' to 'System.String'.","Change the type of property 'ConnectionState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PrivateLinkConnectionStatus]'." +"Az.ServiceBus","Get-AzServiceBusPrivateEndpointConnection","Get-AzServiceBusPrivateEndpointConnection","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Get-AzServiceBusPrivateLink","Get-AzServiceBusPrivateLink","0","3000","The type of property 'Value' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IPrivateLinkResourcesListResult' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResource' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResource]'.","Change the type of property 'Value' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateLinkResource'." +"Az.ServiceBus","Get-AzServiceBusQueue","Get-AzServiceBusQueue","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusQueue","Get-AzServiceBusQueue","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusQueue","Get-AzServiceBusQueue","0","3000","The type of property 'Status' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]' to 'System.String'.","Change the type of property 'Status' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]'." +"Az.ServiceBus","Get-AzServiceBusQueue","Get-AzServiceBusQueue","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Get-AzServiceBusRule","Get-AzServiceBusRule","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusRule","Get-AzServiceBusRule","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusRule","Get-AzServiceBusRule","0","3000","The type of property 'FilterType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType]' to 'System.String'.","Change the type of property 'FilterType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType]'." +"Az.ServiceBus","Get-AzServiceBusRule","Get-AzServiceBusRule","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Get-AzServiceBusSubscription","Get-AzServiceBusSubscription","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusSubscription","Get-AzServiceBusSubscription","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusSubscription","Get-AzServiceBusSubscription","0","3000","The type of property 'Status' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]' to 'System.String'.","Change the type of property 'Status' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]'." +"Az.ServiceBus","Get-AzServiceBusSubscription","Get-AzServiceBusSubscription","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Get-AzServiceBusTopic","Get-AzServiceBusTopic","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusTopic","Get-AzServiceBusTopic","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Get-AzServiceBusTopic","Get-AzServiceBusTopic","0","3000","The type of property 'Status' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]' to 'System.String'.","Change the type of property 'Status' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]'." +"Az.ServiceBus","Get-AzServiceBusTopic","Get-AzServiceBusTopic","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","New-AzServiceBusAuthorizationRule","New-AzServiceBusAuthorizationRule","0","3000","The type of property 'Rights' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Rights' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]'." +"Az.ServiceBus","New-AzServiceBusAuthorizationRule","New-AzServiceBusAuthorizationRule","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","New-AzServiceBusAuthorizationRule","New-AzServiceBusAuthorizationRule","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","New-AzServiceBusAuthorizationRule","New-AzServiceBusAuthorizationRule","0","2110","The element type for parameter 'Rights' has been changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights' to 'System.String'.","Change the element type for parameter 'Rights' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights'." +"Az.ServiceBus","New-AzServiceBusGeoDRConfiguration","New-AzServiceBusGeoDRConfiguration","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","New-AzServiceBusGeoDRConfiguration","New-AzServiceBusGeoDRConfiguration","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","New-AzServiceBusGeoDRConfiguration","New-AzServiceBusGeoDRConfiguration","0","3000","The type of property 'ProvisioningState' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr]' to 'System.String'.","Change the type of property 'ProvisioningState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ProvisioningStateDr]'." +"Az.ServiceBus","New-AzServiceBusGeoDRConfiguration","New-AzServiceBusGeoDRConfiguration","0","3000","The type of property 'Role' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IArmDisasterRecovery' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery]' to 'System.String'.","Change the type of property 'Role' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.RoleDisasterRecovery]'." +"Az.ServiceBus","New-AzServiceBusIPRuleConfig","New-AzServiceBusIPRuleConfig","0","3000","The type of property 'Action' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction]' to 'System.String'.","Change the type of property 'Action' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction]'." +"Az.ServiceBus","New-AzServiceBusIPRuleConfig","New-AzServiceBusIPRuleConfig","0","2020","The cmdlet 'New-AzServiceBusIPRuleConfig' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction' for parameter 'Action'.","Change the type for parameter 'Action' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction'." +"Az.ServiceBus","New-AzServiceBusKey","New-AzServiceBusKey","0","2020","The cmdlet 'New-AzServiceBusKey' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType' for parameter 'KeyType'.","Change the type for parameter 'KeyType' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeyType'." +"Az.ServiceBus","New-AzServiceBusNamespace","New-AzServiceBusNamespace","0","3000","The type of property 'KeyVaultProperty' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties]'.","Change the type of property 'KeyVaultProperty' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties'." +"Az.ServiceBus","New-AzServiceBusNamespace","New-AzServiceBusNamespace","0","3000","The type of property 'PrivateEndpointConnection' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection]'.","Change the type of property 'PrivateEndpointConnection' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection'." +"Az.ServiceBus","New-AzServiceBusNamespace","New-AzServiceBusNamespace","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","New-AzServiceBusNamespace","New-AzServiceBusNamespace","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","New-AzServiceBusNamespace","New-AzServiceBusNamespace","0","3000","The type of property 'KeySource' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource]' to 'System.String'.","Change the type of property 'KeySource' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource]'." +"Az.ServiceBus","New-AzServiceBusNamespace","New-AzServiceBusNamespace","0","3000","The type of property 'IdentityType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType]' to 'System.String'.","Change the type of property 'IdentityType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType]'." +"Az.ServiceBus","New-AzServiceBusNamespace","New-AzServiceBusNamespace","0","3000","The type of property 'PublicNetworkAccess' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess]' to 'System.String'.","Change the type of property 'PublicNetworkAccess' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess]'." +"Az.ServiceBus","New-AzServiceBusNamespace","New-AzServiceBusNamespace","0","3000","The type of property 'SkuName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName]' to 'System.String'.","Change the type of property 'SkuName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName]'." +"Az.ServiceBus","New-AzServiceBusNamespace","New-AzServiceBusNamespace","0","3000","The type of property 'SkuTier' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier]' to 'System.String'.","Change the type of property 'SkuTier' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier]'." +"Az.ServiceBus","New-AzServiceBusNamespace","New-AzServiceBusNamespace","0","3000","The type of property 'MinimumTlsVersion' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion]' to 'System.String'.","Change the type of property 'MinimumTlsVersion' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion]'." +"Az.ServiceBus","New-AzServiceBusNamespace","New-AzServiceBusNamespace","0","2020","The cmdlet 'New-AzServiceBusNamespace' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType' for parameter 'IdentityType'.","Change the type for parameter 'IdentityType' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType'." +"Az.ServiceBus","New-AzServiceBusNamespace","New-AzServiceBusNamespace","0","2020","The cmdlet 'New-AzServiceBusNamespace' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess' for parameter 'PublicNetworkAccess'.","Change the type for parameter 'PublicNetworkAccess' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess'." +"Az.ServiceBus","New-AzServiceBusNamespace","New-AzServiceBusNamespace","0","2020","The cmdlet 'New-AzServiceBusNamespace' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName' for parameter 'SkuName'.","Change the type for parameter 'SkuName' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName'." +"Az.ServiceBus","New-AzServiceBusQueue","New-AzServiceBusQueue","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","New-AzServiceBusQueue","New-AzServiceBusQueue","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","New-AzServiceBusQueue","New-AzServiceBusQueue","0","3000","The type of property 'Status' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]' to 'System.String'.","Change the type of property 'Status' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]'." +"Az.ServiceBus","New-AzServiceBusQueue","New-AzServiceBusQueue","0","2020","The cmdlet 'New-AzServiceBusQueue' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus' for parameter 'Status'.","Change the type for parameter 'Status' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus'." +"Az.ServiceBus","New-AzServiceBusRule","New-AzServiceBusRule","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","New-AzServiceBusRule","New-AzServiceBusRule","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","New-AzServiceBusRule","New-AzServiceBusRule","0","3000","The type of property 'FilterType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType]' to 'System.String'.","Change the type of property 'FilterType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType]'." +"Az.ServiceBus","New-AzServiceBusRule","New-AzServiceBusRule","0","2020","The cmdlet 'New-AzServiceBusRule' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType' for parameter 'FilterType'.","Change the type for parameter 'FilterType' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType'." +"Az.ServiceBus","New-AzServiceBusSubscription","New-AzServiceBusSubscription","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","New-AzServiceBusSubscription","New-AzServiceBusSubscription","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","New-AzServiceBusSubscription","New-AzServiceBusSubscription","0","3000","The type of property 'Status' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]' to 'System.String'.","Change the type of property 'Status' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]'." +"Az.ServiceBus","New-AzServiceBusSubscription","New-AzServiceBusSubscription","0","2020","The cmdlet 'New-AzServiceBusSubscription' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus' for parameter 'Status'.","Change the type for parameter 'Status' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus'." +"Az.ServiceBus","New-AzServiceBusTopic","New-AzServiceBusTopic","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","New-AzServiceBusTopic","New-AzServiceBusTopic","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","New-AzServiceBusTopic","New-AzServiceBusTopic","0","3000","The type of property 'Status' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]' to 'System.String'.","Change the type of property 'Status' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]'." +"Az.ServiceBus","New-AzServiceBusTopic","New-AzServiceBusTopic","0","2020","The cmdlet 'New-AzServiceBusTopic' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus' for parameter 'Status'.","Change the type for parameter 'Status' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus'." +"Az.ServiceBus","Remove-AzServiceBusAuthorizationRule","Remove-AzServiceBusAuthorizationRule","0","3000","The type of property 'Rights' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Rights' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]'." +"Az.ServiceBus","Remove-AzServiceBusAuthorizationRule","Remove-AzServiceBusAuthorizationRule","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Remove-AzServiceBusAuthorizationRule","Remove-AzServiceBusAuthorizationRule","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Remove-AzServiceBusAuthorizationRule","Remove-AzServiceBusAuthorizationRule","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Remove-AzServiceBusGeoDRConfiguration","Remove-AzServiceBusGeoDRConfiguration","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Remove-AzServiceBusMigration","Remove-AzServiceBusMigration","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Remove-AzServiceBusNamespace","Remove-AzServiceBusNamespace","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Remove-AzServiceBusPrivateEndpointConnection","Remove-AzServiceBusPrivateEndpointConnection","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Remove-AzServiceBusQueue","Remove-AzServiceBusQueue","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Remove-AzServiceBusRule","Remove-AzServiceBusRule","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Remove-AzServiceBusSubscription","Remove-AzServiceBusSubscription","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Remove-AzServiceBusTopic","Remove-AzServiceBusTopic","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Set-AzServiceBusAuthorizationRule","Set-AzServiceBusAuthorizationRule","0","3000","The type of property 'Rights' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Rights' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights[]'." +"Az.ServiceBus","Set-AzServiceBusAuthorizationRule","Set-AzServiceBusAuthorizationRule","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Set-AzServiceBusAuthorizationRule","Set-AzServiceBusAuthorizationRule","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Set-AzServiceBusAuthorizationRule","Set-AzServiceBusAuthorizationRule","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Set-AzServiceBusAuthorizationRule","Set-AzServiceBusAuthorizationRule","0","2110","The element type for parameter 'Rights' has been changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights' to 'System.String'.","Change the element type for parameter 'Rights' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.AccessRights'." +"Az.ServiceBus","Set-AzServiceBusGeoDRConfigurationBreakPair","Set-AzServiceBusGeoDRConfigurationBreakPair","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Set-AzServiceBusGeoDRConfigurationFailOver","Set-AzServiceBusGeoDRConfigurationFailOver","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Set-AzServiceBusNamespace","Set-AzServiceBusNamespace","0","3000","The type of property 'KeyVaultProperty' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties]'.","Change the type of property 'KeyVaultProperty' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties'." +"Az.ServiceBus","Set-AzServiceBusNamespace","Set-AzServiceBusNamespace","0","3000","The type of property 'PrivateEndpointConnection' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection]'.","Change the type of property 'PrivateEndpointConnection' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IPrivateEndpointConnection'." +"Az.ServiceBus","Set-AzServiceBusNamespace","Set-AzServiceBusNamespace","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Set-AzServiceBusNamespace","Set-AzServiceBusNamespace","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Set-AzServiceBusNamespace","Set-AzServiceBusNamespace","0","3000","The type of property 'KeySource' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource]' to 'System.String'.","Change the type of property 'KeySource' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.KeySource]'." +"Az.ServiceBus","Set-AzServiceBusNamespace","Set-AzServiceBusNamespace","0","3000","The type of property 'IdentityType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType]' to 'System.String'.","Change the type of property 'IdentityType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType]'." +"Az.ServiceBus","Set-AzServiceBusNamespace","Set-AzServiceBusNamespace","0","3000","The type of property 'PublicNetworkAccess' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess]' to 'System.String'.","Change the type of property 'PublicNetworkAccess' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess]'." +"Az.ServiceBus","Set-AzServiceBusNamespace","Set-AzServiceBusNamespace","0","3000","The type of property 'SkuName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName]' to 'System.String'.","Change the type of property 'SkuName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName]'." +"Az.ServiceBus","Set-AzServiceBusNamespace","Set-AzServiceBusNamespace","0","3000","The type of property 'SkuTier' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier]' to 'System.String'.","Change the type of property 'SkuTier' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuTier]'." +"Az.ServiceBus","Set-AzServiceBusNamespace","Set-AzServiceBusNamespace","0","3000","The type of property 'MinimumTlsVersion' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion]' to 'System.String'.","Change the type of property 'MinimumTlsVersion' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.TlsVersion]'." +"Az.ServiceBus","Set-AzServiceBusNamespace","Set-AzServiceBusNamespace","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Set-AzServiceBusNamespace","Set-AzServiceBusNamespace","0","2020","The cmdlet 'Set-AzServiceBusNamespace' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType' for parameter 'IdentityType'.","Change the type for parameter 'IdentityType' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.ManagedServiceIdentityType'." +"Az.ServiceBus","Set-AzServiceBusNamespace","Set-AzServiceBusNamespace","0","2020","The cmdlet 'Set-AzServiceBusNamespace' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess' for parameter 'PublicNetworkAccess'.","Change the type for parameter 'PublicNetworkAccess' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess'." +"Az.ServiceBus","Set-AzServiceBusNamespace","Set-AzServiceBusNamespace","0","2020","The cmdlet 'Set-AzServiceBusNamespace' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName' for parameter 'SkuName'.","Change the type for parameter 'SkuName' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.SkuName'." +"Az.ServiceBus","Set-AzServiceBusNetworkRuleSet","Set-AzServiceBusNetworkRuleSet","0","3000","The type of property 'IPRule' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules]'.","Change the type of property 'IPRule' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetIPRules'." +"Az.ServiceBus","Set-AzServiceBusNetworkRuleSet","Set-AzServiceBusNetworkRuleSet","0","3000","The type of property 'VirtualNetworkRule' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules]'.","Change the type of property 'VirtualNetworkRule' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.INwRuleSetVirtualNetworkRules'." +"Az.ServiceBus","Set-AzServiceBusNetworkRuleSet","Set-AzServiceBusNetworkRuleSet","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Set-AzServiceBusNetworkRuleSet","Set-AzServiceBusNetworkRuleSet","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Set-AzServiceBusNetworkRuleSet","Set-AzServiceBusNetworkRuleSet","0","3000","The type of property 'DefaultAction' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction]' to 'System.String'.","Change the type of property 'DefaultAction' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction]'." +"Az.ServiceBus","Set-AzServiceBusNetworkRuleSet","Set-AzServiceBusNetworkRuleSet","0","3000","The type of property 'PublicNetworkAccess' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INetworkRuleSet' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag]' to 'System.String'.","Change the type of property 'PublicNetworkAccess' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccessFlag]'." +"Az.ServiceBus","Set-AzServiceBusNetworkRuleSet","Set-AzServiceBusNetworkRuleSet","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Set-AzServiceBusNetworkRuleSet","Set-AzServiceBusNetworkRuleSet","0","2020","The cmdlet 'Set-AzServiceBusNetworkRuleSet' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess' for parameter 'PublicNetworkAccess'.","Change the type for parameter 'PublicNetworkAccess' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.PublicNetworkAccess'." +"Az.ServiceBus","Set-AzServiceBusNetworkRuleSet","Set-AzServiceBusNetworkRuleSet","0","2020","The cmdlet 'Set-AzServiceBusNetworkRuleSet' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction' for parameter 'DefaultAction'.","Change the type for parameter 'DefaultAction' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.DefaultAction'." +"Az.ServiceBus","Set-AzServiceBusNetworkRuleSet","Set-AzServiceBusNetworkRuleSet","0","3000","The type of property 'Action' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.INwRuleSetIPRules' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction]' to 'System.String'.","Change the type of property 'Action' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.NetworkRuleIPAction]'." +"Az.ServiceBus","Set-AzServiceBusQueue","Set-AzServiceBusQueue","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Set-AzServiceBusQueue","Set-AzServiceBusQueue","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Set-AzServiceBusQueue","Set-AzServiceBusQueue","0","3000","The type of property 'Status' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbQueue' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]' to 'System.String'.","Change the type of property 'Status' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]'." +"Az.ServiceBus","Set-AzServiceBusQueue","Set-AzServiceBusQueue","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Set-AzServiceBusQueue","Set-AzServiceBusQueue","0","2020","The cmdlet 'Set-AzServiceBusQueue' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus' for parameter 'Status'.","Change the type for parameter 'Status' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus'." +"Az.ServiceBus","Set-AzServiceBusRule","Set-AzServiceBusRule","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Set-AzServiceBusRule","Set-AzServiceBusRule","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Set-AzServiceBusRule","Set-AzServiceBusRule","0","3000","The type of property 'FilterType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType]' to 'System.String'.","Change the type of property 'FilterType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType]'." +"Az.ServiceBus","Set-AzServiceBusRule","Set-AzServiceBusRule","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Set-AzServiceBusRule","Set-AzServiceBusRule","0","2020","The cmdlet 'Set-AzServiceBusRule' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType' for parameter 'FilterType'.","Change the type for parameter 'FilterType' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.FilterType'." +"Az.ServiceBus","Set-AzServiceBusSubscription","Set-AzServiceBusSubscription","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Set-AzServiceBusSubscription","Set-AzServiceBusSubscription","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Set-AzServiceBusSubscription","Set-AzServiceBusSubscription","0","3000","The type of property 'Status' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbSubscription' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]' to 'System.String'.","Change the type of property 'Status' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]'." +"Az.ServiceBus","Set-AzServiceBusSubscription","Set-AzServiceBusSubscription","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Set-AzServiceBusSubscription","Set-AzServiceBusSubscription","0","2020","The cmdlet 'Set-AzServiceBusSubscription' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus' for parameter 'Status'.","Change the type for parameter 'Status' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus'." +"Az.ServiceBus","Set-AzServiceBusTopic","Set-AzServiceBusTopic","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Set-AzServiceBusTopic","Set-AzServiceBusTopic","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Set-AzServiceBusTopic","Set-AzServiceBusTopic","0","3000","The type of property 'Status' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbTopic' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]' to 'System.String'.","Change the type of property 'Status' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus]'." +"Az.ServiceBus","Set-AzServiceBusTopic","Set-AzServiceBusTopic","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Set-AzServiceBusTopic","Set-AzServiceBusTopic","0","2020","The cmdlet 'Set-AzServiceBusTopic' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus' for parameter 'Status'.","Change the type for parameter 'Status' back to 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.EntityStatus'." +"Az.ServiceBus","Start-AzServiceBusMigration","Start-AzServiceBusMigration","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Start-AzServiceBusMigration","Start-AzServiceBusMigration","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.IMigrationConfigProperties' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.CreatedByType]'." +"Az.ServiceBus","Stop-AzServiceBusMigration","Stop-AzServiceBusMigration","0","3000","The type of property 'ConfigName' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IServiceBusIdentity' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]' to 'System.String'.","Change the type of property 'ConfigName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.MigrationConfigurationName]'." +"Az.ServiceBus","Test-AzServiceBusName","Test-AzServiceBusName","0","3000","The type of property 'Reason' of type 'Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ICheckNameAvailabilityResult' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason]' to 'System.String'.","Change the type of property 'Reason' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Support.UnavailableReason]'."